How to Configure Multiple Interfaces in Cisco IOS

In Cisco IOS, "interface range" command can help you configure multiple interfaces in one single command. This can be a range of switch ports on a module or multiple ports on multiple module be it FastEthernet or GigabitEthernet or vlans on a Cisco Switch or a Router.

Sometimes, simple tasks like enabling a bunch of Administratively shutdown ports, assigning a range of switchports to a particular VLAN can become boring and tedious. This is where the "interface range"  can help where we can specify a comma seperated list of range of ports or vlans in the interface configuration mode and any command issued from there will apply to all switchports.

For instance, to configure the following switchports one instance on a Cisco Switch

FastEthernet0/1 to 24

GigabitEthernet1/25 to 28

ciscoswitch# conf term

ciscoswitch(config)# int range fa0/1-24, gi1/25-48

ciscoswitch(config-if)# no shut

will enable all switchports which were administratively shutdown ports

ciscoswitch(config-if)# switchport access vlan 75

assigns all the ports to VLan 75 on a switch

ciscoswitch(config-if)# description BOARDROOM-PORTS

sets the port description to "BOARDROOM-PORTS".

It can also be used on VLans

ciscoswitch(config)# int range vlan 1-10

For more advanced usage check the Cisco Documentation here

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *