We help IT Professionals succeed at work.

Is there a command in IOS to clear the commands applied under an interface?

bermyman
bermyman asked
on
288 Views
Last Modified: 2010-04-12
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
Comment
Watch Question

CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
It did clear a lot of stuff, oddly left on some switchport only commands regarding spanning tree. Details as follows:

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!
Top Expert 2009

Commented:
Give this a try:

conf t
default interface g1/0/11

Author

Commented:
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!
Top Expert 2009

Commented:
No problem on the points, glad to help.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.