ARP for TCP/IP Study Notes)

Source: Internet
Author: User


ARP (Address Resolution Protocol) I. Introduction when a host sends an Ethernet data frame to another host located on the same LAN, the destination interface (physical address) is determined based on the 48-bit ethernet address ). The device driver never checks the destination I p address in the I P datagram. Address Resolution provides ing for these two different address formats: 32-bit I P addresses and any type of addresses used by the data link layer. The difference between www.2cto.com ARP and RARP: ARP provides dynamic ing between IP addresses and corresponding hardware addresses. This process is automatically completed. Generally, application users or system administrators do not have to worry about it. RARP is used by systems that do not have a disk drive (generally a diskless workstation or X terminal). It needs to be manually set by the system administrator. Note: There is a basic concept behind ARP, that is, the network interface has a hardware address (a 48-bit value that identifies different Ethernet or ring-based network interfaces ). The correct interface address must be provided for data frame exchange at the hardware level. However, TCP/IP has its own address: 32 bit IP address. Knowing the Host IP address does not allow the kernel to send a frame of data to the host. The kernel (such as the Ethernet driver) must know the destination hardware address to send data. ARP provides dynamic ing between 32-bit IP addresses and hardware addresses using different network technologies. ARP is not used for point-to-point links. When you set these links (usually during the boot process), you must inform the IP addresses of each end of the kernel link. A hardware address like an ethernet address is not involved. Ii. When the ARP group format is resolved over Ethernet, the format of ARP request and Response Group 1 is shown. (ARP can be used for other types of networks and can be used to resolve addresses other than IP addresses. Specify the type and length of the last four fields following the first four fields of the frame type field ).

(Figure 1) ARP request or response group format for Ethernet ① the destination address of Ethernet occupies 6 bytes, and the special address with the destination address of all 1 is the broadcast address. All Ethernet interfaces on the cable must receive broadcast data frames. Www.2cto.com ② the Ethernet source address occupies 6 bytes. For the physical address of the sender, ③ the frame type occupies 2 bytes, indicating the type of the subsequent data. For ARP requests or responses, the value of this field is 0x0806. ④ The hardware type occupies 2 bytes. The hardware type field indicates the hardware address type. The value 1 indicates the ethernet address. ⑤ The protocol type occupies 2 bytes. The protocol type field indicates the Protocol address type to be mapped. Its value is 0x0800, indicating the IP address. The value is the same as the value of the type field in the Ethernet data frame that contains the IP datagram. ⑥ The length of the hardware address occupies 1 byte, indicating the length of the hardware address, in bytes. For ARP requests or responses of IP addresses over Ethernet, their values are 6. 7. The Protocol address length occupies 1 byte, indicating the Protocol address length, in bytes. For ARP requests or responses of IP addresses over Ethernet, their values are 4. The operation field occupies 1 byte. The operation fields indicate four operation types, which are ARP requests (with a value of 1) and ARP responses (with a value of 2), RARP request (value: 3) and RARP response (value: 4 ). Note: This field is required because the Frame Type Field Values of ARP requests and ARP responses are the same. The ethernet address of the sender occupies 6 bytes, which is consistent with the Ethernet source address. The producer IP address occupies 4 bytes. The destination ethernet address of the worker occupies 6 bytes. The IP address of the destination region occupies 4 bytes. Www.2cto.com remarks: ① both the Ethernet data frame header and the ARP request data frame have the sending hardware address. ② For an ARP request, all fields except the destination hardware address have a fill value. After the system receives an ARP request message from the target machine, it fills in the hardware address and replaces the two Sending addresses with the two destination addresses, set the operation field to 2 and send it back. ③ Because the length of the ARP request or response data frame is 42 bytes (28 bytes of ARP data, 14 bytes of Ethernet frame header, fill characters must be added to each frame to reach the minimum length of Ethernet: 60 bytes. The minimum length of this 60-byte Ethernet frame header contains 14 bytes, but does not include the end of the 4-byte Ethernet frame. Some books set the minimum length to 64 bytes, including the end of an Ethernet frame.

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.