Frame Relay Applications: TCP/IP Suite - Page 3
Address Resolution Protocol (ARP)
LAN systems transmit data to one another by wrapping, or encapsulating, the payload in a LAN frame whose header contains the Media Access Control (MAC) address of the destination's LAN host network interface card (NIC). A LAN system cannot communicate with a neighbor until it has discovered this neighbor's MAC address. The discovery method used is set by the procedures outlined in the Address Resolution Protocol (ARP).
To send an IP datagram to a particular IP address, the network driver must have a method to find out whether the IP address belongs to a computer on the network. If the IP address does belong to a computer on the network, the driver must know the hardware address of the computer to transmit the packet over the network. This is accomplished in Ethernet-type devices using an Internet protocol called the Address Resolution Protocol (ARP). This protocol is described in detail in RFC 826.
Figure 15-19 illustrates how ARP operates in an IP network. Host A, with an IP address of 220.127.116.11, wants to establish a connection with Server A, with an IP address of 18.104.22.168. Host A will broadcast an ARP query message across the medium asking the system, or host, with IP address 22.214.171.124 to respond. Server A replies to the ARP query providing its Layer 2 MAC address. In this example, the MAC address is 00-60-08-BF-4C-3E.
Host A maintains an Ethernet MAC table that records the Layer 3 Network (IP) address with its associated Layer 2 (MAC) address. In this example, Host A's ARP table would look something similar to Table 15-9.
Table 15-9: Host A ARP Table
|IP Address||MAC Address|
NOTE: The ARP table can be viewed from any host by entering the command arp at a DOS prompt:
C:\>arpthen it displays and modifies the IP-to-Physical address translation tables used by ARP:
ARP -s inet_addr eth_addr [if_addr] ARP -d inet_addr [if_addr] ARP -a [inet_addr] [-N if_addr] -a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. -g Same as -a. inet_addr Specifies an Internet address. -N if_addr Displays the ARP entries for the network interface specified by if_addr. -d Deletes the host specified by inet_addr. inet_addr can be wildcarded with * to delete all hosts. -s Adds the host and associates the Internet address inet_addr with the physical address eth_addr. The physical address is given as six hexadecimal bytes separated by hyphens. The entry is permanent. eth_addr Specifies a physical address. if_addr If present, this specifies the Internet address of the interface whose address translation table should be modified. If not present, the first applicable interface will be used. Example: > arp -s 126.96.36.199 00-aa-00-62-c6-09 .... Adds a static entry. > arp -a .... Displays the arp table.
Server A, upon receipt of the ARP query, will place the MAC address of Host A into its ARP table.