Defaulting Specific IOS Config

One of the most things to do is having to negate multiple commands using the “no” statement. There is a better way to default IOS configuration in specific sections. This lab will discuss and demonstrate the configuration default function.

Real World Application

Often times in production you may want to reset configurations for particular interfaces or other types of configurations back to the default Cisco IOS configuration. A great example being you have Interface FastEthernet0/0 and it has about 10 lines of configuration on it and you want to clear the configuration on that interface, typically you’d negate the configuration using the no command before all configuration lines under that interface.

A quick and simple way to clear a configuration on an interface is by using the default command in global configuration followed by the interface name and number. This command will reset the interface configuration back to the default configuration of “no ip address” and “shutdown” From there you can apply a new configuration to the interface and save a little time by not negating so many interface configuration lines.

Lab Prerequisites

If you are using GNS3 than load the Stub Area Networking GNS3 topology and start R1.

Establish a Console session with Router 1.

Lab Objectives

Configure interface FastEthernet0/0 with the IP Address of 10.1.1.254/24 and hard code the Speed to 100Mbps and Duplex to full.

Reset the configuration previously made on interface FastEthernet0/0 using the default command in global configuration.

Lab Instruction

Step 1. To simulate a configured interface the first objective states that you need to assign the IP Address 10.1.1.254/24 to interface FastEthernet0/0 as well ass hard code the speed and duplex to 100Mbps/Full Duplex.

Router con0 is now available
Press RETURN to get started.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 10.1.1.254 255.255.255.0
Router(config-if)#duplex full
Router(config-if)#speed 100
Router(config-if)#no shut
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
Router(config-if)#

Step 2. Now reset the interface Fa0/0 to the default configuration by executing the default command from global configuration followed by the interface name and number than verify the configuration.

Router(config-if)#exit
Router(config)#default interface fa0/0
Building configuration...
Interface FastEthernet0/0 set to default configuration
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Rrouter(config)#do show run interface FastEthernet 0/0
Building configuration...
Current configuration : 73 bytes
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
end
Router(config)#