How to wipe configuration off an interface on a Cisco router

The following command can be used to clear of the configuration on an interface on a Cisco Router or Switch

Switch(config)#default interface range gigabitethernet 0/1 - 52

Note: You can also use the negation command, by adding “no” before the command to clear off configuration applied to an interface or Cisco Switches and Routers

Disable Spanning-Tree Globally

Note: It is not recommended to turn STP off. There is no global command to disable spanning tree globally. But, you can disable all configured VLAN by “no spanning-tree vlan 1(that is on an individual vlan basis) or (have this done in range as shown below. vlan 1 – vlan50)

switch7(config)#no spanning-tree vlan 11-15

Now run the commands below to ensure spanning-tree is disabled for the vlans.

switch7#sh span
No spanning tree instance exists.

or use the full command as shown below

switch7#sh spanning-tree
No spanning tree instance exists.

Note: Only turn off spanning-Tree for the configured vlans on the switch.

Disable unused Access Ports

Internal security policies may mandate that an unused port must be protected by several layers to disallow access to the network. (i.e, shutdown the ports)

Task: Disable interfaces Gi0/1 to G10/24 on switch7


switch7(config)#interface range Gi0/1-24

See links for more explanations