cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the possible port range on a switch within a script?

How to get the possible port range on a switch within a script?

EtherNation_Use
Contributor II
Create Date: Jun 22 2012 2:04AM

Hi!

I want to write a script for Ridgeline that enables 802.1x on all ports that have MAC authentication enabled. The problem now is that I've following x450e setups:

    24 Port 48 Port 48 + 24 Port (stacked) 48 + 48 Port (stacked)
Whats the best way to get the port range used on this stack/switch so I can execute for example:

enable netlogin ports 1:1-48, 2:1-24 dot1x

Thx for your help.

(from Robert_Penz)
1 REPLY 1

EtherNation_Use
Contributor II
Create Date: Aug 3 2012 6:11AM

I would have a script parse through a "show config netlogin" command and grab all the ports with the "enable netlogin port mac". Once the ports are added to a list, then they can easily be added to a "enable netlogin ports dot1x" command.

(from john_padilla)
GTM-P2G8KFN