Deleting a virtual interface

Answered Question
Sep 5th, 2007
User Badges:

There is a debate among our engineers on the proper command to delete a virtual interface on an MSFC. Which command is correct and why?

delete interface vlanxxx

or

no interface vlanxxx

There's a dinner riding on this one!

Correct Answer by Pavel Bykov about 9 years 6 months ago

delete interface ??

Never heard of it. DELETE command is an EXEC command used for file system operation (e.g. delete a certain file) but certainly not deleting interfaces.


I checked all of our 3560,3750,c6506-native, and c6506-hybrid with MSFC. All results are negative. Like this:


msfc_hra_old(config)#del?

% Unrecognized command


c6506_hra_1(config)#del?

% Unrecognized command


And so on.



That's what I expected btw, because again, I have never heard of the command.


There is a command that is called "DEFAULT" maybe that's the one you are thinking of. This command returns an interface to a default state.


NO INTERFACE command deletes a virtual interface.


When reenabling virtual interface (not SVI) some configuration may reappear. Therefore the cleanest way to delete a virtual interface is:


default interface fa0/0.1

no interface fa0/0.1



SVI could be deleted using "no" command without the need to use "default" command.





As to your question. IF the command does exist on some special version of IOS, it surely doesn't exist anywhere else. Therefore using a special command, that is not documented is not a good idea in an routine environment.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Wed, 09/05/2007 - 20:37
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

The latter


no interface vlanxxx


.........



Rack1SW2#show ip int bri | ex una

Interface IP-Address OK? Method Status Protocol

Vlan28 183.1.28.8 YES manual up up


Rack1SW2(config)#no interface vlan 28


Rack1SW2(config)#do show ip int bri | ex una

Interface IP-Address OK? Method Status Protocol



peter.mark Thu, 09/06/2007 - 04:33
User Badges:

Is there a reason why the delete interface command should not be used?

Correct Answer
Pavel Bykov Thu, 09/06/2007 - 08:51
User Badges:
  • Silver, 250 points or more

delete interface ??

Never heard of it. DELETE command is an EXEC command used for file system operation (e.g. delete a certain file) but certainly not deleting interfaces.


I checked all of our 3560,3750,c6506-native, and c6506-hybrid with MSFC. All results are negative. Like this:


msfc_hra_old(config)#del?

% Unrecognized command


c6506_hra_1(config)#del?

% Unrecognized command


And so on.



That's what I expected btw, because again, I have never heard of the command.


There is a command that is called "DEFAULT" maybe that's the one you are thinking of. This command returns an interface to a default state.


NO INTERFACE command deletes a virtual interface.


When reenabling virtual interface (not SVI) some configuration may reappear. Therefore the cleanest way to delete a virtual interface is:


default interface fa0/0.1

no interface fa0/0.1



SVI could be deleted using "no" command without the need to use "default" command.





As to your question. IF the command does exist on some special version of IOS, it surely doesn't exist anywhere else. Therefore using a special command, that is not documented is not a good idea in an routine environment.

peter.mark Thu, 09/06/2007 - 09:26
User Badges:

Your correct. I meant to say default.

Thank you for clearing this up.

Pavel Bykov Thu, 09/06/2007 - 10:00
User Badges:
  • Silver, 250 points or more

So... have you won a dinner? :)

Actions

This Discussion