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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Enter configuration mode | configure terminal | system-view | configure |
| Go up one level | exit | quit | exit |
| Return straight to the top | end | return | exit all |
| Set hostname | hostname R1 | sysname R1 | configure system name "R1" |
| Remove a command | no <command> | undo <command> | no <command> |
| Show running configuration | show running-config | display current-configuration | admin display-config |
| Save | write memory | save (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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Interface summary | show ip interface brief | display ip interface brief | show router interface |
| Assign an IP | interface g0/0 → ip address 10.1.1.1 255.255.255.0 → no shutdown | interface GigabitEthernet0/0/0 → ip address 10.1.1.1 24 | configure router interface "to-R2" → address 10.1.1.1/24 → port 1/1/1 |
| Loopback / system IP | interface loopback0 → ip address 1.1.1.1 255.255.255.255 | interface LoopBack0 → ip address 1.1.1.1 32 | configure router interface "system" → address 1.1.1.1/32 |
| Shut / unshut an interface | shutdown / no shutdown | shutdown / undo shutdown | shutdown / no shutdown |
| Add a description | description ... | 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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Routing table | show ip route | display ip routing-table | show router route-table |
| Static route | ip route 10.2.0.0 255.255.0.0 10.1.1.2 | ip route-static 10.2.0.0 16 10.1.1.2 | static-route 10.2.0.0/16 next-hop 10.1.1.2 |
| Default route | ip route 0.0.0.0 0.0.0.0 10.1.1.2 | ip route-static 0.0.0.0 0 10.1.1.2 | static-route 0.0.0.0/0 next-hop 10.1.1.2 |
| Only OSPF routes | show ip route ospf | display ip routing-table protocol ospf | show router route-table protocol ospf |
Default trust values (administrative distance / preference) differ per vendor:
| Protocol | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Static | 1 | 60 | 5 |
| OSPF | 110 | 10 | 10 |
| eBGP | 20 | 255 | 170 |
| iBGP | 200 | 255 | 170 |
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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Start OSPF | router ospf 1 | ospf 1 router-id 1.1.1.1 | configure router ospf |
| Set the router ID | router-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 OSPF | network 10.1.1.0 0.0.0.255 area 0 | area 0 → network 10.1.1.0 0.0.0.255 | area 0 → interface "to-R2" |
| Passive interface | passive-interface g0/1 | silent-interface g0/0/1 | interface "x" → passive |
| Show neighbors | show ip ospf neighbor | display ospf peer brief | show router ospf neighbor |
| Show the LSDB | show ip ospf database | display ospf lsdb | show router ospf database |
Key differences:
- On Huawei the
router-idis not set inside OSPF; it goes on the process line (ospf 1 router-id X) or asrouter id Xin system-view. - Huawei and Cisco use
networkplus 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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Start BGP with an AS | router bgp 65000 | bgp 65000 | configure router autonomous-system 65000 → bgp |
| Define a neighbor | neighbor 4.4.4.4 remote-as 65000 | peer 4.4.4.4 as-number 65000 | group "PE" → peer-as 65000 → neighbor 4.4.4.4 |
| Peer from the loopback | neighbor 4.4.4.4 update-source loopback0 | peer 4.4.4.4 connect-interface LoopBack0 | neighbor 4.4.4.4 → local-address 1.1.1.1 |
| Neighbor summary | show ip bgp summary | display bgp peer | show router bgp summary |
| BGP table | show ip bgp | display bgp routing-table | show 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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Enable LDP | mpls ip on the interface | mpls lsr-id 1.1.1.1 → mpls → mpls ldp (global), then mpls + mpls ldp on the interface | configure router ldp → interface-parameters → interface "to-R2" |
| LDP neighbors | show mpls ldp neighbor | display mpls ldp session | show router ldp session |
| Label information | show mpls forwarding-table | display mpls lsp | show router ldp bindings active |
| Test an LSP with labels | traceroute mpls ipv4 4.4.4.4/32 | tracert lsp ip 4.4.4.4 32 | oam 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 do | Cisco IOS | Huawei VRP | Nokia SR OS |
|---|---|---|---|
| Create the VRF | ip vrf CUSTA | ip vpn-instance CUSTA → ipv4-family | service vprn 300 customer 10 create |
| RD | rd 65000:100 | route-distinguisher 65000:100 | route-distinguisher 65000:100 |
| RT | route-target both 65000:100 | vpn-target 65000:100 both | vrf-target target:65000:100 |
| Put an interface in the VRF | ip 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 routes | address-family vpnv4 → neighbor x activate | ipv4-family vpnv4 → peer x enable | family vpn-ipv4 |
| Ping inside the VRF | ping vrf CUSTA 10.0.0.1 | ping -vpn-instance CUSTA 10.0.0.1 | ping 10.0.0.1 router 300 |
| VRF routing table | show ip route vrf CUSTA | display ip routing-table vpn-instance CUSTA | show router 300 route-table |
| VPNv4 routes | show bgp vpnv4 unicast all | display bgp vpnv4 all routing-table | show 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 do | Cisco IOS | Huawei VRP |
|---|---|---|
| Create a VLAN | vlan 10 | vlan 10 |
| Access port | switchport mode access → switchport access vlan 10 | port link-type access → port default vlan 10 |
| Trunk port | switchport mode trunk → switchport trunk allowed vlan 10,20 | port link-type trunk → port trunk allow-pass vlan 10 20 |
| Show VLANs | show vlan brief | display vlan |
Nokia SR OS is a core router, so there is no classic VLAN/switchport model; L2 connectivity is built with SAPs.