“Default interface” command – Cisco IOS

“Default interface” command – Cisco IOS

- in Enterprise Infrastructure
51044
0

The “default interface” command is used to return an interface to its default configuration; its implementation is in global configuration mode, and the interface to be modified is specified.

It is a handy command when it comes to deleting the current configuration of the interface; it prevents us from denying each of the commands that exist in the interface. The types of interface to be reset depend on the interfaces that each device has, this command can be used in switches, routers, firewalls, etc.

Its syntax is as follows:

default interface-type interface-number

Where:

  • interface-type depends on each device, e.g. FastEthernet, GigabitEthernet, serial, loopback, atm, tunnel, etc.
  • interface-number indicates the port number according to the slot or position, e.g. 1/0, 0/1, 3/22, 2/0, etc.

Examples:

JMCristobalMX(config)#default interface fa0/9
 Interface FastEthernet0/9 set to default configuration

JMCristobalMX(config)#default interface serial 2/0
 Interface Serial2/0 set to default configuration

Another example remove the current configuration of GigabitEthernet port 22; its configuration is as follows:

JMCristobalMX# sh run int g0/22

Building configuration...

Current configuration : 189 bytes
!
interface GigabitEthernet0/22
description "Switch Cisco 2960 - IDF"
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,20,26-28,30
switchport mode trunk
switchport nonegotiate
speed 1000
duplex full
storm-control broadcast level 10.00
storm-control multicast level 10.00
storm-control unicast level 40.00
no cdp enable
end

To return the port to its default configuration is as follows:

JMCristobalMX(config)#default interface GigabitEthernet 0/22 
Interface GigabitEthernet0/22 set to default configuration 
JMCristobalMX(config)#

We visualize the interface again from the running configuration file:

JMCristobal(config)#do show run int g0/22

Building configuration...

Current configuration : 37 bytes
!
interface GigabitEthernet0/22
end

JMCristobalMX(config)#

As you can see, it is a handy command for port management on a switch or router and can also be used in conjunction with the “range” command to modify a range or several ports at once, for example:

JMCristobalMX(config)# default interface range GigabitEthernet 0/5 - 12

I hope this article has been helpful for you, best regards!

Facebook Comments

You may also like

How-to Install SSH Server on Linux 

1.- Install with apt-get command on Ubuntu: sudo