03-23-2024 08:47 PM - edited 03-23-2024 08:49 PM
Hello Cisco Community,
I am currently working with NSO version 6.2 and the Cisco NX-OS CLI NED version 5.25. I've encountered an issue during the deployment of interface configurations to a Nexus device, where NSO sends a sequence of commands that the device cannot process due to order constraints.
I am attempting to configure an interface (Ethernet1/1) on a Nexus device named leaf1. The configuration involves disabling IP and OSPF settings, setting the interface to access mode for VLAN 999, and other typical switchport configurations. The problem arises with the default ip ospf passive-interface command, which fails because it is executed after the interface is set to switchport mode.
Here is the sequence of commands NSO tries to commit, with the problematic command highlighted:
admin@ncs(config)# commit dry-run outformat native
native {
device {
name leaf1
data interface Ethernet1/1
no ip address 10.0.0.1/31
no ip ospf network point-to-point
no ip router ospf 100 area 0.0.0.0
no ip pim sparse-mode
no mtu 9216
switchport
switchport mode access
switchport access vlan 999
shutdown
description NCX
default ip ospf passive-interface <- This command fails
spanning-tree bpduguard enable
spanning-tree port type edge
storm-control broadcast level 1.0
storm-control unicast level 1.0
storm-control multicast level 1.0
exit
}
}
admin@ncs(config)#
How can I adjust my NSO service or template to ensure that the default ip ospf passive-interface command is either not sent for switchport configurations or is placed in the correct sequence to be accepted by the device?
Is there a recommended approach for handling such command sequence dependencies within NSO services or templates, especially when dealing with Cisco NX-OS devices through NSO?
Any guidance on resolving this issue or pointers to relevant documentation would be greatly appreciated. Thank you in advance for your assistance!
03-23-2024 08:58 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide