The switchport host command is a macro command that optimizes the port for a layer 2 host connection. It does this by enabling some features and disabling other features.
Entering the switchport host command on a switchport does the following things with a single command:
- sets switch port mode to access
- enables spanning tree Port Fast
- disables channel grouping
The switch port mode access command sets the port to access unconditionally and operates as a nontrunking, single VLAN interface that sends and receives nonencapsulated (non-tagged) frames. An access port can be assigned to only one VLAN.
As discussed in the previous article, the switchport host activates spanning tree port fast feature, so the switchport host command should only be used on ports that are connected to a single host. Connecting other switches, hubs, concentrators, or bridges to a fast-start port can cause temporary spanning-tree loops. This could cause the dreaded network melt down.
However, enabling the switchport host command decreases the time that it takes to start up packet forwarding from about 30 seconds to almost instantaneous. This is a real plus for the network users, and dramatically speeds up their ability to log onto the network and access resources.
Disabling channel grouping prevents the possibility of automatically creating an Etherchannel using PAgP (Port Aggregation Protocol).
Activating the switchport host command is as easy as selecting the port and entering the switchport host command.
For more information, see the Cisco Catalyst 3560-E switch command reference. This command has been around for awhile, at least since the 12.1 IOS code, so it should work on almost any switch in your infrastructure.
As a best practice, make the switchport host command part of your standard configuration for all of your workstation, printers, and non-virtualized server ports.