Interface Range Command on CISCO Router/Switch

Command

Interface Range

Use

This is the modern way to configure VLANs. A useful feature is that you can configure a range of VLANs with a single command.

Syntax

Switch(config)#interface range <range>

Options

< – > Allows for a continuous range to be specified such as interface range fa0/1-24
< ,> Allows for a specific interface to be selected such as interface range fa0/3 , fa0/10

Example

Interface Range Command on CISCO Router/Switch 1

In the below example we will disable ports Fa0/1-24 on SW1.

SW1(config)#interface range fa0/1-24
SW1(config-if-range)#shut
SW1(config-if-range)#
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/3, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/4, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/5, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface Fa
SW1(config-if-range)#stEthernet0/6, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/7, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/8, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/9, changed state to administratively down
04:59:09: %LINK-5-CHANGED: Interface FastEthernet0/10, changed state to administratively down
04:59:10: %LINK-5-CHANGED: Interface FastEthernet0/12, changed state to adminis
SW1(config-if-range)#tratively down
04:59:10: %LINK-5-CHANGED: Interface FastEthernet0/13, changed state to administratively down
04:59:10: %LINK-5-CHANGED: Interface FastEthernet0/14, changed state to administratively down
04:59:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
04:59:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
04:59:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
04:59:10: %
SW1(config-if-range)#LINK-5-CHANGED: Interface FastEthernet0/15, changed state to administratively down
04:59:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
04:59:10: %LINK-5-CHANGED: Interface FastEthernet0/16, changed state to administratively down
04:59:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
04:59:11: %LINK-5-CHANGED: Interface FastEthernet0/22, changed state to administratively down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to down
SW1(config-if-range)#
04:59:11: %LINK-5-CHANGED: Interface FastEthernet0/23, changed state to administratively down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/13, changed state to down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to down
04:59:11: %LINK-5-CHANGED: Interface FastEthernet0/24, changed state to administratively down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/15, changed state to down
SW1(config-if-range)#
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/16, changed state to down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/17, changed state to down
04:59:11: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/18, changed state to down
04:59:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/22, changed state to down
04:59:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down
SW1(config-if-range)#
04:59:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x