cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

ACS Command Sets - Arguments Regexp - Interface range

2004
Views
5
Helpful
1
Comments

I spent a lot of time trying to permit interface range in command set, from ACS (5.2) userguide is stated:

Arguments are matched using Unix Regexp

I tried several different approaches the only one who worked for me is:

FastEthernet ([1-9/])*0/([1-9]|1[0-9]|2[0-9]|3[0-9]|4[0-7])$

This regex permit access to all interfaces between 1-47 and it works both for stacked switches (1/0/X) and normal access-switches (0/X).

You can easily adapt for your intents, for example if you need for 24 port switches (FastEthernet 0/1-24):

FastEthernet 0/([1-9]|1[0-9]|2[0-4])$

or for Gigabit switches:

GigabitEthernet 0/([1-9]|1[0-9]|2[0-4])$

I didn't find out why I can't just specify [1-47] as numeric range on the last argument (if I try this regexp with grep, it just works!).

Hope this help

Comments

Thanks a lot for the undocumented tip.