TCP/IP Detailed learning notes (2)-Data link layer

Source: Internet
Author: User

There are three purposes of the data link layer:

    • Send and receive IP datagrams for IP modules.
    • Sends an ARP request and receives an ARP reply for the ARP module.
    • Send Rarp request and receive RARP response for Rarp

IP everyone has heard about it. As for ARP and RARP,ARP called Address Resolution Protocol, is the IP address for MAC address of a protocol, and Rarp is called Inverse Address Resolution Protocol, in the later section of the TCP/IP protocol will introduce them (in the LAN with the ARP protocol can be easily paralyzed network OH)

The protocol of the data link layer is still many, there are our most commonly used Ethernet (that is, we usually use the network card) protocol, there are less common token ring, and FDDI, of course, there are now quite popular in the domestic PPP protocol (ADSL broadband), as well as a loopback protocol.

Contact the ifconfig-a command in Linux, this command will usually get the following results

where eth0 is the Ethernet interface, and lo is the loopback interface. This also indicates that the host supports at least the loopback protocol and the Ethernet protocol at the network link layer.

Ethernet (ether-net) is defined as a standard published by Digital Equipment Corp., Intel Corp., and Xerox in 1982, which uses a standard known as csma/ The access method of the CD. The standard set of 802.3 (which is also defined in 802.2) provided by IEEE802 also provides a CSMA/CD standard. These two standards are slightly different, and the TCP/IP protocol handles this situation as follows:

    • IP Datagram Encapsulation for Ethernet is defined in RFC894, while the IP datagram of the IEEE802 network is encapsulated in RFC1042.
    • A host must be able to send and receive RFC894-defined datagrams.
    • A host can receive mixed datagrams in the encapsulated format of RFC894 and RFC1042.
    • A host may be able to send RFC1042 datagrams. If the host can send two types of grouped data at the same time, the packets sent must be set up, and the default condition must be RFC 894 grouping.

Visible, RFC1042 in TCP/IP inside a supporting role in the status. Please refer to the teaching materials for these two different data-reporting formats.

PPP (Point-to-Point protocol) is a replacement from slip. They all offer a low-speed access solution. Each data link layer protocol has an MTU (maximum transmission Unit) definition, under which the IP datagram is too large to be fragmented (fragmentation) so that each slice is less than the MTU, noting that the MTU of PPP is not a physical definition, It refers to a logical definition (which is considered by the individual to be programmed). You can use Netstat to print out the MTU results, such as typing netstat-in

It is possible to observe that the MTU of Eth0 is 1500. The MTU of the LO (loopback interface) is 16436.

Finally, say the loopback interface (loopback). Usually we use 127.0.0.1来 try your own machine server so that it doesn't work. This is the loopback interface to go. For loopback interfaces, there are three points worth noting:

    • Any data passed to the loopback address (typically 127.0.0.1) is entered as I p.
    • A copy of the datagram transmitted to the broadcast address or multicast address is sent to the loopback interface and then to the Ethernet. This is because the definition of broadcast delivery and multicast delivery contains the host itself.
    • Any data passed to the host IP address is sent to the loopback interface.

This chapter is still very simple, generally as knowledge is enough, there is no need to dig so detailed.

TCP/IP Detailed learning notes (2)-Data link layer

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.