Computer networks have not yet used a unified concept. Many people think that computer networks are interconnected by some general-purpose, programmable hardware , through which different types of data can be transmitted, and they can support a wide range of and growing applications .
Computer networks include hardware devices and software applications, which can be classified according to different standards:
According to the scope of action:
By network user: public network (Internet), private network (military, political, medical, etc.)
Structure of this article:
A brief history of computing network
The first stage: single network ARPANET
The number of machines is small, and the network is not interconnected, mainly used in military institutions, etc.
The second stage: three-tier structure of the Internet
Can be interconnected between schools, regions and other areas with computers (mainly in the United States)
The third stage: the emergence of ISP (Internet Service Provider)
China Telecom, China Mobile, China Unicom are all
Can be interconnected globally through the backbone ISP, forming today's Internet
The link can view the global Internet connection lines, as shown in the figure:
Most of these lines are submarine cables
A brief history of China Computing Network:
progression stage:
The largest public computer network currently: the flow of outbound traffic also passes through this
There are also some private technology groups that have also promoted the development of China’s Internet: Zhang Chaoyang (Sohu), NetEase (Ding Lei), Sina (Wang Zhidong), Tencent (Ma Huateng), Baidu (Li Yanhong)
Computer network hierarchy
The computing network adopts a hierarchical structure, why is it hierarchical?
The network communication between the hosts must ensure the smooth physical path, identify the destination computer, verify data errors, etc.
In order to reasonably solve the above-mentioned complicated problems, a layered structure is used, and the layers are relatively independent (decoupling), focusing on their respective functions and ensuring sufficient flexibility ; this is also the principle of layering
OSI seven-layer model
Get a general understanding of the different levels of functions:
OSI wants to be called the standard that the global computer follows, but the successful implementation of TCP/IP makes OSI only a theoretical result
Was defeated for a reason:
Lack of practical experience and does not fit the application scenario
The formulation cycle is too long to be put into the market in time
Model design is unreasonable, there are repeated redundancy
TCP/IP four-layer model:
Communication process:
We focus on learning the four-layer model. From the beginning of the concept, we can see that computers and routers are programmable hardware (protocols can be implemented in Perl language), and data between host applications must pass top-to-bottom data Encapsulation, analysis and delivery, bottom-up unpacking and other processes
Of course, the above illustration and layering are abstract concepts, but they can indeed help us streamline the protocol and optimize the network. It is also very helpful for understanding and learning.
Next, combine the specific data form and the layered introduction of the hardware unit
Internet topology
Modern Internet topology
Edge network : can be understood as the user part
In addition to retail investors, the marginal part can also be enterprises:
An enterprise has multiple gateways, and a unified gateway needs to be connected to the ISP
Core network :
Network topology overview:
Users do not perceive gateways and ISPs, but at most their own routers, which is the popular C/S mode and P2P mode:
The peer-to-peer connection mode is generally used in resource downloading, and will be introduced (the flag is set up )
Network performance index
Peak speed: Commonly used unit Mbps, namely Mbit/s, the usual 100M fiber is only about 12MB/s
Latency: The following concepts will often appear in subsequent learning agreements
Sending delay: message length/sending rate (decided by the network card)
Propagation delay: path length/propagation rate (limited by the propagation medium)
Queuing delay: waiting for processing time
Processing delay:
How to remember? A message departs from host A (transmission delay) and arrives at the next router B (propagation delay), where it waits for processing (queuing delay), and begins processing and preparation for forwarding (processing delay)
RTT(Route-Trip time)
Indicates the time for a data message to go back and forth once in end-to-end communication
An important indicator for evaluating network quality
Use the pingcommand to view, the time is not stable:
Physical layer
Started hierarchical learning
effect:
Transport bit stream
Shielding device differences
equipment:
Twisted pair
Coaxial cable
optical fiber
Infrared, wireless, laser and other media
Physical characteristics (this one needs to be tested, just memorize it, and the memorization is over)
Mechanical characteristics: specify the shape and size of the connector used in the interface, the number and arrangement of pins, fixing and locking devices, etc.
Electrical characteristics: specify the voltage range that appears on each line of the interface cable
Functional characteristics: indicate the meaning of a certain level of voltage on a certain line
Process characteristics: specify the order of occurrence of various possible events for different functions
Remember: There are many types of equipment and communication methods, and the purpose of the physical layer is to shield the differences as much as possible , transmit bits, and serve the data link layer.
After some basic concepts, the relationship between protocols, services, and interfaces will be introduced
Channel
Media that convey information in one direction
A communication circuit includes: receiving channel + sending channel; in order to avoid conflicts, there is:
Simplex channel: one can only send, one can only receive
Half duplex: one to send/receive, the other to receive/send
Full duplex: can send and receive at the same time
These devices have been implemented in the physical layer, which are signal communication technologies and will no longer be developed
data link layer
effect
Encapsulated and framed
Transparent transmission
Error detection
Bit is the basic unit of the physical layer, and the frame is the basic unit of data at the link layer
At the sending end, the network layer message is added and marked as a frame (frame header, frame tail)
Need to be delimited by character counting method, first and last mark method (frame length)
Recognize the unframed frame at the receiving end and hand it over to the network layer (the lower layer serves the upper layer: after it comes down, then it comes up and passes it up)
What if the frame delimiter conflicts with the content? Need for transparent transmission
Transparency: An important term that shields the underlying implementation and only provides APIs. For example, the physical layer is transparent to the digital chain layer (it is there, but you can’t see it)
The meaning here is: the control character is in the data, but it should be treated as if it does not exist, and it is realized by the escape character
The physical layer only cares about transmission and cannot detect errors in the process, and error detection is required here
Parity check code
Add a check bit according to the parity number of the content 0或1, and then check the parity number after transmission to see if it is consistent
Limitations: Only odd number of bit errors can be detected . If the above two bits are wrong at the same time, it cannot be detected
Cyclic Redundancy Check (CRC)
How to generate a fixed check code number based on the data? (To be tested)
Binary modulo 2 division
Role: Generate CRC check bit here
Similar to arithmetic division, but without borrowing, using exclusive OR operation (same 0 but 1)
Get the CRC check digit: The official statement of the calculation steps:
But it is still recommended to look at examples, the principles of these rules are very troublesome, just write them down first:
Polynomial G, fill in 0: The selection of G needs to be negotiated for both sending and receiving
Modulo 2 division: pay attention to the writing, start dividing from the high position
Replace r zeros with the obtained remainder to obtain a verifiable data string
How does the receiving end verify it?
Divide the received data modulo 2 by G, and judge according to the remainder
There is no error if the remainder is 0
Commonly used G(x) table:
The number chain layer value error detection does not correct , and the error message is directly discarded. Wait for the upper layer to notify the retransmission.
MTU
Maximum transmission unit (maximum transmission unit)
Specifies the maximum length of the data frame
Physical hardware limitations
Performance impact (considering delay)
Ethernet MTU=1500B
Path MTU
Determined by the minimum value of MTU in the link
summary
The knowledge of Jiwang is miscellaneous and fragmented. If you don’t think about it, you may feel that you’re finished with memorizing it.
I think we still need to combine basic computer knowledge. Abstract protocols must eventually be implemented on hardware (not as simple as network programming). The rules may be complicated, but if you don’t talk about high-tech algorithm optimization and architecture design, the basic principle is to save. Resources, improving efficiency, thinking from these perspectives, sorting out and remembering clearly, is the first step to getting started
This is more like an introduction to the physical layer and the number chain layer, and there are some details (to be tested) can refer to "Computer Network"
If you are interested in the bottom layer, you can read "Modern Exchange Principles and Communication Network Technology" to uncover the mystery of the physical layer, go and see you. . .