Configuring arp, Overview, Arp message format – H3C Technologies H3C S12500 Series Switches User Manual

Page 15: Arp address resolution process

Advertising
background image

1

Configuring ARP

Overview

The Address Resolution Protocol (ARP) is used to resolve an IP address into a physical address (Ethernet

MAC address, for example).
In an Ethernet LAN, a switch uses ARP to translate the IP address of the next hop to the corresponding

MAC address.

ARP message format

ARP messages are classified into ARP requests and ARP replies.

Figure 1

shows the format of the ARP

request/reply. Numbers in the figure refer to field lengths.

Figure 1 ARP message format

An ARP message contains the following fields:

Hardware type—The hardware address type. The value 1 represents Ethernet.

Protocol type—The type of the protocol address to be mapped. The hexadecimal value 0x0800
represents IP.

Hardware address length and protocol address length—Length, in bytes, of a hardware address
and a protocol address. For an Ethernet address, the value of the hardware address length field is

6. For an IPv4 address, the value of the protocol address length field is 4.

OP—Operation code. The type of ARP message. The value 1 represents an ARP request and 2

represents an ARP reply.

Sender hardware address—Hardware address of the switch sending the message.

Sender protocol address—Protocol address of the switch sending the message.

Target hardware address—Hardware address of the switch the message is being sent to.

Target protocol address—Protocol address of the switch the message is being sent to.

ARP address resolution process

If Host A and Host B are on the same subnet and Host A sends a packet to Host B:

28-byte ARP request/reply

OP

Sender hardware

address

Sender protocol

address

Target hardware

address

Target protocol

address

Protocol

type

2

2

6

1

4

4

2

6

1

Hardware address length

Protocol address length

Hardware

type

Advertising