There are three main purposes of the data link layer:
- Send and receive IP datagrams for IP modules.
- Send ARP request and accept ARP reply for ARP module;
- Send RARP requests and RARP responses for Rarp.
The ARP protocol here is mainly used to resolve the 32bit IP address to the corresponding 48bit (Ethernet) MAC address (hardware address). The RARP protocol resolves the hardware address to an IP address, which, like the IP datagram, has its own Ethernet data frame type (i.e., a corresponding Mac frame is added to the Ethernet network).
ARP attacks in local area networks implement ARP spoofing by forging IP addresses and MAC addresses. Can generate a large amount of ARP traffic in the network, causing the network to jam.
TCP/IP supports a number of different data link protocols, depending on the hardware used by the network, such as Ethernet, Token Ring network, FDDI, RS-232 serial line, and so on, today TCP/IP uses the main local network technology is Ethernet.
Maximum Transmission Unit MTU: The network in the data link layer has a limit on the length of the data frame, and the MTU values of different networks are different. The Ethernet that is used frequently is 1500 bytes. Some other networks have MTU byte values such as the following table:
The MTU is primarily intended to limit the value of the maximum IP datagram for a single transmission, assuming that the IP layer has a datagram to pass. And the data yield is larger than the MTU of the data link layer. The IP datagram needs to be fragmented so that each piece is smaller than the MTU.
path Myu: when two hosts on the same network communicate with each other, the MTU of the network is important, but it is assumed that the communication between the two hosts passes through multiple networks. And each network's link layer may have different MTU, at this point. The most important consideration is the minimum MTU of each network in the two communication host paths, which is called the Path MTU. Path MTU between two hosts must be a constant, depending on the route selected at the time, and the routing is not necessarily symmetric, i.e. the route from A to B is different from the route B through a. Therefore, the path MTU is not necessarily consistent in two directions.
"Network protocol" data Link layer