cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1955
Views
0
Helpful
5
Replies

How to remove several subinterfaces from hsrp configuration

eAlessandro
Level 1
Level 1

Hi All,

On a cisco ASR9000 running IOS XR, I want to remove several GigabitEther subinterfaces in one shot,  would it be possible?

 

The configuration is like the following:

router hsrp

interface GigabitEthernet0/0/0/1.90

...

interface GigabitEthernet0/0/0/1.100

...

interface GigabitEthernet0/0/0/1.101

...

interface GigabitEthernet0/0/0/1.102

...

 

I want to remove subinterfaces GigabitEthernet0/0/0/1.100, GigabitEthernet0/0/0/1.101, GigabitEthernet0/0/0/1.102 from hsrp configuration mode.

 

Instead of removing all the subinterfaces one by one, could you please suggest a quick way to accomplish that? I have tried the following command lines but it doesn't work.

router hsrp

no interface gigabitEthernet 0/0/0/1.100 -102

Thank you.

Best Regards,

Alessandro

5 Replies 5

Jaderson Pessoa
VIP Alumni
VIP Alumni
Try it:

no interface range gigabitEthernet 0/0/0/1.100 -102
Jaderson Pessoa
*** Rate All Helpful Responses ***

Hi,

thanks for your answer. I tried the suggested command but it doesn't work.

 

(config-hsrp)#no interface range gigabitEthernet 0/0/0/1.111 - $
no interface range gigabitEthernet 0/0/0/1.111 - 113
                  ^

% Invalid input detected at '^' marker.

 

Best Regards,

Alessandro

But I think that you can do it with the following command.

 

WARNING - I have not tested it (but I think it will work) but this will also ERASE all the configuration on Gi0/0/0/1

conf t
default interface GigabitEthernet0/0/0/1

 

I cannot imagine a device with more than 10-20 sub-interfaces so I don't see the problem of doing manually, but you can also do a simple replace in notepad... replacing "interface GigabitEthernet0/0/0/1" for "no interface GigabitEthernet0/0/0/1"

 

Hope this helps.

Rolando A. Valenzuela.

Hi Rolando,

The running configuration has plenty of subinterfaces instead, more than 150. As part of a migration project I have to remove most of them from the hsrp router configuration mode leaving only a few of them under the hsrp config.

Instead of doing the activity by using the replace option and copy paste, I would prefer something faster if possible. The same way it is possible configuring a range of interfaces with one command line, It would have been very useful to have this fast option under hsrp conf sub-mode.

I'm going to continue searching; please advice in case you all have any leads.

 

Thank you.

Best Regards,

Alessandro

Hello,

 

I don't think there is a command in XR to do this in HSRP subconfig mode...