What is default interface command

The default interface command initializes the settings for a particular interface. To delete a setting, enter “no” for the configuration command you want to delete. However, there are a lot of configurations in the interface, and when you want to delete all of them, it takes a lot of time to delete them one by one with “no”.

So you can easily remove all the configurations for a particular interface by using the default interface command. In global configuration mode, enter the following

default interface command

(config)#default interface <interface-name>

<interface-name> : Interface name to initialize the configuration

Example of the default interface command

This section explains how to initialize a specific interface configuration with the default interface command. As an example, FastEtehernet0/0 is configured as follows.

R1#show running-config interface FastEthernet 0/0
Building configuration...

Current configuration : 219 bytes
!
interface FastEthernet0/0
 description Link to ESW1
 mac-address 0000.1111.1111
 ip address 192.168.12.1 255.255.255.0
 ip access-group 100 in
 ip ospf 1 area 0
 duplex auto
 speed auto
 vrrp 1 ip 192.168.12.254
end

To initialize all FastEtehernet0/0 settings, type default interface FastEthernet0/0 in global configuration mode.

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#default interface FastEthernet 0/0
Building configuration...

Interface FastEthernet0/0 set to default configuration
R1(config)#end
R1#show running-config interface FastEthernet 0/0
Building configuration...

Current configuration : 73 bytes
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
end

You can see that the FastEtehernet0/0 configuration command has been removed and is now in its default state. However, by default, the router’s interface includes the shutdown command, but the default interface does not restore the shutdown command.

Cisco Basic