How to set cisco interface switch to default configuration

You want to set to default configuration of cisco interface switches.
If you have a running cisco switch, often you have some configuration commands on each interfaces. Basically you can disable the command using the ‘no’ negation. If there is only one line or two, its ok but if there are more than that, it would take some times to disable one by one.
To set to default config, you can use ‘default interface [interface-number]’ command in the config enable mode terminal.
Here is an example.
Let’s say we want to set interface Fa0/20 of a cisco catalyst to default configuration.

core-swc02#sh run int f0/20
Building configuration...

Current configuration : 160 bytes
!
interface FastEthernet0/20
 description TrunkJKT-SBY
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 834,835
 switchport mode trunk
end

As you can see above, there are four configuration lines inside it.
If we want to set interface FastEthernet0/20 to default, run “default interface f0/20” as below:

core-swc02#conf t
core-swc02(config)#default int f0/20
Interface FastEthernet0/20 set to default configuration

To make sure it has been set to default, check the run config for interface fastethernet0/20:

core-swc02(config)#do sh run int f0/20
Building configuration...

Current configuration : 69 bytes
!
interface FastEthernet0/20
 switchport mode dynamic desirable
end

Hope this would be useful.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.