Network Protocol Reading Notes link layer

Source: Internet
Author: User

Network Protocol Reading Notes link layer 1, TCP/IP protocol family, the main purpose of the Link Layer: 1) for the IP module to send and accept IP datagram. 2) send ARP requests to the ARP module and receive ARP responses. 3) Send RARP requests to RARP and accept RARP responses. TCP/IP supports multiple link layer protocols, depending on the hardware used by the network, such as Ethernet, Ring Plate network, FDDI and RS-232 serial line. Run the ifconfig command eth0 Link encap: Ethernet HWaddr 00: 0c: 29: e9: 44: 34 inet addr: 192.168.1.88 Bcast: 192.168.1.255 Mask: 255.255.255.0 inet6 addr: 2001: da8: 208: 191: 20c: 29ff: fee9: 4434/64 Scope: Global inet6 addr: 2001: da8: 208: 164: 20c: 29ff: fee9: 4434/64 Scope: Global inet6 addr: fe80 :: 20c: 29ff: fee9: 4434/64 Scope: Link up broadcast running multicast mtu: 1500 Metric: 1 RX packets: 2268618 errors: 0 dropped: 0 overruns: 0 Frame: 0 TX packets: 590431 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 1000 RX bytes: 281512986 (281.5 MB) TX bytes: 389527678 (389.5 MB) Interrupt: 19 Base address: 0x2000lo Link encap: Local Loopback inet addr: 127.0.0.1 Mask: 255.0.0.0 inet6 addr: 1/128 Scope: Host up loopback running mtu: 16436 Metric: 1 RX packets: 212 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 212 errors: 0 dr Opped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 0 RX bytes: 23780 (23.7 KB) TX bytes: 23780 (23.7 KB) eth0 is the Ethernet interface, lo is the loopback interface. This also indicates that the host supports at least loopback and Ethernet protocols on the network link layer. We can see that the MTU of eth0 is 1500. Lo (loopback interface) MTU is 16436 II. Ethernet and IEEE 802 Ethernet. This term generally refers to Digital Equipment Corp) intel and Xerox jointly released a standard in 1982. He is the main LAN technology used by TCP/IP today. It adopts a Media intervention method called CSMA/CD, that is, multi-channel intervention for carrier listeners with conflict detection. Several years later, the IEEE802 committee published a slightly different standard set, of which 802.3 are for the entire CSMA/CD network, 802.4 are for the Token Bus Network, and 802.5 are for the licensing ring network, the common features of the three are defined by the 802.2 standard. However, 802.2 and 802.3 define a different frame format than Ethernet. In TCP/IP, The encapsulation of Ethernet IP datagram is defined in RFC894, and IP datagram encapsulation of IEEE802 network is defined in RFC1042. In TCP/IP, the host requirement RFC requires that each Internet host be connected to a 10 Mbit/s Ethernet cable, and the requirements are as follows: 1) groups in RFC894 Encapsulation Format must be sent and accepted. 2) groups in RFC1042 Encapsulation Format should be accepted. 3) groups may be sent in RFC1042 format. If the host can send two types of group data at the same time, the sent group must be configurable, and the default group must be RFC894. It can be seen that RFC1042 is in a supporting role in TCP/IP. For the two different datagram formats, refer to the tutorial. 3. MTU Ethernet and 802.3 have a limit on the data frame length. The maximum values are 1500 and 1492 bytes, respectively. This feature of the link layer is called MTU. Each data link layer protocol of the maximum transmission unit has an MTU (maximum transmission unit) Definition. Under this definition, if the IP datagram is too large, fragmentation is required to make each part smaller than MTU. The MTU of PPP does not refer to the physical characteristics of network media, but is a logical limitation to provide fast response time for interactive use. Netstat-in list network Interface MTUKernel Interface tableIface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP Flgeth0 1500 0 0 0 0 0 0 0 0 0 0 BMRUlo 2269230 0 0 0 0 590431 0 0 0 LRU when two hosts on the same network communicate with each other, MTU of the network is very important. If the communication between the two hosts passes through many networks, the link layer of each network may have different MTU values. What is important is not the MTU value of the network where the two hosts are located, but the minimum MTU in the path of the two communication hosts, which is called the path MTU. The path MTU between the two hosts is not necessarily a constant. It depends on the route selected at that time. The route selection is not necessarily symmetric (the route from A to B may be different from the route from B to A), so the path MTU is not necessarily consistent in both directions. 4. The loopback interface allows communication between client programs and server programs running on the same host through TCP/IP. Class A network number 127 is reserved for the loopback interface. According to the Convention, most systems allocate the IP address 127.0.0.1 to this interface and name it localhost. The loopback interface processes IP data packets in P20. An IP datagram sent to the loop interface cannot appear on any network. It can also be seen that the IP datagram sent to the local IP address of the host generally does not appear on the corresponding network.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.