02-26-2019 09:26 AM
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
02-26-2019 10:17 AM
02-27-2019 12:10 AM
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
02-26-2019 10:25 AM - edited 02-26-2019 10:27 AM
But I think that you can do it with the following command.
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.
02-27-2019 12:23 AM
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
02-26-2019 10:31 AM
Hello,
I don't think there is a command in XR to do this in HSRP subconfig mode...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide