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

2960X Macro Condition on Interface Description

baumer-ts
Level 1
Level 1

Hi all,

 

I'd like to create a macro which changes the port mode to multi-auth and back to multi-domain only if doesn't have a certain interface description. My approach looks like follows:

 

macro auto execute MULTI_AUTH_TEST {
if [[ $LINKUP == YES ]]; then
conf t
 interface $INTERFACE
 macro description $TRIGGER
 if [[ $DESCRIPTION != miniswitch ]]; then
 authentication host-mode multi-auth
 fi
 exit
fi
if [[ $LINKUP == NO ]]; then
conf t
interface $INTERFACE
 no macro description $TRIGGER
 if [[ $DESCRIPTION != miniswitch ]]; then
 authentication host-mode multi-domain
 fi
 exit
fi
}

Unfortunately this doesn't work. Is there even a variable for the interface description to use in macros? I couldn't find any list about possible built in variables at all.

 

Best Regards

Micha

0 Replies 0
Review Cisco Networking for a $25 gift card