Static ARP entries are commonly used to administratively define Layer 3 to Layer 2 mappings. This lab will discuss and demonstrate the configuration and verification of static ARP entries.
In order to ensure layer three to layer two communication, a switch or router needs to have an ARP table, this table is a local table that contains ip addresses and their matching associated MAC addresses.
Lets say for example R1 needs to communicate with R2. R1 will first send an ARP request thus requesting the MAC address of R2’s IP address (10.1.1.2/24) and once it receives a reply the information will be placed into R1’s ARP table. Now R1 knows the destination MAC address to use in the frame(s) when sending traffic destined to 10.1.1.2
R1 sends a packet with the destination IP and MAC address of R2, when the local switch receives the frame, it looks at the destination MAC address and looks up the MAC address in the cam table (also known as mac-address table). When it finds the matching MAC address and associated switch port and then forwards the frame out the correct port to get to the destination MAC address.
However, sometimes ARP is not always reliable and in some special scenarios routers and/or switches cannot learn the MAC address of a directly or indirectly connected host. Such as a virtual machine or a host that does not reply to ARP request for whatever reason. In this case a static ARP entry is necessary to ensure efficient layer two communications.
Due to basic switch operation, if a frame destined to a MAC address that does not appear in the MAC address table on the switch, the switch will then forward the frame out all interfaces in the layer two domain (VLAN) except the port in which the frame was received on. This results in higher resource utilization and a non-optimal switching topology.
In this lab you will familiarize yourself with the following commands;
|arp ip.ip.ip.ip 0123.4567.89ab arpa||This command when executed in global configuration mode injects a static ARP entry into the ARP/MAC Address table.|
|show arp||This command can be executed in user or privileged mode to view the current ARP table on a Cisco device.|
Step 1. – Configure a static ARP entry on R1 with the IP address 10.1.1.25 and the mac address 00ac.a1f3.01ab
When configuring a static ARP entry you use the command arp x.x.x.x 0000.0000.000 arpa command in global configuration as shown below;
R1 con0 is now available Press RETURN to get started. R1>enable R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)#arp 10.1.1.25 00ac.a1f3.01ab arpa R1(config)#end R1#
ARPA stands for Advanced Research Projects Agency for those who are curious as to what arpa stands for at the end of the static ARP statement. ARPA developed the Ethernet II frame which is currently used by the Internet Protocol.
Step 2. – Verify the ARP entry is correct by using the command show arp as shown below;
R1#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 10.1.1.1 - ca00.0d78.0008 ARPA FastEthernet0/0 Internet 10.1.1.25 - 00ac.a1f3.01ab ARPA R1#
Now when R1 sends traffic destined to 10.1.1.25 it will use the MAC address of 00ac.a1f3.01ab regardless. Even if it R1 receives ARP responses for 10.1.1.25 with a different MAC address. Static ARP entries are more preferred as they are administratively added.