Reset Cisco switch port/interface to default then apply vlan

I recently had to wrestle some switch port configurations back to default after applying to dumb settings to them.
This was for a Catalyst 3750x in a stack, although it likely applies to many cisco switches.

Reset interface (port) to default

Unfortunately I could not figure out how to do this to the range like in the example below – it’s likely possible, but after the interface range command, trying to give the command default wanted another parameter, and I didn’t want to have to reset each config to default, so I just rant the above command for each interface, then did bulk range operations for applying the vlans.

Apply vlans to ranges or interfaces (ports)

In that example ports 1-47 had a default vlan applied and port 48 had a management vlan applied.

Comments