问题:
Hey..

 
Can anyone please help me understand why setting ports to be access ports (switchport mode access) does not accomplish the same thing as Portfast?

 
I guess I am trying to understand why they are 2 separate commands. Wouldn't setting the port to be an Access port be good enough to tell the switch that loops cannot occur on those port since they are Access ports (therefore allowing those access ports to bypass the listening/learning states)?

 
Thank you.

 
回答:
The confusion you are having stems from the fact that you think that access ports are meant for connecting end user devices like computers or printers.

 
Well, that is just wrong.

 
You can have a HUB or a Switch connected to an access port.

 
The same idea applies for Trunks. You can connect any type of device to a Trunk port as long as the NIC inserted into ssaid device can handle the trunking tagging/encapsulation of frames traversing the trunk.

 
In other words, you may have switches connected to Access ports and say, servers connected to Trunk ports.

 
Applying the Access or Trunk configuration on a port only instructs the switch to either handle one or many vlans on said port. It is not telling the switch the nature of devices you will connect to said port.

 
That is why PortFast comes as a separate command. Configuring Portfast on a port tells the switch that you are not connecting into said port, a device capable of creating a layer 2 loops on your network.

 
Contrary to what people believe, you can apply the PortFast command to a trunk port if such trunk is connected say, to a server. And you should not configure PortFast to an access port connected to a Hub.