cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
393
Views
0
Helpful
3
Replies
Highlighted
Beginner

Cisco IOS NED "switchport mode trunk allowed vlan all"

‘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)#

Everyone's tags (5)
3 REPLIES 3
Highlighted
Cisco Employee

Re: Cisco IOS NED "switchport mode trunk allowed vlan all"

Which version of the IOS NED?

Highlighted
VIP Collaborator

Re: Cisco IOS NED "switchport mode trunk allowed vlan all"

Well, i think that "switchport mode trunk" will allow all vlans, if you want allow just some vlans, you can use switchport mode trunk allow vlan 10,20,30,40-50.

Regards,
Jaderson Pessoa
*** Rate All Helpful Responses ***
Highlighted
Cisco Employee

Re: Cisco IOS NED "switchport mode trunk allowed vlan all"

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;

              }

            }

          }