question

udaya avatar image
udaya asked sandeepreddynv answered

How to edit Type(hex) in Vlan device interface from script ?

Please refer the attached screenshot. I would like to change the default value from 8100 to 5000 (say). Please suggest the API![alt text][1] [1]: /storage/temp/3819-abc.jpg
Spirent TestCenter (STC)apivlan interface
abc.jpg (260.2 KiB)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sandeepreddynv avatar image
sandeepreddynv answered sandeepreddynv edited
Hi Uday, To change the Type using API, we need to use -Tpid attribute. stc::config (vlan handle) -Tpid (value) Note: API will only accept decimal values, so we need to convert the HEX to decimal that we want to change. Hope it helps !! Regards, Venkat
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sandeepreddynv avatar image
sandeepreddynv answered
GUI is showing 5000 which is Hexa decimal value and if you convert that to decimal 20480. That is the value it gives in the tclscript. Let say if you want to give Hexadecimal value 5000 for Type using api, you need to specify decimal value of the 5000 as the value for the attribute. Ex: stc:: config vlanif1 -Tpid 20480 Once you save the configuration and open it in GUI you can find that Type will be showing 5000 Regards, Venkat
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

udaya avatar image
udaya answered
Thanks. Yes, I know but how can I set the value from script ? The GUI intakes hex value and I set this to 5000 as per the screenshot. But I am NOT getting the desired value in the TCL script. When setting the value from API, I can see the value using stc::get but seems NOT setting upon on GUI. Could you check ?
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.