This post will cover a switch port template that I consistently use for user switch ports. These commands also help in speeding up switch port initialization. Anything that speeds up the process is normally a good thing.
Without further ado, here are the commands that I use for user access switch ports, excluding QoS settings which will be covered in the future article:
Switch (config)# int range g0/1 - 48 switchport host spanning-tree bpduguard enable switchport access vlan 10 switchport voice vlan 20
The switchport host macro command was designed to facilitate the configuration of switch ports that connect to end stations. Entering this command sets the switch port mode to access, enables spanning tree PortFast, and disables channel grouping, all at the same time. You will also see a notification of what it did once the command took effect, as shown below. Additionally, you can also hard code the speed and duplex to prevent auto negotiation process to initiate. Other Network Engineers will tell you to disable anything auto, but I personally leave the auto negotiation for speed and duplex alone. I only mess with speed and duplex if the node does not negotiate properly and there’s no way to change the settings to auto.
Switch (config-if)#sw host switchport mode will be set to access spanning-tree portfast will be enabled channel group will be disabled
For more information about the switch port initialization, please read this post.
I hope this has been helpful and I thank you for reading!
NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.