Читать книгу CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper, David Higby Clinton - Страница 38

Address Resolution Protocol

Оглавление

Most devices with an IP address—including workstations, servers, routers, and switches—maintain an ARP cache to store ARP replies. The purpose of the ARP cache is to avoid having to send an ARP request every time the node needs to resolve an IP address to a MAC address.

When a node needs to resolve the MAC address of an IP address not in its ARP cache, it sends an ARP request to the broadcast address (FFFF.FFFF.FFFF). Upon receiving a reply, it stores the mapping in its ARP cache. The following example illustrates the process using two switches:

 SW3 has a switched virtual interface (SVI) in VLAN 20 with an IP address of 10.10.20.3.

 SW4 has an SVI also in VLAN 20 with an IP address of 10.10.20.4.

SW3:

! Show the ARP cache on SW3 SW3#show arp dynamic Protocol Address Age (min) Hardware Addr Type Interface Internet 10.10.10.4 0 0c3c.8ad7.800a ARPA Vlan10 ! Trigger an ARP request for 10.10.20.4 by sending a ping to it SW3#ping 10.10.20.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.20.4, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 10/10/10 ms ! The ping succeeded, implying an ARP reply was received. Show the ARP cache again. SW3#show arp dynamic Protocol Address Age (min) Hardware Addr Type Interface Internet 10.10.10.4 0 0c3c.8ad7.800a ARPA Vlan10 Internet 10.10.20.4 0 0c3c.8ad7.8014 ARPA Vlan20

SW4:

! ARP Snooping debugging has been enabled on SW4. Note the destination broadcast ! address. SW4# ARP Packet (Gi1/0/20) Src: 0c3c.8aab.8014, Dst: ffff.ffff.ffff, SM: 0c3c.8aab.8014, SI: 10.10.20.3, TM: ffff.ffff.ffff, TI: 10.10.20.3 Packet bridged by platform. ARP Packet (Gi1/1/20) Src: 0c3c.8aab.8014, Dst: ffff.ffff.ffff, SM: 0c3c.8aab.8014, SI: 10.10.20.3, TM: ffff.ffff.ffff, TI: 10.10.20.3 Packet bridged by platform. ! Although not shown in the output, SW4's ARP reply is addressed to SW3's ! SVI MAC address.

The default timeout for an ARP entry is 4 hours. You can modify this on a per-interface basis, as shown on SW3:

SW3#show interfaces vlan 20 | i ARP Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 SW3#configure terminal Enter configuration commands, one per line. End with CNTL/Z. SW3(config)#interface vlan 20 SW3(config-if)#arp timeout ? <0-2147483> Seconds

You'll hear disagreement as to whether ARP is a layer 2 or layer 3 protocol, some even going so far as to call it a layer 2.5 protocol! ARP packets fit the definition of what the OSI model calls protocol control information. In addition to just providing a mapping between MAC and IP addresses, the fact that a node sends ARP packets indicates its willingness to use IP. In that respect, ARP is decidedly a layer 2 protocol.

CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies

Подняться наверх