The most common networking protocols are as follows:
- TCP
- UDP
- ARP
TCP and UDP functionality has already been analyzed, so we will focus on the ARP protocol in this section.
ARP
Address Resolution Protocol (ARP) is a network protocol that allows hosts to learn the Layer 2 address of a device it wants to communicate with by sending a query based on the Layer 3 address of the specific device.
When a host wants to communicate on the network, it does this by having Layer 3 information about the destination device (this may have been learned from a DNS query). In order to send the packet over the communication channel, the host/PC must first use the local Layer 2 address of the destination device and it does this by sending an ARP Request, as follows:
- The PC determines it needs to know the Layer 2 address of a network device (usually the default gateway, which is often a router).
- The PC broadcasts an ARP Request on the wire.
- The switch receives the Broadcast ARP packet and forwards it to all other ports.
- The destination device (router) receives the message, identifies itself in the Destination field, and sends an ARP Reply with its Layer 2 address.
- The PC now knows the router MAC address so it can properly encapsulate Unicast frames toward that device.
Figure 5.21 below exemplifies the ARP Request/Reply behavior:
Figure 5.21 – ARP Process
As depicted in Figure 5.21 above, the process starts with the source device sending a Broadcast ARP Request packet, which contains the IP address of the destination device. The destination device sends a Unicast response back to the source, which contains its own source MAC address, thus offering the missing information.
| Note: On a Windows PC, you can see all known Layer 2 addresses using the arp -a command in a command prompt terminal. This command lists the ARP cache of the machine, which hosts all Layer 3-to-Layer 2 associations for a determined period in order to quickly reuse them without sending further ARP Requests.
|
[CL1]This figure should rename ICMP echo request/reply with ARP Request/Reply.
