NETWORK Note 4: Huawei commands
# user View
System-view # into the system view
Enter system view, return user view with Ctrl+Z. # enter the system view and return to the user view with Ctrl+Z.
[Huawei] interface Ethernet 0ram 1 # interface view Ethernet: interface type 0Accord 1: the first 0 represents the slot, the second 0 represents the daughter card number, and 1 represents the interface number
[Huawei-Ethernet0/0/1] quit # returns to the previous attempt
[Huawei] ospf # ospt Protocol View
[Huawei-ospf-1]
[Huawei-ospf-1] return # goes back to the user view
[Huawei] sysname Switch # system name switch
[Switch] display version # displays version information
[Switch] display current-configuration # shows the current configuration
[Switch] user-interface console 0 # user interface console 0
[Switch-ui-console0] authentication-mode password # Authentication Mode password
[Switch-ui-console0] set authentication password {simple | cipher} 123 # it is easy to set authentication password | password 123 is simple | choose one of the two passwords!
[Switch] user-interface console 0
[Switch-ui-console0] authentication-mode aaa
[Switch-ui-console0] aaa
[Switch-aaa] local-user huawei password cipher huawei123 # Local user huawei password password huawei123
Info: Add a new user. # Information: add a new user
Save # Save
The current configuration will be written to the device. # the current configuration will be written to the device
Are you sure to continue? # are you sure you want to continue? [y/n]
Save the configuration successfully. # saved the configuration successfully.
Reboot # restart
System will reboot! Continue? [YUnip N]: y # system will restart! Continue [Y / N]: y?
Reset saved-configuration # resets the saved configuration
Warning: The action will delete the saved configuration in the device. # warning: this action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [YUnip N]: y # configuration will be erased to reconfigure. Go ahead? [Y/ N]: Y
Info: Succeeded in clearing the configuration in the device. # Information: successfully erased the configuration in the device.
[Huawei] user-interface console 0
[Huawei-ui-console0] idle-timeout 120 # idle-automatically quit after 120min
[Huawei-ui-console0] screen-length 24 # screen-length 24 displays 24 lines
Display bridge mac-address # displays the bridge (switch) MAC address
Display mac-address # displays the MAC address
[Huawei] lldp enable # LLDP protocol enabled
[Huawei] display lldp neighbor brief # shows an introduction to LLDP neighbors
[Huawei] interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1] undo negotiation auto # undo negotiation automatically
[Huawei-GigabitEthernet0/0/1] duplex {half | full} # Duplex half | full
[Huawei-GigabitEthernet0/0/1] speed {10 | 100 | 1000} # Speed 10 | 100 | 1000 M
[Huawei] interface vlan 1
[Huawei-Vlanif1] ip address 192.168.1.250 255.255.255.0 # IP address 192.168.1.250 255.255.255.0
[Huawei-Vlanif1] undo shutdown # unlock, turn off and enable
System-view
[Huawei] sysname R1
[R1] interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0] ip address 192.168.2.1 255.255.255.0
[R1] ip route-static 192.168.4.0 255.255.255.0 192.168.2.2 # IP routing-static ip route-static destination network ID subnet mask next hop
[R1] ip route-static 0.0.0.0 0.0.0.0 192.168.2.2 # default route or default route!
Display ip routing-table # displays the IP routing table
[Router] user-interface vty 0 4 # remote user login interface
[HuaweiSwitch] vlan 12 # create Vlan12
[HuaweiSwitch-vlan12] description HAHA # describes HAHA (Cisco name)
[HuaweiSwitch] interface GigabitEthernet 0/0/1
[HuaweiSwitch-GigabitEthernet0/0/1] port link-type access # Port Link-Type access
[HuaweiSwitch-GigabitEthernet0/0/1] port default vlan12 # port defaults to vlan12
[HuaweiSwitch3] interface GigabitEthernet 0/0/24
[HuaweiSwitch3-GigabitEthernet0/0/24] port link-type trunk # Port Link-Type trunk
[HuaweiSwitch3-GigabitEthernet0/0/24] port trunk allow-pass vlan all # Port trunk allows all through VLAN
[HuaweiSwitch] port-group 1 # Port-Group 1
[HuaweiSwitch-port-group-1] group-member GigabitEthernet 0Accord 1 GigabitEthernet 0Unique 3 GigabitEthernet 0UniUnix 5 # Group-member 1 3 5
[HuaweiSwitch-port-group-1] group-member GigabitEthernet 0Compact 0 to GigabitEthernet 0Uniplex 9 # Group-member 123456789
[HuaweiSwitch] port-group group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/3 GigabitEthernet 0/0/5
[HuaweiSwitch] port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/9
Permanent group temporary group
After Huawei switch deletes Vlan, the port automatically returns to Vlan1.
[HuaweiSwitch] vlan 1 # create Vlan1
[HuaweiSwitch] vlan batch 1 3 5 # create Vlan1 3 5
[HuaweiSwitch] vlan batch 1 to 9 # create Vlan123456789
[HuaweiSwitch] undo vlan 1 # unlock Vlan1
[HuaweiSwitch] undo vlan batch 1 3 5 # unlock Vlan1 3 5
[HuaweiSwitch] undo vlan batch 1 to 9 # unlock Vlan123456789
Unfinished