How to configure multiple Cisco switch ports at the same time

Contributor Icon Contributed by Headhunter  
Tag Icon Tagged: Cisco switch  

Using the following command will save you time when configuring multiple ports with the same characteristics.


To configure multiple switchports at the same time we use the interface range configuration command.
Example:
Switch(config)#interface range fastethernet0/1 – 20
Switch(config-if-range)#speed 100
Switch(config-if-range)#duplex full

The previous example will hardcode the speed and duplex settings on switchports 1 to 20. But this could well have been assinging them all to the same vlan.

We can even define multiple ranges.
Example
Switch(config)#interface range fastethernet0/1 – 4 , fastethernet0/10 – 15

Notice the spaces between the ranges.

The interface range command works with vlan, port-channel, fastethernet and gigabitethernet interfaces.

 

7 Comments -


  1. Doug Packer said on March 24, 2009

    Excellent

    Doug Packer

  2. Pradeepkumar_15 said on November 11, 2010

    is there any option avail for non-sequential ports like fa 0/1 fa 3/40 need to be changed to a same VLAN in single command

  3. JWilliams said on January 7, 2011

    Just use the same command as for multple ranges but only define to siungle ports.

    We can even define multiple ranges.
    Example
    Switch(config)#interface range fastethernet0/1, fastethernet0/10

  4. Soubbaya said on January 28, 2011

    Good

  5. Soubbaya said on January 28, 2011

    did you see anything like this in real time environment

  6. Jorjani Sor said on March 30, 2011

    Thanks,Tecknical method.

  7. Capesteve said on September 19, 2011

    Re: We can even define multiple ranges. (on January 7, 2011)

    For multiple non-contiguous ports I believe space is needed before and after comma

    e.g.:
    Switch(config)#interface range fa0/1 , fa0/10

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -