n3s0 || journal

Cisco: Configure A Range Of Interfaces On A Switch

Posted on 1 min

Netadmin

Table of Contents

Summary


I keep having days where I don’t configure Cisco networking gear for a week or so. In that time I forget small details on how to navigate Cisco IOS.

Going to start writting these posts if I forget something so I can look back on them later.

Today the lack of recall was configuring a range of ports on a Cisco switch. Though this command should work on other devices that run Cisco IOS.

In this scenario, the switch needed a specific port range configured. (e.g. gigabitEthernet 1/0/3 - gigabitEthernet 1/0/10). Needed to configure the VLAN and Spanning Tree on the ports to put them on the correct subnet.

Process


To do this, I connected to the switch using SSH and entered global configuration mode.

configure terminal

Configuration mode looks like the following.

Switch(config)#

Then I proceeded go into the interface configuration mode using the following command.

interface range gigabitEthernet 1/0/3 - 10

The new prompt will look something like the following.

Switch(config-if-range)#

Then I proceeded to configure the ports on the switch as needed.