No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S1720, S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Common Operation Guide

This document describes the CLI-based configurations of universal protocols and common features for Huawei switches on basic networks.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Static ARP Entries

Configuring Static ARP Entries

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

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  
Translation
Download
Updated: 2018-09-03

Document ID: EDOC1000057410

Views: 90054

Downloads: 12204

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next