Port types in Spanning Tree refer to the different characteristics of network ports
These port types help the STP protocol determine the best paths and optimizes the quick reaction times to network changes ensuring fast recovery and network efficiency
The link or port types are automatically derived from the duplex mode of a port
Optionally, this automatic link type value can be overridden by explicit configuration
In this brief section, let's discuss the different types of Spanning Tree port types in an STP lab exercise
Port Type Summary:
P2P (full-duplex ports)
Shared (half-duplex ports)
Edge (port-fast enabled ports)
Peer STP (ports falling back to 802.1D STP)
Lab Topology
Edge Port Type
Overview:
An Edge port first introduced in the RSTP 802.1w standard, is a port that connects to a client device such as a computer, server, or printer
Edge ports are considered to be at the edge of the network and are automatically assumed for ports connecting to end devices allowing the bypassing of the listening and learning states for immediate forwarding of traffic
Edge ports correspond with the Portfast STP feature
Edge ports that receive a BPDU immediately lose the edge port status falling back to a normal STP port
P2P Port Type
Overview:
A point to point port refers to a link between two switches and are typically full-duplex links such as Ethernet or fiber
Point to point links in a Spanning Tree domain enable switches to exchange BPDUs to determine the forwarding path in the network
Peer STP Port Type
Overview:
The Peer STP port type is a port on a switch running Rapid Spanning Tree that has fallen back to an older Spanning Tree standard such as 802.1D
In certain scenarios, if a switch is connecting to another switch running an older STP standard, the link is forced to run the older standard as both the older and newer standards operate using different Spanning Tree calculations and protocol guidelines
Shared Port Type
Overview:
A shared port is a port where two or more devices are connected
A port that operates in half-duplex is considered as a shared port by default
Shared ports are typically connected to a hub where devices share the same link bandwidth allowing only one device to transmit at a given time
Spanning Tree treats shared ports differently from point to point links assuming that these ports may cause delays in the convergence process due to the half duplex nature of communication