Huawei Cisco Xref Switch CLI
Huawei Cisco Xref Switch CLI
contrast with
CISCO
www.huawei.com
Objectives
Agend
Upon completion of this course, you will be able to:
Understand the characteristic of Huawei CLI
Agend
1 Abstract
Abstract
Agend
The overall mechanism of Huawei and Cisco CLI are similar.
The styles of Huawei and Cisco CLI are identical.
Agend
1 Abstract
Command style
Huawei configuration views and Cisco configuration modes contrast
Huawei configuration views and Cisco configuration modes are quite similar
Cisco:
User mode, use “>” as prompt, e.g. Cisco>
Privileged mode, use “#” as prompt, e.g. Cisco#
Configuration mode, use “#” as prompt, e.g. Cisco(config)#
Other configuration mode, use “#” as prompt, e.g. Cisco(config-XX)#
Huawei:
User view, use “< >” as prompt,e.g. <Huawei>
System view, use “[ ]” as prompt, e.g. [Huawei]
Other configuration view, use “[ ]” as prompt, e.g. [Huawei-XX]
You can see that Huawei never have the single configuration mode like Cisco,
the system view of Huawei is equivalent to privileged mode plus configuration
mode of Cisco.
Command
Command style
style contrast
Command structure contrast
Huawei and Cisco have similar command structure
Cisco>show running-configuration
Huawei>display current-configuration
Command style
Common shortcut keys contrast
The same to use up cursor key “↑” and down cursor key “↓” to show the
history commands
The same to use Backspace key to Deletes a character before the cursor
Huawei supports to defining hotkeys, and you can use the command “display
hotkey” to show the hotkeys in use
Agenda style
Command
1 Abstract
Common command
Command keywords contrast
Most part of Huawei command keywords has the fixed contrast to Cisco, know
about these will help you to learn Huawei command quickly if you have a good
skill on Cisco.
Common command keywords contrast:
show <- -> display
no <- -> undo
exit <- -> quit
clear <- -> reset
debug <- -> debugging
neighbor <- -> peer
detail <- -> verbose
delete <- -> delete
match <- ->if-match
Huawei command “display this“ is a convenient command to show the configuration in the
current view
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
Create a local user and set the password Specify the local user’s level
[Quidway-aaa] local-user Huawei password simple 123456 Cisco (config)# username Huawei privilege 3
Parameter Value
Bit per second (Baud rate) 9600
Data bits 8
Stop bits 1
Login by
Telnet Cisco
Enter the system view Enter the configuration mode
[Quidway-ui-vty0-4] authentication-mode {none | password | aaa } Cisco (config-line)# no login | login { <cr> | local | tacacs }
If you use the authentication-mode as password, you If you use the authentication-mode as login, you need
need to set the password to set the password
[Quidway-ui-vty0-4] set authentication password { cipher | simple } Cisco (config-line)# password password
password
Login by
Telnet Cisco
IP Network
SSH Client SSH Server
Pre-conditions:
SSH client login the SSH server with the password mode
IP routing is normal between SSH client and SSH Server
Software
Login by Upgrade by
Generate a local key pair on the server Generate a local key pair on the server
Enable the STelnet service on the SSH server Configure authentication-mode of the VTY as SSH
[Quidway] stelnet server enable Cisco (config)# line 0 4
[Quidway] ssh user Huawei authentication-type password Cisco (config-line)# login local
Cisco (config-line)# transport input ssh
Software
Login by Upgrade by
Huawei command Cisco command
Login the FTP Server, then enter the username Login the FTP Server and get the new system software
and the password on the FTP Server from the FTP Server
<Quidway> ftp 192.168.161.141 Cisco# copy ftp://huawei:[email protected]/S9999.bin
Bootflash:S9300.bin
Trying ftp 192.168.161.141
Press CTRL+K to abort
Configure the new system software as the next startup
Connected to ftp 192.168.161.141
220 FTP service ready. Cisco(config)# boot system flash:S9300.bin
Cisco(config)# end
User (192.168.161.141:(none)):huawei
331 Password required for huawei Reboot the device
Password: 8031
Cisco# reload
Get the new system software from the FTP Server
[ftp] get S9999.cc S9300.cc
Software Upgrade by
Huawei command Cisco command
Login the TFTP Server and get the new system Login the TFTP Server and get the new system
software from the TFTP Server software from the TFTP Server
<Quidway> tftp 192.168.161.141 get S9300.cc Cisco# copy tftp://192.168.161.141/S9300.bin bootflash:
Configure the new system software as the next startup Configure the new system software as the next startup
NTP Function
Software Upgrade by
Switch A Switch B
Pre-conditions:
The operating mode of NTP is client/server mode
NTP Function
Switch A (Server):
Configure Switch A as the NTP Server and Specify Configure Switch A as the NTP Server and Specify
the stratum of the NTP master clock the stratum of the NTP master clock
Switch B (Client):
Specify the IP address of the remote NTP server Specify the IP address of the remote NTP server
Agenda
1 Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
Auto-negotiation of the
Interfaces
Huawei command Cisco command
Configure the port as the auto negotiation mode, by Configure the port as the auto negotiation mode, by
default, an interface works in auto negotiation mode default, an interface works in auto negotiation mode
You can set the speed on an electrical interface You can set the speed on an electrical interface
work in auto-negotiation mode work in auto-negotiation mode
[Quidway-GigabitEthernet1/0/1] auto speed { 10 | 100 | 1000 }* Cisco(config-if)# speed auto { 10 | 100 | 1000 }*
You can set the duplex mode on an electrical You can set the duplex mode on an electrical
interface worked in auto negotiation mode interface worked in auto negotiation mode
Enable the POE function on the interface, by default, Enable the POE function on the interface, by default,
the POE function is auto-enable on the interface the POE function is auto-enable on the interface
(Optional) Configure the maximum output power of the (Optional) Configure the maximum output power of the
interface interface
[Quidway-Ethernet0/0/1] poe max-power power_values Cisco(config-if)# power inline [auto | static] max power_values
[Quidway-Ethernet0/0/1] quit
(Optional) Configure the POE mode as manual
(Optional) Configure the POE mode as manual and
supply the power over the interface by manual Cisco(config-if)# power inline static
Switch A GE1/0/8
Switch B
Specify the channel group mode as LACP Assign the port to the channel group, and specify the
port as LACP mode
[Quidway-Eth-Trunk1] mode lacp-static
[Quidway-Eth-Trunk1] bpdu enable Cisco(config)# interface GigabitEthernet1/0/1
[Quidway-Eth-Trunk1] quit Cisco(config-if)# channel-group 1 mode active
Cisco(config-if)# channel-protocol lacp
Assign the port to the channel group
Specify the LACP port priority
[Quidway] interface GigabitEthernet1/0/1
[Quidway-GigabitEthernet1/0/1] eth-trunk 1
Cisco(config-if)# lacp port-priority priority-value
Cisco(config-if)# exit
Specify the LACP port priority
Vlan can be Created singly or batch: Vlan can be Created singly or batch:
Configure the VLAN on the access port Configure the VLAN on the access port
VLANID=8 (COS =0) Voice data VLANID=8 (COS =6) Voice data
WAN
VLAN-ID =8 LLDP data
Switch AR
Create a VLAN as voice VLAN on the system view Create a VLAN as voice-vlan on the configuration mode
Set the OUI of the voice VLAN Enable QoS for the entire switch
Globally enable LLDP on the system view Globally enable LLDP on the configuration mode
Basic function of
Switch A Root
GE1/0/1 GE1/0/2
GE1/0/2 GE1/0/1
Switch C
All switches:
Basic function of
All switches:
Enable BPDU on the interfaces on the ring Configure the spanning-tree link-type as point-to-point
on the interfaces on the ring
[Quidway] interface GigabitEthernet1/0/1
[Quidway-GigabitEthernet1/0/1] bpdu enable Cisco(config)# interface GigabitEthernet1/0/1
[Quidway-GigabitEthernet1/0/1] quit Cisco(config-if)# spanning-tree link-type point-to-point
[Quidway] interface GigabitEthernet1/0/2 Cisco(config-if)# exit
[Quidway-GigabitEthernet1/0/2] bpdu enable Cisco(config)# interface GigabitEthernet1/0/2
Cisco(config-if)# spanning-tree link-type point-to-point
Switch A (root):
Configure Switch A as the root of the ring Configure Switch A as the root of the ring
[Quidway] stp root primary Cisco(config)# spanning-tree vlan vlan-id root primary
OR OR
[Quidway] stp priority 0 Cisco(config)# spanning-tree vlan vlan-id priority 0
Basic function of
Switch A Root
GE1/0/1 GE1/0/2
Switch C
All switches:
Configure the spanning tree mode as RSTP and Configure the spanning tree mode as Rapid-PVST on
enable stp on the system view the configuration mode
Basic function of
All switches:
Enable BPDU on the interfaces on the ring Configure the spanning-tree link-type as point-to-point
on the interfaces on the ring
[Quidway] interface GigabitEthernet1/0/1
[Quidway-GigabitEthernet1/0/1] bpdu enable Cisco(config)# interface GigabitEthernet1/0/1
[Quidway-GigabitEthernet1/0/1] quit Cisco(config-if)# spanning-tree link-type point-to-point
[Quidway] interface GigabitEthernet1/0/2 Cisco(config-if)# exit
[Quidway-GigabitEthernet1/0/2] bpdu enable Cisco(config)# interface GigabitEthernet1/0/2
Cisco(config-if)# spanning-tree link-type point-to-point
Switch A (root):
Configure Switch A as the root of the ring Configure Switch A as the root of the ring
[Quidway_A] stp root primary Cisco_A(config)# spanning-tree vlan vlan-id root primary
OR OR
[Quidway_A] stp priority 0 Cisco_A(config)# spanning-tree vlan vlan-id priority 0
Basic function of
Switch A
GE1/0/1 GE1/0/2
GE1/0/2 GE1/0/1
Switch C
Basic function of
All switches:
Huawei command Cisco command
Configure the spanning tree mode as MSTP and Configure the spanning tree mode as MSTP on the
enable STP on the system view configuration mode
<Quidway> system-view Cisco# configure terminal
[Quidway] stp mode mstp Cisco(config)# spanning-tree mode mst
[Quidway] stp enable
Basic function of
Switch A (root of instance 1):
Configure Switch A as the root of the instance 1 Configure Switch A as the root of the instance 1
[Quidway_A] stp instance 1 root primary Cisco_A(config)# spanning-tree mst 1 root primary
OR OR
[Quidway_A] stp instance 1 priority 0 Cisco_A(config)# spanning-tree mst 1 priority 0
[Quidway_C] stp instance 2 root primary Cisco_C(config)# spanning-tree mst 2 root primary
OR OR
[Quidway_C] stp instance 2 priority 0 Cisco_C(config)# spanning-tree mst 2 priority 0
BPDU
Huawei command Cisco command
Configure the interface as the edge interface and Enable the Port Fast feature
enable BPDU on the interface
Cisco(config)# interface GigabitEthernet1/0/1
[Quidway] interface GigabitEthernet1/0/1 Cisco(config-if)# spanning-tree portfast
[Quidway-GigabitEthernet1/0/1] stp edged-port enable
[Quidway-GigabitEthernet1/0/1] bpdu enable
OR
Agenda
BPDU
1 Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
BPDU
DLDP/UDLD
Huawei Cisco
VLANIF 20 VLANIF 30
192.168.1.1/2 192.168.2.1/2
4 4
Area 1 Area 2
VLANIF 20 VLANIF 30
192.168.1.2/2 192.168.2.2/2
4 4
Switch C Switch D
Pre-conditions:
Basic VRRP
OSPFV2Function
Huawei Cisco
On the all Switches, configure IP addresses on the On the all Switches, configure IP addresses on the
virtual layer 3 interfaces (e.g. with Switch A) virtual layer 3 interfaces (e.g. with Switch A)
<Quidway_A>system-view Cisco_A # configure terminal
[Quidway_A] interface vlanif 10 Cisco_A(config)# interface vlan 10
[Quidway_A-Vlanif10] ip address 192.168.0.1 255.255.255.0 Cisco_A(config-if)# ip address 192.168.0.1 255.255.255.0
[Quidway_A-Vlanif10] quit Cisco_A(config-if)# exit
[Quidway_A] interface vlanif 20 Cisco_A(config)# interface vlan 20
[Quidway_A-Vlanif20] ip address 192.168.1.1 255.255.255.0 Cisco_A(config-if)# ip address 192.168.1.1 255.255.255.0
[Quidway_A-Vlanif20] quit Cisco_A(config-if)# exit
Configure OSPF (e.g. with Switch A) Configure OSPF (e.g. with Switch A)
Basic VRRP
OSPFV2Function
Huawei Switch A Cisco
Switch B
Maste Standby
r
VLANIF 10 VLANIF 10
209.0.0.2/24 VRRP 209.0.0.3/2
4
Basic VRRP
Basic VRRP Function
Function
Switch A (master):
Configure a virtual layer 3 interface and assign a IP Configure a virtual layer 3 interface and assign a IP
address to the virtual layer 3 interface address to the virtual layer 3 interface
<Quidway_A>system-view Cisco_A# configure terminal
[Quidway_A] interface Vlanif 10 Cisco_A(config)# interface vlan 10
[Quidway_A-Vlanif10] ip address 209.0.0.2 255.255.255.0 Cisco_A(config-if)# ip address 209.0.0.2 255.255.255.0
Create a VRPP group and assign a virtual IP address Create a VRPP group and assign a virtual IP address
to the VRRP group to the VRRP group
Create the same VRPP group and assign the same Create the same VRPP group and assign the same
virtual IP address to the VRRP group which configured virtual IP address to the VRRP group which configured
on the Switch A on the Switch A
Assign the VRRP group priority, and assign the Assign the VRRP group priority, and assign the
priority of the standby of VRRP backup group is lower priority of the standby of VRRP backup group is lower
than the master one than the master one
VLANIF 10 VLANIF 20
10.0.0.1/2 20.0.0.1/24
4
VLANIF 10 VLANIF 20
10.0.0.2/24 20.0.0.2/24
PIM-SM
VLANIF 30 VLANIF 30
Switch B 30.0.0.1/24 30.0.0.2/24 Switch C
VLANIF 40 VLANIF 40
40.0.0.1/24 40.0.0.2/24
IGMP
Switch D Switch E
Pre-conditions:
Multicast-PIM
Switch A to C:
Huawei command Cisco command
Globally enable multicast routing function (e.g. with Globally enable multicast routing function (e.g. with
Switch B) Switch B)
<Quidway_B> system-view Cisco_B# configure terminal
[Quidway_B] multicast routing-enable Cisco_B(config)# ip multicast-routing
Enable the PIM-SM function on the virtual layer 3 Enable the PIM-SM function on the virtual layer 3
interface (e.g. with Switch B) interface (e.g. with Switch B)
Multicast-PIM
Multicast-PIM SM
Switch A (RP):
Switch B to C:
Enable IGMP on the on the virtual layer 3 interface
connected to the layer 2 multicast device (e.g. with
Switch B)
Multicast-IGMP
Switch D to E:
Globally enable IGMP snooping function Globally enable IGMP snooping function
[Quidway] igmp-snooping enable Cisco(config)# ip igmp snooping
Enable IGMP snooping on the VLAN Enable IGMP snooping on the VLAN
Multicast-IGMP
Agenda
1 Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
Multicast-IGMP
IP Network
Switch
Marking source IP value 10.0.0.1
to be remarked DSCP 60 on the
inbound direction of the interface
QoS
QoS marking
marking and
and remarking
Huawei command Cisco command
Configure an access list (e.g. IP standard access list) Configure an access list (e.g. IP standard access list)
PQ+DRR
Huawei command Cisco command
PQ+DRR
PQ+DRR Scheduling
Configure the queue 3 of the fast Ethernet interface as Configure a traffic classifier to match COS value 3
DRR scheduling, and set the weights of queue 3 to 70
Cisco(config)# class-map match-any cisco-queue-3
[Quidway-Ethernet1/0/1]qos queue 3 drr weight 70 Cisco(config-cmap)# match cos 3
Cisco(config-cmap)# exit
PQ+DRR
Cisco command
Agenda
PQ+DRR
1 Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
PQ+DRR
Layer 2 Suppression
Huawei command Cisco command
Specify the action when a storm is detected Specify the action when a storm is detected
If you want to generate an SNMP trap when a storm is If you want to generate an SNMP trap when a storm is
detected detected
Layer 2
functionSuppression
Invalid Username
Invalid Password
802.1x
Intranet
Stop Radius
Server
Valid Username
Valid Password
Permit
Pre-conditions:
IP routing between Switch and Radius Server is normal
function
Huawei command Cisco command
Globally enable 802.1x authentication function Globally enable 802.1x authentication function
Specify the port connected to the client that is to be Specify the port connected to the client that is to be
enabled for 802.1x authentication enabled for 802.1x authentication
Configure 802.1x authentication method as radius Configure 802.1x authentication method as radius
(commonly the domain default used to authenticate (commonly the domain default used to authenticate
the access user) the access user)
Agenda
1 Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
Remote port-
Local port-mirroring
mirroring function
Huawei command Cisco command
Specify the observe-port on which you can observe Specify the observe-port on which you can observe
the packets from the mirrored interface the packets from the mirrored interface
Remote port-
Local port-mirroring
mirroring function
Source Intermediate Destination
switch switch switch
RSPAN
VLAN
GE1/0/2 GE1/0/1 GE1/0/2 GE1/0/1
GE1/0/1 RSPAN GE1/0/2
VLAN
RSPAN RSPAN
source port destination port
Source switch:
Create RSPAN VLAN on the system view Configure RSPAN VLAN on the configuration mode
Remote port-
mirroring
function
Configure the RSPAN VLAN on the Up-link Port Configure the RSPAN VLAN on the Up-link Port
Remote port-
mirroring
function
Intermediate switch:
Create RSPAN VLAN on the system view Configure RSPAN VLAN on the configuration view
Remote port-
mirroring
function
Create RSPAN VLAN on the system view Configure RSPAN VLAN on the configuration mode
Cisco# configure terminal
<Quidway> system-view Cisco(config)# vlan 900
[Quidway] vlan 900 Cisco(config-vlan)# remote span
Cisco(config-vlan)# exit
Add the port connected with the Intermediate switch to
the RSPAN VLAN in trunk mode, and add the RSPAN Add the port connected with the Intermediate switch to
destination port to the RSPAN VLAN in access mode the RSPAN VLAN in trunk mode
Cisco(config)# interface GigabitEthernet1/0/1
[Quidway] interface GigabitEthernet1/0/1 Cisco(config-if)# switchport trunk encapsulation dot1q
[Quidway-GigabitEthernet1/0/1] port link-type trunk Cisco(config-if)# switchport mode trunk
[Quidway-GigabitEthernet1/0/1] port trunk allow vlan 900 Cisco(config-if)# switchport trunk allowed vlan 900
[Quidway-GigabitEthernet1/0/1] quit Cisco(config-if)# exit
[Quidway] interface GigabitEthernet1/0/2
[Quidway-GigabitEthernet1/0/2] port link-type access Specify the RSPAN session and the RSPAN
[Quidway-GigabitEthernet1/0/2] port default vlan 900
destination port
Cisco(config)# monitor session 1 destination interface
GigabitEthernet1/0/2
Remote
Agenda port-
mirroring
1
function
Abstract
1 Basic Configuration
2 Ethernet Configuration
3 Reliability
4 QoS
5 Security
6 Device Management
Remote port-
mirroring
function
Radius
Huawei Cisco
Radius
Radius function
Configure authentication and accounting schemes, Identify the authentication, authorization and
Huawei
then Identify authentication and accounting mode as
Cisco
accounting mode as radius to the radius Server group
radius to the schemes
Cisco(config)# aaa authentication login default group Huawei
[Quidway-aaa] authentication-scheme Huawei Cisco(config)# aaa authorization network default group Huawei
[Quidway-aaa-authen-Huawei] authentication-mode radius Cisco(config)# aaa authorization exec default group Huawei
[Quidway-aaa-authen-Huawei] quit Cisco(config)# aaa accounting exec default start-stop group
[Quidway-aaa] accounting-scheme Huawei Huawei
[Quidway-aaa-accounting-Huawei] accounting-mode radius Cisco(config)# aaa accounting network default start-stop group
[Quidway-aaa-accounting-Huawei] quit Huawei
Configure a domain, Identify the authentication and Configure authentication-mode of the VTY as AAA
accounting mode of the domain as radius, and specify
the server template Cisco(config)# line vty 0 4
Cisco(config-line)# login authentication default
HWTACACS
Huawei Cisco
[Quidway] hwtacacs-server template Huawei Cisco(config)# tacacs-server host 10.0.0.1 key 123456
[Quidway-hwtacacs-Huawei] hwtacacs-server shared-key 123456
[Quidway-hwtacacs-Huawei] hwtacacs-server authentication
10.0.0.1 Enter AAA-configuration mode
[Quidway-hwtacacs-Huawei] hwtacacs-server authorization
10.0.0.1 Cisco(config)# aaa new-model
[Quidway-hwtacacs-Huawei] hwtacacs-server accounting
10.0.0.1 configure the TACACS Server group
HWTACACS
Configure authentication, authorization and accounting Configure the authentication, authorization and
schemes, then Identify authentication, authorization accounting mode as TACACS to the TACACS
and accountingHuawei
mode as HWTACAS to the schemes Server Cisco
[Quidway-aaa] authentication-scheme Huawei Cisco(config)# aaa authentication login default group Huawei
[Quidway-aaa-authen-Huawei] authentication-mode hwtacacs Cisco(config)# aaa authorization network default group Huawei
[Quidway-aaa-authen-Huawei] quit Cisco(config)# aaa authorization exec default group Huawei
[Quidway-aaa] authorization-scheme Huawei Cisco(config)# aaa accounting exec default start-stop group
[Quidway-aaa-author-Huawei] authorization-mode hwtacacs Huawei
[Quidway-aaa-author-Huawei] quit Cisco(config)# aaa accounting network default start-stop group
[Quidway-aaa] accounting-scheme Huawei Huawei
[Quidway-aaa-accounting-Huawei] accounting-mode hwtacacs
[Quidway-aaa-accounting-Huawei] quit
Configure authentication-mode of the VTY as AAA
Configure a domain, Identify the authentication,
Cisco(config)# line vty 0 4
authorization and accounting mode of the domain as Cisco(config-line)# login authentication default
HWTACACS, and specify the server template
Web
Intranet
Web
Server
Pre-conditions:
IP routing between Switch and Web management Server is normal
Web
Huawei command Cisco command
Globally enable HTTP Server function Globally enable HTTP Server function
Configure the HTTP user and the password of the user Configure the local user and the password of the user
SNMP v3
v1/v2c
Huawei command Cisco command
SNMP v3
v1/v2c
Huawei command Cisco command
Enable SNMP agent function on the system view Enter the configuration mode
Configuring an SNMPv3 User Group Cisco(config)# snmp-server group Huawei v3 {auth | noauth }
[Quidway] snmp-agent group v3 Huawei [authentication] Add an user into the SNMPv3 user group and need to
authenticate (e.g. with MD5)
Add an user into the SNMPv3 user group and need to
authenticate (e.g. with MD5)
Cisco(config)# snmp-server user 8031 Huawei V3 auth md5
123456
[Quidway] snmp-agent usm-user v3 8031 Huawei
authentication- mode md5 123456
SNMP
[Quidway] snmp-agent target-host trap address udp-domain Cisco(config)# snmp-server host 192.180.1.27 version 2c public
192.180.1.27 params securityname public v2c
Enable the switch to send traps or specify the type of
Enable the switch to send traps or specify the type of
notifications to be sent
notifications to be sent
Cisco(config)# snmp-server enable traps [ trap-type ]
[Quidway] snmp-agent trap enable [ trap-type ]