bermyman
asked on
Is there a command in IOS to clear the commands applied under an interface?
I'm trying to find out if there is a command that will clear an interfaces configuration.
E.G. If under "show run" an interface is listed as:
fastethernet 0/1
spanning-tree portfast
switchport mode access
switchport nonegotiate
spanning-tree portfast bpdufilter
I want one command I can use from the command-line that will clear it back to showing just
fastethernet 0/1
(with no commands here)
I've search but can find nothing, there must be a way to do this other than creating a macro filled with negation commands?
Any comments welcome!
Thanks
E.G. If under "show run" an interface is listed as:
fastethernet 0/1
spanning-tree portfast
switchport mode access
switchport nonegotiate
spanning-tree portfast bpdufilter
I want one command I can use from the command-line that will clear it back to showing just
fastethernet 0/1
(with no commands here)
I've search but can find nothing, there must be a way to do this other than creating a macro filled with negation commands?
Any comments welcome!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Give this a try:
conf t
default interface g1/0/11
conf t
default interface g1/0/11
ASKER
That's exactly what I was looking for! I don't think I can give you points too but the help is much appreciated.
Thanks!
Thanks!
No problem on the points, glad to help.
ASKER
Before:
interface GigabitEthernet1/0/11
switchport mode access
switchport nonegotiate
switchport voice vlan 7
switchport port-security maximum 30
switchport port-security
switchport port-security mac-address sticky
macro description access
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
end
After:
interface GigabitEthernet1/0/11
no switchport
no ip address
macro description access
spanning-tree portfast
spanning-tree bpduguard enable
end
Still - that's a pretty good attempt. Thanks mate!