4.1. Configuring Arp
Overview
Function Introduction
The Address Resolution Protocol (ARP) is a protocol used to dynamically map between Internet host addresses and Ethernet addresses. ARP caches Internet-Ethernet address mappings. When an interface requests a mapping for an address not in the cache, ARP queues the message, which requires the mapping, and broadcasts a message on the associated network requesting the address mapping. If a response is provided, the new mapping is cached and any pending message is transmitted. ARP will queue at most one packet while waiting for a response to a mapping request; only the most recently transmitted packet is kept. If the target host does not respond after 3 requests, the host is considered to be down, allowing an error to be returned to transmission attempts during this interval. If a target host does not send message for a period (normally one hour), the host is considered to be uncertainty, and several requests (normally 6, 3 unicast and 3 broadcast) will send to the host before delete the ARP entry. ARP entries may be added, deleted or changed manually. Manually added entries may be temporary or permanent.
Principle Description
N/A
Configuration
In this configuration example, interface eth-0-1 assigned with address 11.11.11.1/24, on subnet 11.11.11.0/24, there are two hosts, and their IP addresses are 11.11.11.2, 11.11.11.3, MAC address are 0058-3F11-eca2, 0058-3F11-eca3. ARP entry of host 11.11.11.2 is added manually, the entry of host 11.11.11.3 is added dynamically. Time-out period of ARP entries for interface eth-0-1 configure to 20 minutes, ARP request retry delay on interface eth-0-1 configure to 2 seconds.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Configure the layer 3 interface and set the ip address
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip address 11.11.11.1/24
step 3 Configure arp aging timeout value and the arp retry interval value
Switch(config-if)# arp timeout 1200
Switch(config-if)# arp retry-interval 2
Switch(config-if)# exit
step 4 Add a static arp entry
Switch(config)# arp 11.11.11.2 1a.a011.eca2
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Use the following command to display the information of the arp entry:
Switch# show ip arp
Protocol Address Age (min) Hardware Addr Interface
Internet 11.11.11.2 - 0058.3f11.eca2 eth-0-1
Switch# show ip arp summary
1 IP ARP entries, with 0 of them incomplete
(Static:0, Dyamic:0, Interface:1)
ARP Pkt Received is: 0
ARP Pkt Send number is: 0
ARP Pkt Dicard number is: 0
Use the following command to display the information of the arp configurations on the interface:
Switch# show interface eth-0-1
Interface eth-0-1
Interface current state: Administratively DOWN
Hardware is Ethernet, address is 6c02.530c.2300 (bia 6c02.530c.2300)
Bandwidth 1000000 kbits
Index 1 , Metric 1 , Encapsulation ARPA
Speed - Auto , Duplex - Auto , Media type is 1000BASE_T
Link speed type is autonegotiation, Link duplex type is autonegotiation
Input flow-control is off, output flow-control is off
The Maximum Frame Size is 1534 bytes
VRF binding: not bound
Label switching is disabled
No virtual circuit configured
VRRP master of : VRRP is not configured on this interface
ARP timeout 00:20:00, ARP retry interval 2s
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 unicast, 0 broadcast, 0 multicast
0 runts, 0 giants, 0 input errors, 0 CRC
0 frame, 0 overrun, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes
Transmitted 0 unicast, 0 broadcast, 0 multicast
0 underruns, 0 output errors, 0 pause output
Application cases
N/A