Connect & Disconnect device from NSO
admin@ncs# devices device N1-PE2 connect
admin@ncs# devices device N1-PE2 disconnect
Execute live command from NSO to device (show ip int bri)
- Live-status exec
admin@ncs# devices device N1-PE2 live-status exec show ip int bri
- live-status exec any
You can handle commands that cannot be handled by the live-status exec command.
eg traceroute 4.2.2.2 (Can be executed even if some parts are omitted like trace 4.2.2.2)
admin@ncs# devices device N1-PE2 live-status exec any traceroute 4.2.2.2
Synchronize the running-config of the device with CDB.
admin@ncs# devices sync-from device N1-PE2
Display the running-config of the device
admin@ncs# show running-config devices device N1-PE2 config
admin@ncs# show running-config devices device N1-PE2 config interface FastEthernet 0/0
admin@ncs# show running-config devices device N1-PE2 config router bgp
admin@ncs# show running-config devices device N1-PE2 config router bgp | display xml
admin@ncs# show running-config devices device N1-PE2 config router bgp | display json
Save Config to NSO Directory
Save the BGP-config of the device N1-PE2 with the file name ” N1-PE2_BGP_CONF” in default directory “/home/rachit”
admin@ncs# show running-config devices device N1-PE2 config router bgp | save N1-PE2_BGP_CONF
admin@ncs# exit
rachit@rachit-L-22:~$ ls -l
rachit@rachit-L-22:~$ cat N1-PE2_BGP_CONF
Command Execution to Remote Device
- Add description on device N1-PE2 interface FastEthernet 0/0
admin@ncs(config)# devices device N1-PE2
admin@ncs(config-device-N1-PE2)# config
admin@ncs(config-config)# interface FastEthernet 0/0
admin@ncs(config-if)# description to INT-Cloud
admin@ncs(config-if)# commit and-quit
Verify:
admin@ncs# show running-config devices device N1 config interface FastEthernet 0/0