(TCP/IP Volume i) Arp,rarp Address Resolution Protocol

Source: Internet
Author: User

Concept

Data links, such as Ethernet, have their own addressing mechanisms (often 48bit addresses), which must be adhered to by the network layer using the data link. That is, you send the Ethernet is a 32-bit IP address, but through the Ethernet to another host when it is transmitted with a 48-bit Ethernet address, so it is necessary to use the ARP Address Resolution Protocol and RARP reverse address Resolution Protocol.

ARP provides dynamic mapping between the IP address and the corresponding hardware address.
RARP is used by systems that do not have a disk drive, which requires a system administrator to manually set it up.

Process

For example, it has passed through the upper transport layer and the network layer, and now sends a copy of the IP datagram to the link layer. If the destination host is local, then the IP datagram can be sent directly to the destination host, and if the destination host is in a remote network, then the IP routing function is used to determine the next station router address on the local network and forward. In both cases, the IP datagram is sent to a host or router located on the local network.
Assuming Ethernet, the sending host must transform the 32bit IP address into a 48bit Ethernet address. Translation is required from the logical Internet address to the corresponding physical hardware address, which is the ARP feature.
The ARP then sends an ARP request with the destination IP address of the Ethernet data frame to each host on the Ethernet. That is broadcasting.
All received hosts begin to recognize the IP address of this ARP request, and if not themselves, ignore it and, if it is themselves, send an ARP response.
When an ARP reply is received, the ARP is requested – the IP datagram that answers the interchange can now be delivered to the destination host.

Here's a look at the packet format for ARP request/reply:

The destination address is a broadcast address for all 1, and all Ethernet interfaces on the cable will receive the broadcast data frame. The frame type identifies the data type that is followed by the ARP field 0x086. OP indicates the type of operation of the frame, which belongs to the ARP request, answer, or RARP request. Response.

The key to efficient ARP operation is that there is an ARP cache on each host that stores the mappings between the used Internet addresses and the hardware addresses. Can be viewed using the ARP-A command.

Free ARP

The difference between the free ARP message and the ordinary ARP request message is that the ordinary ARP request message, the "Destination IP address" in the ARP package is the IP address of the other machine, and the request message of the free ARP, the "Destination IP address" in the ARP package is its own IP address.

The role of free ARP:

There are two types of free ARP currently in effect:
The first is what is said above to announce the role of the broadcast, to tell the entire broadcast domain, the current IP corresponding to the MAC address is what.
The second is to see if there are other hosts in the broadcast domain using their own IP, and if so, the word "IP conflict" pops up on the interface. Ordinary ARP Request message broadcast sent out, all hosts in the broadcast domain received, the computer system to determine the ARP request message in the Destination IP address field, if the discovery and the IP address of the same machine, then the MAC address of their own to fill in the message to the destination MAC address field, and send the message back to the source host. So as long as the host sending the ARP request receives the message, it proves that there are other hosts in the broadcast domain using the same IP address as themselves (this does not take into account the ARP proxy problem of the router). Free ARP messages sent out are not expected to receive a response, only hope is the role of the Declaration, if a response is received, prove that the other side also use the IP address of their current use.

RARP

The RARP protocol is used by many diskless systems to obtain IP addresses at boot time.

diskless system, which refers to a LAN composed of diskless workstations. The diskless workstation can start and run the operating system without any external memory (floppy drive, hard disk, CD-ROM, etc.) support relative to the normal PC. In order to support such a network architecture, a specialized software system is required, and such software becomes one of the components of the entire diskless system.

Difference:

ARP Frame Type code: 0x08086 rarp:0x8035

For RARP, the RARP request is broadcast, and the RARP response is unicast.

Each system on the network has a unique hardware address, which is configured by the network interface manufacturer. The RARP implementation of diskless systems is to read a unique hardware address from the interface card and then send a RARP request requesting the IP address of a host to respond to the diskless system.

The complexity of the RARP server is that the server typically provides a mapping of the hardware address to the IP address for multiple hosts (all diskless systems on the network). This mapping is included in file/etc/ethers, because the kernel does not normally read and parse disk files, so the RARP server functionality is provided by the user process rather than as part of the kernel TCP/IP implementation.

A complication of the RARP server implementation is that the RARP request is broadcast on the hardware layer. This means they are not forwarded by the router. In order for diskless systems to boot in the state of the RARP server shutdown, it is often necessary to provide multiple RARP servers on a single 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.