cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
63752
Views
10
Helpful
10
Replies

Is there a way to quickly remove config from a range of ports?

Andy White
Level 3
Level 3

Hello,

I am on a 48 port switch and I have shutdown ports 20-40 using the interface range command, now I need remove the lines of config from those ports.  Normally I use the no command but it takes ages as the ports are quite specific, is there a quicker way as I have to do this at another 28 sites!

Thanks

2 Accepted Solutions

Accepted Solutions

singhaam007
Level 3
Level 3

Hi Andy,

you can use interface default command witch will remove all the config and put the inter face to default mode.

like, default int range

Please do rate if the given information helps

Thanks

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Andy,

there is the default command that should restore the default configuration of a port

It should be something like

config t

default interface type x/y

You need to shut the interfaces again as default settings is not shut

Hope to help

Giuseppe

View solution in original post

10 Replies 10

singhaam007
Level 3
Level 3

Hi Andy,

you can use interface default command witch will remove all the config and put the inter face to default mode.

like, default int range

Please do rate if the given information helps

Thanks

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Andy,

there is the default command that should restore the default configuration of a port

It should be something like

config t

default interface type x/y

You need to shut the interfaces again as default settings is not shut

Hope to help

Giuseppe

Brilliant, thanks guys, this we will help loads.

That is one switch done, can you see why this range wont work?

int range FastEthernet 0/1 -4 , fa 0/6 , fa 0/9 , fa 0/13 , fa 0/16-28 , fa 0/33-48 , gig 0/2

                                                                                              ^

It shows there is an issue between fa 0/16-28 , fa 0/33-48

                                                                  ^

Thanks

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Andy White wrote:

That is one switch done, can you see why this range wont work?

int range FastEthernet 0/1 -4 , fa 0/6 , fa 0/9 , fa 0/13 , fa 0/16-28 , fa 0/33-48 , gig 0/2

                                                                                              ^

It shows there is an issue between fa 0/16-28 , fa 0/33-48

                                                                  ^

Thanks

There's a limit of 5 parameters per range command.

Disclaimer

The    Author of this posting offers the information contained within this    posting without consideration and with the reader's understanding that    there's no implied or expressed suitability or fitness for any  purpose.   Information provided is for informational purposes only and  should not   be construed as rendering professional advice of any kind.  Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In    no event shall Author be liable for any damages whatsoever  (including,   without limitation, damages for loss of use, data or  profit) arising  out  of the use or inability to use the posting's  information even if  Author  has been advised of the possibility of such  damage.

Posting

You need to shut the interfaces again as default settings is not shut

BTW, I believe I've noticed not all devices shut status is impacted by the default interface command.  To be safe, I follow up default command with similar inteface range command to set or unset shut status as required.

Also, on some devices, defaulting an interface will impact other interfaces QoS settings.  (Just some QoS commands; interfaces controlled by same ASIC.)

Peter Paluch
Cisco Employee
Cisco Employee

Hello Andy,

You could use the default interface range command - this will literally erase all the ports' configuration back to their default settings. Could this be helpful?

Best regards,

Peter

Hi Andy,

create different macro's with 5 int in each and then default those macros once

Command

Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

define interface-rangemacro_name interface-range

Define the interface-range macro, and save it in NVRAM.

The macro_name is a 32-character maximum character string.

A macro can contain up to five comma-separated interface ranges. You do not need to enter spaces before or after the comma.

Each interface-range must consist of the same port type.

Step 3

interface range macromacro_name

Select the interface range to be configured by using the values saved in the interface-range macro called macro_name.

You can now use the normal configuration commands to apply the configuration to all interfaces in the defined macro.

Step 4

end

Return to privileged EXEC mode.

Step 5

show running-config | include define

Show the defined interface-range macro configuration.

Step 6

copy running-config startup-config

(Optional) Save your entries in the configuration file.

thanks

greg.fuller
Level 5
Level 5

When you use the "default int range" command note that some IOS releases on some devices are picky on syntax for the interface ranges. I always specify them in the format:

fa1/0/1 - 6, fa1/0/9 - 11

My 3550's were the ones that were very finicky on the format they accepted.

Sent from Cisco Technical Support Android App

Adilson Serrão
Level 1
Level 1

conf t

default interface range gig1/x-y

Review Cisco Networking products for a $25 gift card