Last Updated on August 7, 2021 by Admin 3
What is the purpose of using the show arp command?
- To view the ARP statistics only for a particular interface
- To view details regarding neighboring devices discovered by ARP
- To view global ARP information such as timer and hold time
- To view the Address Resolution Protocol (ARP) cache
The show arp command is used to view the Address Resolution Protocol (ARP) cache. ARP is used by the Internet Protocol (IP) to find the Media Access Control (MAC) address or the hardware address of a host. The main function of ARP is to translate IP addresses to MAC addresses. The process of obtaining the address of a computer in the network is known as address resolution. This process is accomplished by sending an ARP packet from a source to a destination host. The destination host responds to the ARP packet by replying back to the source and including its own MAC address. Once the source host receives the reply, it will update its ARP cache with the new MAC address.
The complete syntax of the show arp command is:
show arp [ip-address [locationnode-id] | hardware-address [locationnode-id] | traffic [locationnode-id | interface-instance] | trace [error [locationnode-id] | dev [locationnode-id] | events [locationnode-id] table [locationnode-id] packets [locationnode-id] | [locationnode-id]] | type instance| [locationnode-id]
The following is a brief description of the parameters used with this command:
ip-address: An optional parameter that displays specific ARP entries.
locationnode-id: An optional parameter that displays the ARP entry for a specific location. The method for entering the node-id argument is rack/slot/module notation.
hardware-address: An optional parameter that displays ARP entries that match the 48-bit MAC address.
traffic: An optional parameter that displays ARP traffic statistics.
interface instance: Either a physical interface instance or a virtual interface instance:
Physical interface instance: the naming notation is rack/slot/module/port and a slash mark between values is required as part of the notation where:
rack refers to the chassis number of the rack.
slot refers to the physical slot number of the line card.
module refers to the module number. A physical layer interface module (PLIM) is always 0.
port refers to the physical port number of the interface.
Virtual interface instance: the number range is variable depending on the type of interface.
trace: An optional parameter that displays the ARP entries in the buffer.
error: An optional parameter that displays the ARP error logs.
dev: An optional parameter that displays the ARP internal logs.
events: An optional parameter that displays the ARP events logs.
table: An optional parameter that displays the ARP cache logs.
packets: An optional parameter that displays the ARP packet receive and reply logs.
type instance: An optional parameter that specifies the interface for which you want to view the ARP cache.
An example of the output of the show arp command is shown below along with a diagram of the network in which the router resides.
R1#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 22.214.171.124 120 0000.a710.4baf ARPA FastEthernet 0/1 Internet 126.96.36.199 105 0000.a710.859b ARPA FastEthernet 0/1 Internet 188.8.131.52 42 0000.a710.68cd ARPA FastEthernet 0/0 Internet 184.108.40.206 59 0000.0c01.7bbd ARPA FastEthernet 0/0
From the information above, we can make the following conclusions about the actions R1 will take when it receives data from PC1 destined for the Web server:
– The data frames will be forwarded out the Fa0/0 interface of R1
– R1 will place the MAC address of the Web Server (0000.0c01.7bbd) in the destination MAC address of the frames
– R1 will put the MAC address if the forwarding Fa0/0 interface (0000.a710.68cd) in the place of the source MAC address
The option stating that the show arp command is used to view the ARP statistics only for a particular interface is incorrect because this command is used to view the ARP cache. You can also view the information for a particular interface with the help of the interface instance parameter.
The options stating that the show arp command is used to view the details of neighboring devices discovered by the ARP or to view global ARP information, such as hold time and timer, are both incorrect because these are both Cisco Discovery protocol (CDP) functions, not ARP functions. The show cdp neighbors detail command is used to display details regarding the neighboring devices that are discovered by CDP, and the show cdp command displays global CDP information, such as timer and hold-time.
Configure, verify, and troubleshoot IPv4 addressing and subnetting