11-04-2019 03:10 AM
‘all’ is not working for the command “switchport mode trunk allow vlan “ in NSO cisco-ios NED. If I use it with in my XML script, devices says incomplete command... Please someone suggest. Thanks
--------------------
NSO-Command Line
-------------------
admin@ncs(config)# devices device SW4 config ios:interface FastEthernet 0/11
admin@ncs(config-if)# switchport mode trunk
admin@ncs(config-if)# switchport trunk allowed vlan all
----------------------------------------------------^
syntax error: "all" is not a valid value.
admin@ncs(config-if)# switchport trunk allowed vlan ?
Possible completions:
WORD VLAN IDs of the allowed VLANs when this port is in trunking mode
none no VLANs
<cr>
admin@ncs(config-if)# switchport trunk allowed vlan
-------------------------------------------------------------------
Actual Device Command Line
-------------------------------------------------------------------
SW4#
SW4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW4(config)#inter
SW4(config)#interface fa
SW4(config)#interface fastEthernet 0/11
SW4(config-if)#switchport
SW4(config-if)#switchport mode trunk
SW4(config-if)#switchport trunk allowed vlan ?
WORD VLAN IDs of the allowed VLANs when this port is in trunking mode
add add VLANs to the current list
all all VLANs
except all VLANs except the following
none no VLANs
remove remove VLANs from the current list
SW4(config-if)#switchport trunk allowed vlan all
SW4(config-if)#
11-04-2019 03:17 AM
Which version of the IOS NED?
11-04-2019 04:33 AM
11-04-2019 08:59 AM
from latest NED cisco-ios-cli-6.36 looks like the 'all' keyword is not yet supported by the NED, please request a NED enhancement:
// interface * / switchport trunk allowed
container allowed {
tailf:info "Set allowed VLAN characteristics when interface is in trunking mode";
// interface * / switchport trunk allowed vlan
container vlan {
tailf:info "Set allowed VLANs when interface is in trunking mode";
choice vlan-choice {
leaf-list vlans {
tailf:cli-drop-node-name;
tailf:cli-range-list-syntax;
//tailf:cli-diff-dependency "../../../../mode";
tailf:meta-data "add-remove-keyword" {
tailf:meta-value "( switchport trunk allowed vlan)(.+)";
}
type uint16 {
tailf:info "WORD;;VLAN IDs of the allowed VLANs when this port is in trunking mode";
range "1..4094";
}
}
leaf none {
tailf:info "no VLANs";
type empty;
}
}
}
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