cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19701
Views
15
Helpful
11
Replies

Deleting Subinterface trouble

agata.czekalska
Level 1
Level 1

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

11 Replies 11

glen.grant
VIP Alumni
VIP Alumni

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.

Glen is right.

Subinterface is effectively gone but not removed from config. Removal will come when you reload.

Very annoying, yes.

James

Hi Guys,

Thank you for answers. I have clarity now.

Best regards,

Agatha

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

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 " command to rule out having config you don't notice being there and complicating matters.

Cameron

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

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.

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

HTH

Rick

Thanks Rick! +5

Sent from Cisco Technical Support iPhone App

qamar
Level 1
Level 1

Just write "no fa 0/0.10" command (if you create sub interface as inter fa0/0.10), in config mode.

Then save configuration.

Then reload

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

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco