10-22-2009 12:16 AM - edited 03-06-2019 08:14 AM
Hello Everybody !!!
I wanted to delete Gigabit Ethernet subinterface, so I invoked no interface gigabitEthernet 3/26.1 command.
I've got the following output from Catalyst 6500 switch: Not all config may be removed and may reappear after reactivating the sub-interface.
And subinterface is still in Cisco switch Show Commands.
You are guessing the question.
How to delete subinterface?
Gratefull for answers and sending greetings.
Agata Czekalska
Technical University of Lodz
10-22-2009 12:25 AM
You can delete the subinterface but it may not totally disappear unless you reload the box. This is the way it's always been with subinterfaces . Unless you want to reload the box , ignore it.
10-22-2009 04:58 AM
Glen is right.
Subinterface is effectively gone but not removed from config. Removal will come when you reload.
Very annoying, yes.
James
10-22-2009 10:54 AM
Hi Guys,
Thank you for answers. I have clarity now.
Best regards,
Agatha
10-22-2009 12:22 PM
Hello Agatha,
this is seen as a feature.
configuration of the deleted subinterfaces is kept in some table.
if you create again the subinterface
and then you do
sh run interface subinterface
you see again the configuration of the subinterface.
There are some side effects: SNMP based discovery mechanisms still report deleted subinterfaces (they access that table) and are not able to distinguish them from active subinterfaces.
Hope to help
Giuseppe
10-22-2009 10:04 PM
That "feature" that the config will reappear if the subif is added again can also be a pain and cause unexpected behaviour.
I have found that if this situation happens the new person adding the subif again may not realise that there is legacy config there which can cause problems.
We have found that before deleting the subif that it is good practice to get rid of any config it had just in case with the "default interface
Cameron
10-22-2009 11:33 PM
Hello everyone,
I tend to agree with Cameron. The sole property of subinterfaces "reappearing" in the configuration after having been recreated is, in my opinion, inconvenient. One of the technical reasons behind this behavior I know about is that the IOS holds the information about every interface and subinterface in a software structure called Interface Descriptor Block - IDB. The funny thing is that while the IDBs can be created on the fly, they are never deallocated or rewritten. This has a number of consequences, some of them nice, some others outright problematic:
- The SNMP ifIndex of an interface or subinterface is preserved until router reboot
- The configuration can be recalled back just by recreating the subinterface
- If a subinterface has a special type like FR point-to-point or multipoint, its type cannot be changed after it has been created. It is necessary either to reboot the router, or create a different subinterface.
- Deleting interfaces does not remove their IDBs, resulting in permanently allocated memory.
- If a router was runnning sufficiently long without reboot, the additions and removals of different interfaces or subinterfaces may cause the maximal number of IDBs to be reached. After this point, no further subinterfaces or interfaces can be created until the router is rebooted.
Best regards,
Peter
11-25-2013 09:44 PM
hi peter and all,
sorry if this is an old thread but the info here helped me.
i would like to know if the 'default interface' global config can do the same job or is it not allowed for sub-interfaces?
sorry i wasn't able to try and test it out earlier on my production router.
11-26-2013 12:47 AM
Using the command default interface gig0/0.2 would result in any config parameters for the subinterface being set to default values (no ip address, etc). It would not do anything about deleting the subinterface.
HTH
Rick
11-26-2013 06:37 AM
Thanks Rick! +5
Sent from Cisco Technical Support iPhone App
01-04-2018 06:48 AM
01-04-2018 09:00 AM - edited 01-04-2018 01:26 PM
The important part of this response is that it includes a step to reload. It is the reload that makes the subinterface be completely removed. Without a reload the subinterface does not completely go away.
To revisit the earlier part of this thread the explanation from Peter is good and I would like to add some clarification about it. We tend to think of the running config as if it were a text file. With a text file it is easy to add a line and it is easy to delete a line. But the running config is not a text file but is a dynamic data structure. When you create the subinterface then it creates an entry in the dynamic data structure (including the IDB). If you then try to delete the subinterface (using no interface fa0/0.10) it makes the subinterface inactive but it does not remove it from the dynamic data structure. This is why it would back if you "recreate" the subinterface. The only way to make the subinterface go completely away is to reload.
HTH
Rick
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