Arp table – H3C Technologies H3C S12500 Series Switches User Manual

Page 16

Advertising
background image

2

1.

Host A looks in its ARP table to see whether there is an ARP entry for Host B. If yes, Host A uses the

MAC address in the entry to encapsulate the IP packet into a data link layer frame and sends the
frame to Host B.

2.

If Host A finds no entry for Host B, Host A buffers the packet and broadcasts an ARP request using
the following information:

{

Sender IP address and sender MAC address—Host A's IP address and MAC address

{

Target IP address—Host B's IP address

{

Target MAC address—An all-zero MAC address

Because the ARP request is broadcast, all hosts on this subnet can receive the request, but only the
requested host (Host B) will process the request.

3.

Host B compares its own IP address with the target IP address in the ARP request. If they are the
same, Host B:

a.

Adds the sender IP address and sender MAC address to its ARP table.

b.

Encapsulates its MAC address into an ARP reply.

c.

Unicasts the reply to Host A.

4.

After receiving the ARP reply, Host A:

a.

Adds the MAC address of Host B to its ARP table.

b.

Encapsulates the MAC address into the packet and sends it to Host B.

Figure 2 ARP address resolution process

If Host A and Host B are not on the same subnet:

5.

Host A sends an ARP request to the gateway. The target IP address in the ARP request is the IP

address of the gateway.

6.

After obtaining the MAC address of the gateway from an ARP reply, Host A sends the packet to the
gateway.

7.

If the gateway maintains the ARP entry of Host B, it forwards the packet to Host B directly. If not,
it broadcasts an ARP request, in which the target IP address is the IP address of Host B.

8.

After obtaining the MAC address of Host B, the gateway sends the packet to Host B.

ARP table

After obtaining the destination MAC address, the switch adds the IP-to-MAC mapping into its own ARP
table. This mapping is used for forwarding packets with the same destination in future.

Advertising