Home
Certification Preparation
Cisco
CCNA & CCENT
How to select only either odd or even ports in a cisco switch
dppagc
E.g odd ports
int ran gi1/0/1,3,5,7,....
Is there an easier way of doing it other than typing in all the port numbers one by one?
Find more posts tagged with
Comments
DoubleNNs
What OS is the switch? IOS or NX-OS?
I've moved away from networking more towards *Nix, but I know NX-OS has python installed and allows for some basic REGEX and scripting. The method might also depend on what you're ultimately trying to accomplish.
Alceo
If you need it only once I don't know a way, if you need it multiple times you can define a "macro", for example:
define interface-range ODD_INTERFACES fastEthernet 0/1 , fastEthernet 0/3 , fastEthernet 0/5 .......
and then use it:
interface range macro ODD_INTERFACES
Fulcrum45
Good tip Alceo, thanks!
dppagc
So you guys are saying that either way I have to type it in manually?
Jasiono
Yeah but once you have the macro it will be quicker in the future.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of