Last active
September 10, 2023 19:06
-
-
Save jabelk/9728468ec8d7aa4a4aa7af4acaaf8b18 to your computer and use it in GitHub Desktop.
netsim setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ncs-netsim create-network cisco-ios-cli-6.42 1 ios | |
ncs-netsim add-to-network cisco-nx-cli-5.13 1 nx | |
ncs-netsim add-to-network cisco-iosxr-cli-7.18 1 iosxr | |
ncs-netsim add-to-network cisco-asa-cli-6.7 1 asa | |
ncs-netsim start | |
ncs-netsim list | |
ncs_cli -C -u admin | |
config | |
devices device ios0 authgroup default address 127.0.0.1 port 10022 device-type cli ned-id cisco-ios-cli-6.42 | |
state admin-state unlocked | |
exit | |
devices device nx0 authgroup default address 127.0.0.1 port 10023 device-type cli ned-id cisco-nx-cli-5.13 | |
state admin-state unlocked | |
exit | |
devices device iosxr0 authgroup default address 127.0.0.1 port 10024 device-type cli ned-id cisco-iosxr-cli-7.18 | |
state admin-state unlocked | |
exit | |
devices device asa0 authgroup default address 127.0.0.1 port 10025 device-type cli ned-id cisco-asa-cli-6.7 | |
state admin-state unlocked | |
commit dry-run outformat xml | |
commit | |
top | |
devices fetch-ssh-host-keys | |
devices sync-from | |
devices device-group campus-devices device-name [ ios0 nx0 ] | |
top | |
devices device-group backbone-devices device-name [ iosxr0 asa0 ] | |
top | |
devices device-group parent-group-all-devices device-group [ campus-devices backbone-devices ] | |
commit dry-run | |
commit dry-run outformat xml | |
top | |
ncs-make-package --service-skeleton template simple-sample-snmp-server-service | |
vagrant@vagrant:packages$ cat simple-sample-snmp-server-service/templates/simple-sample-snmp-server-service-template.xml | |
<config-template xmlns="http://tail-f.com/ns/config/1.0" | |
servicepoint="simple-sample-snmp-server-service"> | |
<devices xmlns="http://tail-f.com/ns/ncs"> | |
<device> | |
<!-- | |
Select the devices from some data structure in the service | |
model. In this skeleton the devices are specified in a leaf-list. | |
Select all devices in that leaf-list: | |
--> | |
<name>{/device}</name> | |
<config> | |
<snmp-server xmlns="urn:ios"> | |
<host> | |
<ip-address>{/dummy}</ip-address> | |
<message-type>traps</message-type> | |
<community-string>NSO-COMM-STRING</community-string> | |
</host> | |
</snmp-server> | |
</config> | |
</device> | |
</devices> | |
</config-template> | |
vagrant@vagrant:packages$ | |
<devices xmlns="http://tail-f.com/ns/ncs"> | |
<device-group> | |
<name>backbone-devices</name> | |
<device-name>asa0</device-name> | |
<device-name>iosxr0</device-name> | |
</device-group> | |
<device-group> | |
<name>campus-devices</name> | |
<device-name>ios0</device-name> | |
<device-name>nx0</device-name> | |
</device-group> | |
<device-group> | |
<name>parent-group-all-devices</name> | |
<device-group>backbone-devices</device-group> | |
<device-group>campus-devices</device-group> | |
</device-group> | |
</devices> | |
<devices xmlns="http://tail-f.com/ns/ncs"> | |
<device> | |
<name>asa0</name> | |
<address>127.0.0.1</address> | |
<port>10025</port> | |
<authgroup>default</authgroup> | |
<device-type> | |
<cli> | |
<ned-id xmlns:cisco-asa-cli-6.7="http://tail-f.com/ns/ned-id/cisco-asa-cli-6.7">cisco-asa-cli-6.7:cisco-asa-cli-6.7</ned-id> | |
</cli> | |
</device-type> | |
<state> | |
<admin-state>unlocked</admin-state> | |
</state> | |
</device> | |
<device> | |
<name>ios0</name> | |
<address>127.0.0.1</address> | |
<port>10022</port> | |
<authgroup>default</authgroup> | |
<device-type> | |
<cli> | |
<ned-id xmlns:cisco-ios-cli-6.42="http://tail-f.com/ns/ned-id/cisco-ios-cli-6.42">cisco-ios-cli-6.42:cisco-ios-cli-6.42</ned-id> | |
</cli> | |
</device-type> | |
<state> | |
<admin-state>unlocked</admin-state> | |
</state> | |
</device> | |
<device> | |
<name>iosxr0</name> | |
<address>127.0.0.1</address> | |
<port>10024</port> | |
<authgroup>default</authgroup> | |
<device-type> | |
<cli> | |
<ned-id xmlns:cisco-iosxr-cli-7.18="http://tail-f.com/ns/ned-id/cisco-iosxr-cli-7.18">cisco-iosxr-cli-7.18:cisco-iosxr-cli-7.18</ned-id> | |
</cli> | |
</device-type> | |
<state> | |
<admin-state>unlocked</admin-state> | |
</state> | |
</device> | |
<device> | |
<name>nx0</name> | |
<address>127.0.0.1</address> | |
<port>10023</port> | |
<authgroup>default</authgroup> | |
<device-type> | |
<cli> | |
<ned-id xmlns:cisco-nx-cli-5.13="http://tail-f.com/ns/ned-id/cisco-nx-cli-5.13">cisco-nx-cli-5.13:cisco-nx-cli-5.13</ned-id> | |
</cli> | |
</device-type> | |
<state> | |
<admin-state>unlocked</admin-state> | |
</state> | |
</device> | |
</devices> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment