Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Certification Preparation
Cisco
CCST & CCNA (Entry-level & Associate)
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
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
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
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS