Host-to-Host Communication and Address Resolution

on a Single Wire – Ciscco Certifed Support Technici Once all the hosts connected to a single segment have physical and interface addresses, they can begin to communicate. Figure

3-4 will be used to explain the process.

Figure 3-4 Host-to-Host Communication

In the figure, each of these hosts has two addresses: a physical address and an interface address. Host A could send packets destined to host D to the correct interface address and the broadcast physical address. Host D would certainly receive and process the packet in this case, but host B would need to receive the packet, examine it, determine it does not need to accept or process the packet, and then discard it. If every host on the segment must receive and process every packet—even if the processing is just to discard the packet—this would be a huge waste of resources.

It is much more efficient if host A can send packets to host D’s correct interface and physical addresses. To do this, however, A must know the relationship between these two addresses; itmust resolve host D’s interface address to a physical address reachable on this segment.

IPv4 and IPv6 use different address resolution techniques.

IPv4 Address Resolution

If A, B, and D are running IPv4, the Address Resolution Protocol (ARP) is used to map physical to interface addresses. When host A wants to send a packet to D:

1.  Host A examines its local ARP cache to see whether it already knows the physical and interface addresses for D.

2.  Given A does not have an existing mapping, it will send an ARP request to the physical broadcast address, so both B and D receive this packet.

3.  The ARP request will have host D’s interface address in the Target Protocol Address field of the ARP packet and host A’s physical address in the Sender Hardware Address field.

4.  When B receives this packet, it will determine its local interface address does not match the target protocol address, so it will discard the ARP packet.

5.  When D receives this packet, it will determine its local interface address matches the target protocol address, so it will build a response.

6.  In its response, host D will include its interface address in the Sender Protocol Address field, and the physical address for the correct interface in the sender hardware address field.

When A receives this response, it can add the mapping between D’s interface and physical addresses, allowing it to send unicast packets to D.

ARP can also be used to notify all the hosts on a segment about an address change or to announce the connection of a new host to the segment. This is called a gratuitous ARP because it is an ARP response that does not correspond to any ARP request.

Most hosts will send a gratuitous ARP when they connect to a segment so that all the other hosts will have their interface to physical address mapping in their local cache, saving time and effort in transmitting packets.

Duplicate Address Detection is another function of ARP in an IPv4 network. A host can send an ARP probe to determine whether any host on the segment is already using an IP address.

If the host does not receive an answer, it can assume the IP address is not in use.