Default interface configuration command

The easiest way to remove all settings from an interface is to use the default interface configuration command. For example, if you've configured Frame Relay interface with subinterfaces ...

interface Serial0/0/0
no ip address
encapsulation frame-relay
load-interval 60
!
interface Serial0/0/0.100 point-to-point
bandwidth 2000
ip address 172.16.1.1 255.255.255.252
ip load-sharing per-packet
ip ospf cost 50
frame-relay interface-dlci 100
... and have erase all interface-specific configuration, the ...

rtr(config)#default interface serial 0/0/0
Building configuration...

Interface Serial0/0/0 set to default configuration
... gets you there. As you can see, after the configuration change, the main interface has no IP address and the subinterface is deleted.
a1#show ip interfaces brief
Interface IP-Address OK? Method Status Protocol

... non-relevant lines deleted ...

Serial0/0/0 unassigned YES TFTP up up
Serial0/0/0.100 unassigned YES manual deleted down

10 comments:

  1. I love this command!

    ReplyDelete
  2. @anonymous - Love? Get a life :-) But indeed VERY useful.

    ReplyDelete
  3. I'm not near any lab equipment at the moment, so I'll just ask this question:

    is it possible to apply this using the range command?

    default interface range gi1/0/20 - 40

    Sorry, I would like to have been able to post up the result myself.

    ReplyDelete
  4. @Nickwalt: Looking purely at parser help, it looks like you can use the "range" keyword.

    ReplyDelete
  5. Great tip! Indeed it works with the "range" command. I just ran it on several ports on an Etherswitch module in a 3725:

    Rack1SW2(config)#default interface range f1/7 - 15
    Rack1SW2(config)#

    Worked briliantly.

    ReplyDelete
  6. How about Nexus 5000 ?
    Ther are no default command available on this devices ???

    ReplyDelete
    Replies
    1. Did you ever get an answer to the Nexus question?

      Delete
    2. no the nexus serie does not know this command

      Delete
  7. What is the default command for removing all the information in cisco ASA, as we have nameif, security-level, ip address..thanks in advance Mr. Ivan Pepelnjak

    ReplyDelete
  8. Hi , you can use this command on nexus product from release 6.2

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.