Command Reference

Cisco "interface range" Command Explained

interface range — lets you configure many ports at once — one command block applied to a whole range instead of port-by-port repetition. Runs in global configuration mode.

Syntax and common variants

VariantPurpose
interface range fa0/1 - 24All 24 ports at once
interface range gi0/1 - 4 , gi0/10Ranges plus individual ports
interface range vlan 10 - 12Ranges of SVIs work too

Reading the output

Output / elementMeaning
config-if-range promptEverything you type now applies to all selected ports
(example)switchport access vlan 10 across fa0/1-24 in one shot

When to use it

The batch-work tool: putting 24 ports in a VLAN, enabling portfast on all access ports, shutting a block of unused ports for security. Five minutes of typing becomes one command — and consistency across ports prevents “that one port” mysteries. Browse more in the command reference or practise in the free labs.

Frequently asked questions

Can I mix different ranges in one command?

Yes — separate with commas: interface range fa0/1 - 8 , fa0/20 - 24, spaces around the hyphen included.

Does it work for everything?

Most interface-level commands apply; per-port unique settings (like distinct IPs) obviously can't be ranged.

Is there a way to save a frequently-used range?

Yes — define macro with interface range macro , then recall it by name.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.