Interface - configuring a range of interfaces
On a Cisco IOS device, it is possible to configure a range of interfaces with the same configuration commands simultaneously. This can be done by specifying a range of interfaces when entering the interface configuration mode.
For example, the following command enters the interface configuration mode for all interfaces between the range of GigabitEthernet 0/0 and GigabitEthernet 0/10:
R1(config)#interface range GigabitEthernet 0/0-10 R1(config-if-range)#
All subsequent interface configuration mode commands will be applied to all the interfaces in the range.
A comma can also be used to specify non-contiguous ranges like so:
R1(config)#interface range GigabitEthernet 0/0 , GigabitEthernet 0/12 R1(config-if-range)#
The comma can also be used to allow you to specify other types of interfaces:
R1(config)#interface range GigabitEthernet 0/0 , FastEthernet 1/1 R1(config-if-range)#
This command is useful when configuring a large switch with dozens or even hundreds of interfaces that have similar configurations, such as access switches that connect to end user devices with ports that have the same configuration.