Commands I Used in The CLI
Commands I Used in The CLI
OSPF :
1. ospf
2. Area [number]
3. Network [network address] [wildcard mask]
4. Display ospf [process id] routing
VLAN :
1. Int: port link-type {access | trunk | hybrid}
2. Int: port default vlan [vlan number]
3. Int: port trunk allow-pass vlan
4. Int: port trunk pvid vlan
5. Int: port hybrid tagged vlan
6. Int: port hybrid untagged vlan
7. Int: port hybrid pvid vlan
VTY:
1. User-interface maximum-vty
2. User-interface {console | vty}
3. Vty: authentication-mode {aaa | none | password}
4. Vty: set authentication password {cipher| simple}
5. Vty: idle-timeout [minute:seconds]
6. Display user-interface
STP:
1. Stp enable
2. Stp mode {STP | RSTP | MSTP}
3. Display stp
4. Displat stp brief
5. Stp root primary
6. Stp root secondary
7. Stp priority
8. Stp pathcost-standard {802.1q | 802.1t | legacy}
9. Int: stp cost
10. Int: stp priority
11. Int : stp edged-port enable
12. Stp bpdu-protection
13. Stp bridge-address [39-39-39]
VRRP:
1. display VRRP interface [int number]
2. display vrrp brief
3. vrrp ping-enable
4. undo vrrp vrid [vrid]
5. int: vrrp vrid [id] virtual-ip [vip]
6. int: vrrp vrid [id] priority [number]
7. int: vrrp vrid [id] timer advertise [seconds]
8. int: vrrp vrid [id] preempt-mode timer delay <0-3600>
9. int: vrrp vrid [id] authentication-mode {simple | md5} [text]
10. int: vrrp vrid [id] track interface [id] reduced <0-255>
ACL:
Basic ACL
1. Acl [number]
2. Acl name basic
3. Acl: rule [rule-id] {permit| deny} {source | any} [time-range]
4. Int: traffic-filter {inbound | outbound} acl [id]
Advanced ACL
5. Acl [number]
6. Acl name advanced
7. Acl: rule [id] {permit | deny} ip destination source dscp tos time-range
8. Acl: rule [id] {permit | deny} tcp destination destination-port source source-
port tcp-flag
2024-05-18 Huawei Proprietary - Restricted Distribution Page4,
Total25
Document Title Security Level
IS-IS:
1. [R] isis [process ID]
2. Display isis lsdb
3. Display isis peer
4. Display isis error
5. Display isis route
6. Display isis spf-tree
7. Display isis frr summary
8. Display isis interface
9. Display isis interface verbose
10. display isis bfd session all
11. Isis: network-entity [NET]
12. Isis: is-level level-{1 | 2 | 1-2}
13. Isis: summary
14. Isis: area-authentication-mode
15. Isis: domain-authentication-mode
16. Display current-configuration configuration isis
17. Int: isis authentication-mode
18. Isis: import-route isis level-2 into level-1
19. Isis: maximum-loadbalancing
20. Isis: nexthop [ipaddress] weight [lower better]
21. Isis: cost-style
22. Int: isis enable [process id]
23. Int: isis cost [number] ----------> Default is 10
24. Isis: circuit-cost
25. Isis: bandwidth-reference
26. Isis: auto-cost enable [compatible]
27. set-overload on-startup 120 send-sa-bit 60 allow external
28. Isis: import-route direct {level-2 | level-1} | level-1-2}
29. Int: isis circuit-level [level-1 | level-2]
30. Int: isis circuit-type p2p
31. Int: isis dis-priority <0-127> --------------> default 64
32. intL isis timer hello
33.
34. Isis: area-authentication-mode
2024-05-18 Huawei Proprietary - Restricted Distribution Page5,
Total25
Document Title Security Level
VPN:
1. Ip vpn-instance [instance name]
2. Vpn: ipv4-family VPNv4 ---------> enabling MP-BGP
Vpnv4af: peer [id] enable
3. Description
4. Vpn: route-distinguisher
5. Display ip vpn
6. display ip vpn-instance verbose
7. display bgp vpnva all peer
8. Display ip routing-table vpn-instance [id]
9. Int: ip binding vpn-instance [instance id]
10. Ip route-static vpn-instance [id]
11. Ping -vpn-instance [id]
12. Tracert -vpn-instance [id]
13. Ospf [process id] vpn-instance [id]
14. Service-id
15. Ospf vpn-instance [id]
MPLS L2VPN:
CCC
1. Mpls lsr-id
2. Mpls
3. Mpls l2vpn
4. Ccc [name] interface out-interface
5. Interface [id].10
6. subInt: vlan-type dot1q [vid]
7. display vll ccc
8. dis l2vpn ccc-interface vc-type ccc
martini
9. Mpls lsr-id [loopback address]
10. Mpls
11. Mpls ldp
12. Int: mpls
13. Int: mpls ldp
14. Mpls: mpls ldp remote-peer [peer name]
15. remoteLDP: description
16. remoteLDP: remote-ip
17. mpls-l2vc-[ipaddress]-[label]
SVC
2024-05-18 Huawei Proprietary - Restricted Distribution Page7,
Total25
Document Title Security Level
MPLS-TE:
1. Mpls lsr-id
2. Mpls
3. Mpls: mpls te
4. Int: mpls
5. Int: mpls te
6. Interface tunnel [tunnel ID]
7. Tunnel: ip address unnumbered interface
8. Tunnel: tunnel-protocol mpls te
9. Tunnel: Destination [dst IP]
10. Tunnel: mpls te bidirectional
11. Tunnel: Mpls te tunnel-id
12. Tunnel: Mpls te signal-protocol cr-static
13. static-cr-lsp {ingress | egress | transit}
14. display interface tunnel
15. display mpls te tunnel
16. display mpls lsp
17. display mpls
18. display mpls static-cr-lsp
19. int: mpls te bandwidth max-reservable-bandwidth
20. int: mpls te bandwidth bc0
2024-05-18 Huawei Proprietary - Restricted Distribution Page8,
Total25
Document Title Security Level
Bgp:
1. Bgp [AS]
2. Bgp: router-id
3. Bgp: peer [address] as-number [as]
4. Bgp: peer [address] connect-interface [int id]
5. Bgp: peer [id] ebgp-mac-hop [number]
6. Bgp: peer [id] next-hop-local
7. Bgp: peer [id] preferred-value [number]
8. Bgp: peer [id] password cipher
2024-05-18 Huawei Proprietary - Restricted Distribution Page9,
Total25
Document Title Security Level
Route policy:
Implementing RP by using ACL rules
1. Create the ACL rule
2. RP: ifmatch acl [acl id]
3. Apply cost
Implementing RP by using IP-prefix
4. Ip ip-prefix [name] {permit| deny} address {greater-qual | less-equal}
5. Route-policy [name] permit node [id]
6. If-match ip-prefix [ip-prefix name]
7. Apply {….}
Implementing RP by using Route filtering
8. Ip ip-prefix [name] deny address--- deny sth
9. Ip ip-prefix [name] permit address less-equal 32 --- permit all other
10. Ospf: filter-policy ip-prefix [name] {import | export}
VxLAN:
1. bridge-domain 10
2. interface gigabitethernet1/0/2.1 mode l2
3. subint: encapsulation dot1q vid 10
4. subint: rewtite pop single
5. subint: bridge-domain 10
6. bridge-domain 10
7. bd: vxlan vni [number]
8. bd: split-horizon enable
9. interface nve 1
10. nve: source
11. nve: vni [vxlanid] head-end peer-list [dst id]
EVPN
23. evpn [name] bd-mode
24. route-distinguisher
25. vpn-target [NO.]
26. bd: evpn binding vpn-instance
27. bd: split-horizon enable
28. display bgp evpn peer
29. evpn source-address
E-Trunk:
1. e-trunk [id]
2. security key{simple | cipher}
3. etrunk: peer-address [peer ip] source-address [source ip]
4. ethtrunk: e-trunk e-trunk-id [ remote-eth-trunk eth-trunk-id ] ----> add an eth-
trunk to an E-trunk.
5. interface global-ve [ve-number]
6. ve-group [ve-group-id] l2-terminate
7. e-trunk e-trunk-id [ remote-global-ve global-ve-id ]
8. etrunk: security-key cipher YsHsjx_202206
9. display e-trunk
10. display e-trunk bfd session all
11. display lacp brief
BFD :
----------------------------------------------------------------------------
1. bfd
2. bfd: discriminator local [number]
3. bfd: discriminator remote [number]
4. etrunk: e-trunk track bfd-session session-name [bfd name]
5. isis: bfd all-interfaces enable
6. display isis bfd session all
7. display bfd link-bundle session
8. display bfd configuration
9. bfd [bfd-id] bind peer-ip [ip] source-ip [ip] {auto}
10. bfd [id] bind link-bundle peer-ip [ip] interface Eth-Trunk 10 source-ip
11. bfd pis
a. process-interface-status
12. bfd pissub
a. process-interface-status sub-if
13. isis ipv6 bfd block -----> disables ipv6 int dynamically establish BFD session
14. reset bfd statistics {all | discriminator}
2024-05-18 Huawei Proprietary - Restricted Distribution Page13,
Total25
Document Title Security Level
EVPN:
1. Source-address [add]
2. evpn vpn-instance [name] bd-mode
3. int: esi [id]
4. interface eth-trunk10.1 mode l2
5. int: encapsulation dot1q vid
6. int: bridge-domain [bd id]
7. evpn redundancy-mode single-active
8. evpn
9. evpn: vlan-extend private enable
10. evpn: vlan-extedn redirect enable
11. evpn: local-remote frr enable
12. establish bgp peering
13. l2vpn-family evpn
14. peer [id] enable
15. display bgp peer
16. display bgp evpn peer
17. display bgp evpn all routing-table
18. display evpn mac routing-table all-evpn-instance
19. display bgp evpn all routing-table mac-route
20. display evpn vpn-instance name evpna df result
configuring single-active PE based on DF election
21. evpn
22. evpn:esi [esi-id]
23. evpn-esi: evpn redundancy-mode single-active df-election
DHCP:
Configure DHCP global address block
1. Dhcp enable
2. Ip Pool [poolname] --- create an IP pool
3. Pool: network [NETid] mask --- specify the pool range
4. Pool: dns-list --- configure the DNS address
5. Pool: gateway-list ---- configure the gateway address
6. Pool: lease --- set the lease time in the pool
7. Pool: static-bind ip-adrress [ip] mac-address [mac]
8. Int: dhcp select global --- after creating the pool, select and interface
Configure an interface as the DHCP server
9. Int: dhcp select interface --- config the device to use this int address pool to
provide DHCP function
10. Int: dhcp server dns-list [ip address] --- config the DNS server
11. Int: ip address dhcp-alloc
12. Int: dhcp excluded-ip-address ---- excluded usable addresses
13. Int: dhcp server lease --- configure the leased time
14. Display dns server
15. Display ip pool name
16. Display ip pool
telnet :
1. telnet server enable --- configure a device as a telnet server
create AAA account on the server
aaa
local-user [username] password irreversible-cipher
local-user [username] privilege-level
local-user [username] service-type {telnet}
2. user-interface vty
3. vty: user privilege level <0-15>
4. vty: authentication-mode {aaa | none | password} --- config authentication
mode
5. vty: set authentication password {cipher | simple} --- config password
6. vty: acl [id] {inbound | outbound} --- config the ACL
7. vty: protocol inbound {all | telnet | ssh} --- config the supported protocol, by
2024-05-18 Huawei Proprietary - Restricted Distribution Page15,
Total25
Document Title Security Level
AAA:
1. aaa
2. aaa: authentication-scheme [authentication scheme name] --- create
authentication scheme
3. aaa: authorization-scheme [authorization scheme name] --- create
authorization scheme
4. auth-scheme: authentication-mode [hwtacas | local | radius] ---> default is
local
5. domain [domain-name] --- create a domain name
6. domain: authentication-scheme [authentication scheme name] --- bind
authentication scheme to a domain
7. domain: authorization-scheme [authorization scheme name]
8. aaa: local-user [name] password {cipher} --- create a local user and assign
password
9. aaa: local-user [name] service-type {{terminal | telnet | ftp | http | } ppp |
none } ---- configure the access type of the user, by default all of them are
disabled
10. aaa: local-user [name] privilege level <0-15> --- specify the permission level
of the user
11. Vty: authentication-mode aaa
12. Display domain name
13. Display aaa offline-record all ----after the user logs in and out, you can see the
records
NAT:
1. Int: nat static global [public IP] inside [private IP]
Or
Nat static global [public IP] inside [private IP]
Int: nat static enable --- enable NAT on an interface after it is configured
globally in system-view
2. Nat address group [index] [start address] [end address] --- create a pool
3. Acl --- configure an ACL
4. Nat outbound [acl id] address group [index] [no-pat]
5. Nat outbound [acl id] address group [index] -------> NAPT
2024-05-18 Huawei Proprietary - Restricted Distribution Page16,
Total25
Document Title Security Level
Easy IP
6. Int: nat outbound [acl id]
NAT server
7. Nat server protocol tcp global [address] www inside [address] 8080
8. Display nat session all
FTP:
1. Ftp [ipv6] server enable --- enabling ftp server function
Configure a local user on the ftp server
Aaa
Local user [username] password irreversible-cipher [password]
Local user [username] privilege-level [level3 or higher]
Local user [username] service-type {ftp}
Local user [username] ftp-directory
2. Ascii
3. Binary
4. Get
5. Delete
6. Put
7. passive
8. Bye
TFTP:
1. Tftp [server address] {get | put } [file name] --- the device will function as a
client
PPP:
1. Int: link-protocol ppp--- encapsulate an int with PPP, for serial the default
encapsulation is PPP
2. Int: ppp timer negotiate [seconds] --- negotiating msgs time interval
PAP
3. Aaa: Local-user [name] password --- create an acc on the authenticator
4. Aaa: Local-user [name] service-type ppp ---- select the service type on the
authenticator
5. int:ppp authentication-mode pap --- select the authentication mode
6. int: ppp pap local-user [name] password--- configure the peer to start
negotiation with the authenticator
CHAP
7. aaa: local-user [name] password --- create the AAA acc on the authenticator
8. aaa: local-user service-type ppp ---- select the service type
9. int: ppp authentication-mode chap --- select the authentication mode on
authenticator
10. int: ppp chap user [name] --- configure the username on peer
11. int: ppp chap password --- configure the password on peer
PPPoE
12. dialer-rule --- create a dialer rule
13. dial: dialer user [name] --- configure a username on the dialer interface
14. dial: dialer-group [group number] --- add the int to a dialer group
15. dial: dialer bundle [number]--- specify a dialer bundle for the interface
16. int: pppoe-client dial-bundle-number [number] --- bind a physical interface to
the dialer bundle
example:
17. dialer-rule
18. rule: dialer-rule [number] ip per {permit | deny}
19. interface dialer [number]
20. dial: dialer user [name]
21. diak: dialer-group [number]
22. dial: dialer bundle [number]
23. dial: ip address ppp-negotiate
IPv6:
1. ipv6 ---- enable it globally
2. int: ipv6 enable --- enable it on interface
2024-05-18 Huawei Proprietary - Restricted Distribution Page18,
Total25
Document Title Security Level
wlan
configure AP to go online
1. Pool: option <1-254> {ascii | cipher | hex | ip-address}
2. Wlan -------> regulatory domain creating
3. Wlan: regulatory-domain-profile name [profile name]
4. Regulatorprofile: country-code [code]
5. Wlan: ap-group [name]
6. Apgroup: regulatory-domain-profile [profile name] -------> binding
7. Capwap source interface {loopback | vlanif}
8. Capwap source ip-address
9. Wlan: ap auth-mode {mac-auth | sn-auth} ----------default: mac-auth
10. Wlan: ap-id
11. Apid: ap-name
12. Wlan: ap-id 0
13. Ap0: ap-group [group name]
14. Display ap {all | ap-group}
2024-05-18 Huawei Proprietary - Restricted Distribution Page19,
Total25
Document Title Security Level
Configure Radios
15. Wlan: ap-id 0
16. Ipid0: radio [radio-id]
17. Radio: channel {20mhz | 40mhz-minus | 40mhz-plus | 80mhz | 160mhz}
18. Radio: antenna-gain
19. Radio: eirp
20. Radio: coverage distance
21. Radio: frequency {2.4g | 5g}
Create radio profile
22. Wlan: radio-2g-profile name [profile name]
23. Wlan: ap-group name [group name]
24. Apgroup: radio-2g-profile [profile name] radio {radio-id | all}
Configuring VAP
25. Wlan: vap-profile name [profile name]
26. Vapprofile: forward-mode {direct-forward | tunnel}
27. Vapprofile: service-vlan {vlan-id [vlan] | vlan-pool [pool]}
Configuring security profile
28. Wlan: security-profile name [profile name]
29. Wlan: vap-profile name
30. Vapprofile: security-profile name
SNMP:
1. Snmp-agent ------> enabling snmp agent function
2. Snmp-agent sys-info version {v1 | v2c | v3} ----> specifying the version
2024-05-18 Huawei Proprietary - Restricted Distribution Page20,
Total25
Document Title Security Level
E-Trunk:
1. lacp e-trunk system-id 00e0-fc00-0000
2. lacp e-trunk priority [number]
3. e-trunk 1
4. Etrunk: priority 50
5. etrunk: peer-address [add] source-address[add]
6. Etrunk: security-key cipher
7. int: e-trunk [etrunk number]
8. int: e-trunk mode force-master
9. int: timer es-recovery 120
SRv6:
2024-05-18 Huawei Proprietary - Restricted Distribution Page21,
Total25
Document Title Security Level
EVPN VPN-instance
27. segment-routing ipv6 locator {PE1_ARG} unicast-locator {PE1}
28. segment-routing ipv6 best-effort
Software upgrade:
Pre-checks
1. display version ------ Verifying the Current System Software Version
2. display device ----- Checking the MPUs' and LPUs' operating statuses
3. display health ---- Checking the MPUs' memory usage
4. display alarm all/active ---- Checking the equipment's alarms
VPLS:
Static VPLS
1. mpls l2vpn ---- enable LDP L2VPN function
2. vsi [id] ---- create VSI on each PE
3. vsi: pwsignal {ldp | bgp} ---- choose the VPLS signaling protocol
4. vsi-ldp: vsi-id [id] ----- specify the VSI ID
5. vsi-ldp: peer [address] static-upe trans [label] recv [label]
6. subint: vlan-type dot1q
7. subint: l2 binding vsi [vsi name]
8. display vsi
9. Display vsi verbose
LDP VPLS
10. mpls ldp remote-peer [id] --- create remote ldp session
11. mplsremote: remote-ip [address] ---- specify the address of the remote peer
License :
1. display license state --- default, normal, trial, emergency, demo …
2. display license --- check license items