The thing that costs me the most time in labs is that commands change from vendor to vendor. On this page I collected the basic commands I use in my own labs for Cisco IOS, Huawei VRP and Nokia SR OS, side by side. It will grow as I do more labs.

Notes:

  • Nokia commands are in classic CLI form (what I use on vSIM). MD-CLI syntax is different.
  • The → sign means several lines are entered in order for the same job.
  • Use the tables as a reference and check the vendor documentation when unsure.

1. Basics

What we doCisco IOSHuawei VRPNokia SR OS
Enter configuration modeconfigure terminalsystem-viewconfigure
Go up one levelexitquitexit
Return straight to the topendreturnexit all
Set hostnamehostname R1sysname R1configure system name "R1"
Remove a commandno <command>undo <command>no <command>
Show running configurationshow running-configdisplay current-configurationadmin display-config
Savewrite memorysave (in user view, <R1>)admin save

Key difference: on Huawei, save is typed in user view (<R1>) and does not work inside [R1]. Type return first.

2. Interfaces and IP

What we doCisco IOSHuawei VRPNokia SR OS
Interface summaryshow ip interface briefdisplay ip interface briefshow router interface
Assign an IPinterface g0/0 → ip address 10.1.1.1 255.255.255.0 → no shutdowninterface GigabitEthernet0/0/0 → ip address 10.1.1.1 24configure router interface "to-R2" → address 10.1.1.1/24 → port 1/1/1
Loopback / system IPinterface loopback0 → ip address 1.1.1.1 255.255.255.255interface LoopBack0 → ip address 1.1.1.1 32configure router interface "system" → address 1.1.1.1/32
Shut / unshut an interfaceshutdown / no shutdownshutdown / undo shutdownshutdown / no shutdown
Add a descriptiondescription ...description ...description "..."

On Nokia the physical port is enabled separately (configure port 1/1/1 no shutdown) and the IP goes on a router interface bound to the port. On Cisco and Huawei the IP goes straight on the physical interface.

3. Routing table and static routes

What we doCisco IOSHuawei VRPNokia SR OS
Routing tableshow ip routedisplay ip routing-tableshow router route-table
Static routeip route 10.2.0.0 255.255.0.0 10.1.1.2ip route-static 10.2.0.0 16 10.1.1.2static-route 10.2.0.0/16 next-hop 10.1.1.2
Default routeip route 0.0.0.0 0.0.0.0 10.1.1.2ip route-static 0.0.0.0 0 10.1.1.2static-route 0.0.0.0/0 next-hop 10.1.1.2
Only OSPF routesshow ip route ospfdisplay ip routing-table protocol ospfshow router route-table protocol ospf

Default trust values (administrative distance / preference) differ per vendor:

ProtocolCisco IOSHuawei VRPNokia SR OS
Static1605
OSPF1101010
eBGP20255170
iBGP200255170

This is one of the most confused points in interviews. If two protocols learn the same prefix, the lower value wins.

4. OSPF

What we doCisco IOSHuawei VRPNokia SR OS
Start OSPFrouter ospf 1ospf 1 router-id 1.1.1.1configure router ospf
Set the router IDrouter-id 1.1.1.1 (inside OSPF)ospf 1 router-id 1.1.1.1 (on the process line)configure router router-id 1.1.1.1
Put a network into OSPFnetwork 10.1.1.0 0.0.0.255 area 0area 0 → network 10.1.1.0 0.0.0.255area 0 → interface "to-R2"
Passive interfacepassive-interface g0/1silent-interface g0/0/1interface "x" → passive
Show neighborsshow ip ospf neighbordisplay ospf peer briefshow router ospf neighbor
Show the LSDBshow ip ospf databasedisplay ospf lsdbshow router ospf database

Key differences:

  • On Huawei the router-id is not set inside OSPF; it goes on the process line (ospf 1 router-id X) or as router id X in system-view.
  • Huawei and Cisco use network plus a wildcard mask, Nokia adds the interface directly to the area.
  • Without a router ID, the highest loopback IP is used, then the highest interface IP.

5. BGP

What we doCisco IOSHuawei VRPNokia SR OS
Start BGP with an ASrouter bgp 65000bgp 65000configure router autonomous-system 65000 → bgp
Define a neighborneighbor 4.4.4.4 remote-as 65000peer 4.4.4.4 as-number 65000group "PE" → peer-as 65000 → neighbor 4.4.4.4
Peer from the loopbackneighbor 4.4.4.4 update-source loopback0peer 4.4.4.4 connect-interface LoopBack0neighbor 4.4.4.4 → local-address 1.1.1.1
Neighbor summaryshow ip bgp summarydisplay bgp peershow router bgp summary
BGP tableshow ip bgpdisplay bgp routing-tableshow router bgp routes

A session inside the same AS is iBGP, between different ASes it is eBGP. In iBGP a route learned from one peer is not sent to another iBGP peer, so a full mesh or route reflector is needed.

6. MPLS and LDP

What we doCisco IOSHuawei VRPNokia SR OS
Enable LDPmpls ip on the interfacempls lsr-id 1.1.1.1 → mpls → mpls ldp (global), then mpls + mpls ldp on the interfaceconfigure router ldp → interface-parameters → interface "to-R2"
LDP neighborsshow mpls ldp neighbordisplay mpls ldp sessionshow router ldp session
Label informationshow mpls forwarding-tabledisplay mpls lspshow router ldp bindings active
Test an LSP with labelstraceroute mpls ipv4 4.4.4.4/32tracert lsp ip 4.4.4.4 32oam lsp-trace prefix 4.4.4.4/32

Rule: LDP creates a label for every prefix the IGP learns. For an LSP between PEs their loopbacks must reach each other. Label value 3 (implicit-null) means the label is popped before the last hop (PHP).

7. L3VPN (VPRN)

What we doCisco IOSHuawei VRPNokia SR OS
Create the VRFip vrf CUSTAip vpn-instance CUSTA → ipv4-familyservice vprn 300 customer 10 create
RDrd 65000:100route-distinguisher 65000:100route-distinguisher 65000:100
RTroute-target both 65000:100vpn-target 65000:100 bothvrf-target target:65000:100
Put an interface in the VRFip vrf forwarding CUSTA (before the IP)ip binding vpn-instance CUSTA (before the IP)inside the VPRN interface "x" create → sap 1/1/1 create
BGP family for VPN routesaddress-family vpnv4 → neighbor x activateipv4-family vpnv4 → peer x enablefamily vpn-ipv4
Ping inside the VRFping vrf CUSTA 10.0.0.1ping -vpn-instance CUSTA 10.0.0.1ping 10.0.0.1 router 300
VRF routing tableshow ip route vrf CUSTAdisplay ip routing-table vpn-instance CUSTAshow router 300 route-table
VPNv4 routesshow bgp vpnv4 unicast alldisplay bgp vpnv4 all routing-tableshow router bgp routes vpn-ipv4

Careful: on Cisco and Huawei, putting an interface into a VRF removes its IP, so bind first, then configure the IP. On Nokia the service lives in a single vprn block. For a full walkthrough see the Huawei L3VPN post.

8. VLAN (switch)

What we doCisco IOSHuawei VRP
Create a VLANvlan 10vlan 10
Access portswitchport mode access → switchport access vlan 10port link-type access → port default vlan 10
Trunk portswitchport mode trunk → switchport trunk allowed vlan 10,20port link-type trunk → port trunk allow-pass vlan 10 20
Show VLANsshow vlan briefdisplay vlan

Nokia SR OS is a core router, so there is no classic VLAN/switchport model; L2 connectivity is built with SAPs.