Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding VLANs thru EOS SDK API #31

Open
krzysztof-sprzaczkowski opened this issue Jul 31, 2017 · 1 comment
Open

Adding VLANs thru EOS SDK API #31

krzysztof-sprzaczkowski opened this issue Jul 31, 2017 · 1 comment

Comments

@krzysztof-sprzaczkowski

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

@ruferp
Copy link
Contributor

ruferp commented Aug 2, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants