Example for Configuring Static ARP
This example provides an example for configuring static ARP.
Networking Requirements
ARP is a basic link layer protocol that maps devices' IP addresses to MAC addresses. ARP is simple to use but does not have any security guarantee. Attackers may send forged ARP packets to attack networks, interrupting normal services or even breaking devices down. Therefore, carriers want to enhance backbone network security.
As shown in Figure 2-1, hosts connect to the backbone network through Routers. To protect the devices on the backbone network against ARP attacks and ensure stable data transmission, configure static ARP on Routers.
Configuration Roadmap
The configuration roadmap is to configure static ARP entries on Routers. These entries will not be aged or overwritten by dynamic ARP entries so that user data can be stably transmitted.
Data Preparation
To complete the configuration, you need IP addresses and MAC addresses between which mappings need to be set up.
Procedure
- Configure static ARP entries on Device A. Repeat this step for Device B. For configuration details, see Configuration Files in this section.
<HUAWEI> system-view
[~HUAWEI] sysname DeviceA
[*HUAWEI] commit
[~DeviceA] arp static 10.1.1.1 0000-0a41-0200
[*DeviceA] arp static 10.1.1.2 0000-0a41-0202
[*DeviceA] arp static 10.1.1.3 0000-0a41-0204
[*DeviceA] commit
- Verify the configuration.# Run the display arp all command on Device A to check configured ARP entries.
<DeviceA> display arp all
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC ------------------------------------------------------------------------------ 10.1.1.1 0000-0a41-0200 S-- 10.1.1.2 0000-0a41-0202 S-- 10.1.1.3 0000-0a41-0204 S-- ------------------------------------------------------------------------------ Total:3 Dynamic:0 Static:3 Interface:0 Redirect:0
Configuration Files
Device A configuration file
#
sysname DeviceA
#
arp static 10.1.1.1 0000-0a41-0200 arp static 10.1.1.2 0000-0a41-0202 arp static 10.1.1.3 0000-0a41-0204
#
return
Device B configuration file
#
sysname DeviceB
#
arp static 10.1.2.1 0000-0a41-0300 arp static 10.1.2.2 0000-0a41-0302 arp static 10.1.2.3 0000-0a41-0304
#
return