Removal of several ports (physical interface) on a switch config?

Member_2_6498066
Member_2_6498066 used Ask the Experts™
on
How do I remove several ports (physical interface) on a switch config?

Unfortunately , I copied the running config from a stacked switch to a single switch.

Rather than starting over, I would like to remove the physical ports gi2/0/1 - gi3/0/48.

Any thoughts on how to do that?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
conf t
no switch 2 provision <model>
no switch 3 provision <model
do copy run start
do reload

Author

Commented:
Arg. I'm afraid to do that, but will back up what I have. No way to just do it port by port so to speak?
Distinguished Expert 2018
Commented:
nope... if you want remove interfaces from configuration...

Provisioning switches is what placed ports in configuration.

you can remove port configuration by issuing
default interface range gi2/0/1-48, gi3/0/1-48
but it will not remove interfaces from configuration
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Author

Commented:
Is there phraseology in the config settings that will lead me to the switch model so that I can issue the no switch 2 provision <model> command?

What if they are all the same model?

Would that mean the entire config would be emptied of ports?
Distinguished Expert 2018

Commented:
#show run | i provision

no switch X  provision <model> <-- is removing just switch X even if all switches are the same mode.

I think that model may not even be needed for removal
no switch X  provision
without model should be enough to delete. I wrote delete command as it is written in running configuration, but not always all keywords present in command are needed for removal.

Just do it, have fun...

Author

Commented:
Well done. It worked. Thank you.

Author

Commented:
Thank you.
Distinguished Expert 2018

Commented:
You're welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial