Common ARP Operations : Configuring Static ARP Entries

Latest reply: Jun 30, 2016 04:24:08 2515 2 0 0

Static ARP entries will not age and cannot be overridden by dynamic ARP entries. You can manually configure a static ARP entry, or use automatic scanning and fixed ARP to batch configure static ARP entries.

Manually Configuring a Static ARP Entry

Common ARP Operations : Configuring Static ARP Entries-1839241-1 NOTE:

If the outbound interface is an Ethernet interface in Layer 2 mode, you are advised to configure a long static ARP entry. Specify the VLAN and outbound interface when configuring the entry.

# Configure a static ARP entry with the IP address 172.16.10.2, MAC address 0023-0045-0067, and outbound interface GE1/0/1 in Layer 2 mode. This static ARP entry belongs to VLAN 100.

<HUAWEI> system-view
[HUAWEI] vlan batch 100
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ip address 172.16.10.1 24 //The IP address of the VLANIF interface must be in the same network segment with the IP address (172.16.10.2) in the static ARP entry.
[HUAWEI-Vlanif100] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type trunk
[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 //The interface GigabitEthernet1/0/1 is in Layer 2 mode and needs to be added to VLAN 100.
[HUAWEI-GigabitEthernet1/0/1] quit
[HUAWEI] arp static 172.16.10.2 0023-0045-0067 vid 100 interface gigabitethernet 1/0/1

# Configure a static ARP entry with the IP address 172.16.20.2, MAC address 0023-0045-0068, and outbound interface GE1/0/2 in Layer 3 mode.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/2
[HUAWEI-GigabitEthernet1/0/2] undo portswitch
[HUAWEI-GigabitEthernet1/0/2] ip address 172.16.20.1 24 //The IP address of GigabitEthernet1/0/2 must be in the same network segment with the IP address (172.16.20.2) in the static ARP entry.
[HUAWEI-GigabitEthernet1/0/2] quit
[HUAWEI] arp static 172.16.20.2 0023-0045-0068 interface gigabitethernet 1/0/2

# Configure a static ARP entry with the IP address 172.16.30.2 and MAC address 0023-0045-0069. This static ARP entry belongs to the VPN instance vpn1.

<HUAWEI> system-view
[HUAWEI] ip vpn-instance vpn1
[HUAWEI-vpn-instance-vpn1] ipv4-family
[HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[HUAWEI-vpn-instance-vpn1] quit
[HUAWEI] arp static 172.16.30.2 0023-0045-0069 vpn-instance vpn1

# Configure a static ARP entry with the IP address 172.16.40.2 and MAC address 02bf-0045-0070. (For example, you can configure such short static ARP entry when the device is connected to the NLB server cluster in multi-port ARP mode.)

<HUAWEI> system-view
[HUAWEI] arp static 172.16.40.2 02bf-0045-0070

Using Automatic Scanning and Fixed ARP to Batch Configure Static ARP Entries

# The IP address of VLANIF 103 is 172.16.50.1/24. Perform automatic scanning on the ARP entries with the IP addresses 172.16.50.2 to 172.16.50.4, and convert the learned ARP entries into static ARP entries.

<HUAWEI> system-view
[HUAWEI] vlan batch 103
[HUAWEI] interface vlanif 103
[HUAWEI-Vlanif103] ip address 172.16.50.1 24
[HUAWEI-Vlanif103] quit
[HUAWEI] interface gigabitethernet 1/0/3
[HUAWEI-GigabitEthernet1/0/3] port link-type trunk
[HUAWEI-GigabitEthernet1/0/3] port trunk allow-pass vlan 103
[HUAWEI-GigabitEthernet1/0/3] quit
[HUAWEI] display arp network 172.16.50.0 24
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                                      
                                          VLAN/CEVLAN                                                                               
------------------------------------------------------------------------------                                                      
172.16.50.1     00e0-0987-7895            I -         Vlanif103                                                                     
------------------------------------------------------------------------------                                                      
Total:1         Dynamic:0       Static:0     Interface:1   
[HUAWEI] interface vlanif 103
[HUAWEI-Vlanif103] arp scan 172.16.50.2 to 172.16.50.4 //Automatic scanning is performed on VLANIF 103. The IP addresses 172.16.50.2 to 172.16.50.4 are in the same network segment with the IP address 172.16.50.1 of VLANIF 103. That is, the start and end IP addresses in the ARP automatically scanned area must be in the same network segment with the IP address (primary or secondary) of the VLANIF interface.
Warning: This operation may take a long time, press CTRL+C to break. Continue?[Y/N]:y                                               
Processing...                                                                                                                       
Info: ARP scanning is completed.   
[HUAWEI-Vlanif103] display arp network 172.16.50.0 24 //After automatic scanning, check ARP entries. The device newly learns three 3 dynamic ARP entries.
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                                      
                                          VLAN/CEVLAN                                                                               
------------------------------------------------------------------------------                                                      
172.16.50.1     00e0-0987-7895            I -         Vlanif103                                                                     
172.16.50.2     0200-0000-0212  20        D-0         GE1/0/3                                                                      
                                           103/-                                                                                    
172.16.50.3     0200-0000-0212  20        D-0         GE1/0/3                                                                      
                                           103/-                                                                                    
172.16.50.4     0200-0000-0212  20        D-0         GE1/0/3                                                                      
                                           103/-                                                                                    
------------------------------------------------------------------------------                                                      
Total:4         Dynamic:3       Static:0     Interface:1      
[HUAWEI-Vlanif103] arp fixup //Configure fixed ARP entries on VLANIF 103 by converting dynamic ARP entries learned into static ARP entries.
Warning: This operation may generate configuration of static ARP, and take a long time, press CTRL+C to break. Continue?[Y/N]:y     
Processing...                                                                                                                       
Info: ARP fixup is completed.    
[HUAWEI-Vlanif103] display arp network 172.16.50.0 24 //Check fixed ARP entries. The three dynamic ARP entries that newly learned by the device have been converted into static ARP entries.
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                                      
                                          VLAN/CEVLAN                                                                               
------------------------------------------------------------------------------                                                      
172.16.50.2     0200-0000-0212            S--         GE1/0/3          
                                           103/-                                                                                    
172.16.50.3     0200-0000-0212            S--         GE1/0/3             
                                           103/-                                                                                    
172.16.50.4     0200-0000-0212            S--         GE1/0/3       
                                           103/-                                                                                    
172.16.50.1     00e0-0987-7895            I -         Vlanif103                                                                     
------------------------------------------------------------------------------                                                      
Total:4         Dynamic:0       Static:3     Interface:1  

 

  • x
  • convention:

user_1763575
Created Jun 30, 2016 01:09:43 Helpful(0) Helpful(0)

Thank you.
  • x
  • convention:

user_235153
Created Jun 30, 2016 04:24:08 Helpful(0) Helpful(0)

感谢分享。
  • x
  • convention:

Comment

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login