Header Only - DO NOT REMOVE - Extreme Networks

Calling Variable in XOS 15.X

Userlevel 4
Create Date: Aug 23 2012 9:24AM

I am trying to set a variable to a port number (or range) and apply the variable when configuring a vlan:

set var uplink 1:48
config vlan vlan200 add port $uplink tag

I can see that the variable gets created and is correctly '1:48', however the config vlan command fails with the ^ pointing at the 'u' in uplink.

I am just using the scripting basics guide as my reference (they do this using $count to assign a vlan to a port), has the variable call changed in 15.X or am i simply doing something wrong / unsupported?

(from Nick_Lindhag)

2 replies

Userlevel 4
Create Date: Aug 23 2012 9:36AM

    Make sure vlan200 is tagged Put quotes around set var uplink "1:48" Try referencing the variable with $(uplink) instead of $uplink. This helps when a variable has a special character in it.
Hope this helps. (from john_padilla)
Userlevel 4
Create Date: Aug 23 2012 9:46AM

Thank you for the response, i have this working now. My issue was very noob 😞. I wrote the script to be used after we have enabled stacking but was testing on a new switch (stacking was not yet enabled). I found this out by removing my "1:" and the command worked.

(from Nick_Lindhag)