Data link layer Reading Notes
The data link layer is relatively low at the TCP/IP layer.
What has the link layer done? Specifically, we have done the following:
1: send and receive I p datagram for the I P module;
2: Send a r p request to module a r p and receive a r p response
3: Send the r a p request to r a p and receive the r a p response.
T c p/I p supports a variety of link layer protocols, depending on the hardware used by the network, such as Ethernet, licensing ring network, f d I (Optical Fiber Distributed Data Interface) and R S-2 3 2 serial lines.
Here we will summarize Ethernet, IEEE 802, and RS232.
First, let's summarize Ethernet.
Ethernet is a standard developed by Digital Equipment Corp .), Intel Corporation (I n t e lC o r p .) and Company X e r o x jointly announced in. It is the main LAN technology used by t c p/I P today. It adopts A media Access method called c s m a/c d, which means the Carrier Sense, Multiple Access with Collision Detection of the Carrier with conflict Detection ). The speed is 10 Mb/s and the address is 48 bits. (But it is usually 100 Mb/s)
IEEE then introduced a slightly different standard set.
Among them, 8 0 2. 3 for the entire c s m a/c d network, 8 0 2. 4 for the Token Bus Network, 8 0 2. 5 for the card ring network. The common features of these three are defined by the standard, which is the logical link control (l c) shared by the network ). Unfortunately, 8 0 2. 2 and 8 0 2. 3 define a different frame format than Ethernet.
The following are common data encapsulation formats in our daily life.
In this figure, the length of 802.3 is the same as that of the Ethernet type. Fortunately, the valid length value defined by 8 0 2 is the same as the valid type value of Ethernet, so that the two frame formats can be distinguished.
In the Ethernet frame format, the Type field is followed by the data; in the 8 0 2 frame format, the following is 3 bytes
802.2 LLC and 5-byte 802.2 SNAP. Destination Service Access Point (Destination Service Access Point,
D s a p) and Source Service Access Point (SSAP) values are set to 0 x. The Ct r l field value is set to 3. The subsequent three bytes of o rg code are set to 0. The next two byte fields are in the same format as the Ethernet frame. In this case, the difference between Ethernet and 802.3 is only LLC and SNMP. And the data is still fixed. The variable part is the same. The data length is different. Does it have to be split from Ethernet to 802.3? If anyone knows, please tell me.
The c r c field is used to test (test) the cyclic bytecode for subsequent bytes errors within a frame (also known as f c s or frame test ).
Sequence ). This FCS is widely used, almost all of which are used.
802.3 standard-defined frames and Ethernet frames both have minimum length requirements. 802.3 the data part must be at least 38 bytes
Ethernet must contain at least 46 bytes. To ensure this, it must be filled.
The following figure shows the PPP data format.
1) method for encapsulating I P datagram on a serial link. P supports both an 8-bit asynchronous mode with no parity check.
(For example, serial interfaces that are common in most computers) also support bit-oriented synchronization links.
2) Establish, configure, and test the data Link Control Protocol (l c p: Link Control Protocol ). It allows access
Both parties negotiate to determine different options.
3) Network Control Protocol (n c p: Network Control Protocol) systems for different Network layer protocols. Current
The network layers defined by r f c include I p, o s I network layer, D E C n e t, and A p l e Ta l k. For example, the ip ncp allows both parties to agree that
Whether to compress the packet header, similar to c s l I P (the abbreviation N C P can also be used before T C P ).
RFC 1548 [Simpson 1993] describes the packet encapsulation method and link control protocol. RFC 1332 [McGregor
1 9 9 2] describes the network control protocol for I P.
The format of P data frames looks like the h d l c (High-Level Data Link Control) Standard of I S O. Figure 2-3 is the format of the P data frame.
Because the value of the flag character is 0x7e, it will be repeated, so escape is required. As for why, it must be to prevent data from being mistakenly recognized.
The maximum transmission unit MTU.
The reason for this restriction is that the hardware capability is limited. Therefore, Ethernet and 8 0 2. 3 have a limit on the length of the data frame. The maximum values are 1 5 0 0 and 1 4 9 2 bytes, respectively.
Assume that there is a large amount of data to be sent. What should we do? Or send in minutes. That is, multipart sending.
The terminology is: the IP layer requires partitioning (f r a g m e n t a t I o n), and the datagram is divided into several pieces, in this way, each piece is smaller than m t u.
There will be many other ideas here
1: for example, if the IP address needs to be sharded, all the sharding work is done by the IP address. Or other parts, for example, tcp udp icmp igmp. If you use tcp udp, the slice will also be split, and the IP slice will be repeated if it is not. Why does TCPIP have these shards.
2: How can we reorganize the parts.
3: data packets arrive in disorder, and how to handle this disorder.
,,,,,,,,,,,,
Ha, why are there so many problems. If you find the largest MTU, you can raise so many questions. Okay, I'm so embarrassed.
The question about the maximum MTU will be shown in the next summary.
The path MTU is the smallest MTU in the two host exchange data links.
In the above cases, the books are basically ready-made. These are just an understanding.