cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
973
Views
0
Helpful
2
Replies

IOS Macro - Is it possible to assign value to a variable?

petter.miller
Level 1
Level 1

Hi.

I am wondering if it is possible in IOS to assing a value to a variable (for instance $access_vlan) from within a macro?

I do not want the set the value as a input value to the macro. More specific I want to assign the current access vlan number to a variable to be able to set "switchport trunk native vlan $access_vlan" in a macro.

 

Regards,

Petter

2 Replies 2

Leo Laohoo
Hall of Fame
Hall of Fame
macro apply <MACRO NAME> $access_vlan <VALUE>

Hi.

I do not want to pass the value as an argument. The goal is to run the macro from ISE with just the name of the macro. I do not know the what the access vlan number is on a specific switch.

If possible I would like to assign the value like this:

$access_vlan = [somehow determine the access vlan number, show command or whatever]

 

-Petter