You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
How to get VLAN added thru SDK API (trunk_vlan_set() method of eth_intf_mgr) visibled on the global list of vlans (CLI: show interface vlans)? It is only visible as local configuration parameter of the interface (CLI: show active). Is there any additional SDK API method which has to be called to add VLAN to the global list of vlans? I can see that adding VLAN thru CLI to allowed VLANs on the intefrace (CLI: switchport trunk allowed vlan 3000), it is required to perform the second command (CLI: vlan 3000) to see it on the global list of vlans (CLI: show interface vlans).
Allowing a vlan on an interface does not also implicitly create the vlan itself, so at that point it is just a forward reference. I browsed through the code and could not find an api to create the vlan itself, so I guess you have to preconfigure those via the cli, for now. Not sure why we thought such api is not needed, or if it just fell through a crack, I will have to ask around.
Hi,
How to get VLAN added thru SDK API (trunk_vlan_set() method of eth_intf_mgr) visibled on the global list of vlans (CLI: show interface vlans)? It is only visible as local configuration parameter of the interface (CLI: show active). Is there any additional SDK API method which has to be called to add VLAN to the global list of vlans? I can see that adding VLAN thru CLI to allowed VLANs on the intefrace (CLI: switchport trunk allowed vlan 3000), it is required to perform the second command (CLI: vlan 3000) to see it on the global list of vlans (CLI: show interface vlans).
e.g.
localhost(config)#interface Ethernet 1/2
localhost(config-if-Et1/2)#show active
interface Ethernet1/2
switchport trunk native vlan 1000
switchport trunk allowed vlan 1000,2000
switchport mode trunk
localhost(config-if-Et1/2)#show interface vlans
Port Untagged Tagged
Et1/2 1000 2000
localhost(config-if-Et1/2)#switchport trunk allowed vlan 1000,2000,3000
localhost(config-if-Et1/2)#show active
interface Ethernet1/2
switchport trunk native vlan 1000
switchport trunk allowed vlan 1000,2000,3000
switchport mode trunk
localhost(config-if-Et1/2)#show interface vlans
Port Untagged Tagged
Et1/2 1000 2000
localhost(config-if-Et1/2)#vlan 3000
localhost(config-vlan-3000)#exit
localhost(config)#show interface vlans
Port Untagged Tagged
Et1/2 1000 2000,3000
Regards,
Krzysztof
The text was updated successfully, but these errors were encountered: