Configuring Multiple Cisco Switch Ports at the Same Time

KB ID 0001009 

Problem

If you have the same configuration that needs to be placed on multiple ports, then doing each one individually can be time consuming. To save time use the ‘interface range‘ command. Be aware this command is only available on devices running IOS versions newer than 12.0(7)XE, Release 12.1 E, and Release 12.1(5)T.

Solution

1. From configure terminal mode, I want to apply the same configuration to Gigabit Ethernet ports 3 and 4. Note: There is a space each side of the hyphen.

[box]

Petes-Switch(config)#interface range GigabitEthernet 0/3 - 4
Petes-Switch(config-if-range)#switchport mode access
Petes-Switch(config-if-range)#switchport access vlan 123
Petes-Switch(config-if-range)#exit
Petes-Switch(config)#

[/box]

2. Let’s see if that worked;

[box]

Petes-Switch#show run
Building configuration...

Current configuration : 1888 bytes
!
<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/3
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/4
switchport access vlan 123
switchport mode access
!
<------------config removed for the sake of brevity------------>
!

end

[/box]

How To Configure Multiple Cisco ‘Non Contiguous’ Switch Ports

1. The process is the same as above, but you separate ranges, (or individual ports) with a comma. Note: There is a space each side of the comma.

[box]

Petes-Switch(config)#interface range GigabitEthernet 0/3 - 4 , GigabitEthernet 0/9 - 10
Petes-Switch(config-if-range)#switchport mode access
Petes-Switch(config-if-range)#switchport access vlan 123
Petes-Switch(config-if-range)#exit
Petes-Switch(config)#

[/box]

2. Let’s see if that worked;

[box]

Petes-Switch#show run
Building configuration...

Current configuration : 1888 bytes
!
<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/3
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/4
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/5
!

<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/9
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/10
switchport access vlan 123
switchport mode access
!
<------------config removed for the sake of brevity------------>
!
end

[/box]

You can use the interface range command with the following interfaces;

  • FastEthernet
  • GigabitEthernet
  • TenGigabitEthernet
  • Port-Channel
  • VLAN

Related Articles, References, Credits, or External Links

NA

Cisco ASA 5585-X Port Numbering

KB ID 0001004 

Problem

Back at the beginning of the year I had to do a firewall design that included an ASA5585-X, I did some searching to find out how the ports were numbered but came up blank. So I took an (incorrect) educated guess.

I unboxed and fired one up today, and ran though the port numbering and orientation, and discovered the correct numbering.

Solution

Note: This ASA5585-X also has a CX module fitted. The bottom ‘blade’ is the ASA firewall, and the one at the TOP is the CX module. With the CX module fitted, we have an extra eight gigabit Ethernet ports, and two more ten gigabit Ethernet ports.

Port Numbering

Click for larger image

Related Articles, References, Credits, or External Links

NA