Sometimes you need to remove all configuration lines on some interface to make a fresh start. Most of the people either go into interface mode and type a series of no commands or copy the whole chunk to text editor to add no in front of each line and paste it into console.
There is a quicker way to do this:
default interface interface_name
This command clears the interface configuration by restoring it to defaults (except for admin shutdown status). Here is some interface which is configured:
R2#sh run int f2/1
Building configuration…
Building configuration…
Current configuration : 87 bytes
!
interface FastEthernet2/1
ip address 1.2.0.0 255.0.0.0
duplex full
speed 100
end
!
interface FastEthernet2/1
ip address 1.2.0.0 255.0.0.0
duplex full
speed 100
end
Then we reset it to defaults:
R2(config)#default int f2/1
Building configuration…
Building configuration…
Interface FastEthernet2/1 set to default configuration
The result:
R2#sh run int f2/1
Building configuration…
Building configuration…
Current configuration : 73 bytes
!
interface FastEthernet2/1
no ip address
duplex auto
speed auto
end
!
interface FastEthernet2/1
no ip address
duplex auto
speed auto
end
As you can see, I used only one command to remote several configuration lines.
0 comments:
Post a Comment