cancel
Showing results for 
Search instead for 
Did you mean: 

stp port link-type and auto-edge

stp port link-type and auto-edge

jeronimo
Contributor III

Hello,

I would like to understand the nuances of "link-type (auto)" and "auto-edge".
Notably the logic flow here.

E.g. if auto-edge is off and link-type is auto, what decision does link-type take? It decides between p-t-p and broadcast link I guess? Otherwise auto-edge would be redundant.

So a port can only become an edge port if either
1) auto-edge is enabled (and no BPDU incoming)
2) auto-edge is disabled and link-type is set to edge

So it first checks auto-edge, and then link-type (in case no edge port is detected)? Right?

If auto-edge detects an edge port (instead of setting it manually using link-type), does it still take into account "edge-safeguard" and "bpdu-restrict" options for that port?

3 REPLIES 3

merryray
New Contributor

Understanding the nuances of "link-type (auto)" and "auto-edge" within the context of Spanning Tree Protocol (STP) and related mechanisms can be a bit intricate. Here’s a detailed breakdown of how these features typically interact and make decisions about port roles, especially edge ports, and the logic flow involved:

Key Concepts

  1. Link-Type (Auto):

    • This setting allows the port to automatically decide its link type based on the type of devices connected to it.
    • The decision is usually between point-to-point (p-t-p) and broadcast (shared) link types.
    • It assesses the duplex mode: full duplex links are typically considered p-t-p, while half duplex links are considered broadcast.
  2. Auto-Edge:

    • This feature allows a port to automatically become an edge port if it does not receive any Bridge Protocol Data Units (BPDUs).
    • Edge ports are ports that connect to end devices (such as PCs) and not to other switches, allowing them to transition to the forwarding state immediately, bypassing the usual STP states.
  3. Edge Safeguard:

    • Often referred to as BPDU Guard, this feature protects the network by disabling ports that erroneously receive BPDUs, indicating they are not true edge ports.
  4. BPDU Restrict:

    • This is another safety mechanism that puts ports receiving unexpected BPDUs into an error-disabled state, requiring manual intervention or specific recovery policies to re-enable the port. MaryKayInTouch

cassiebratt
New Contributor

@jeronimoMaryKayInTouch wrote:

Hello,

I would like to understand the nuances of "link-type (auto)" and "auto-edge".
Notably the logic flow here.

E.g. if auto-edge is off and link-type is auto, what decision does link-type take? It decides between p-t-p and broadcast link I guess? Otherwise auto-edge would be redundant.

So a port can only become an edge port if either
1) auto-edge is enabled (and no BPDU incoming)
2) auto-edge is disabled and link-type is set to edge

So it first checks auto-edge, and then link-type (in case no edge port is detected)? Right?

If auto-edge detects an edge port (instead of setting it manually using link-type), does it still take into account "edge-safeguard" and "bpdu-restrict" options for that port?


Hello,

You're absolutely right about the logic flow between stp port link-type and auto-edge. Here's a breakdown of their nuances:

Auto-edge:

This feature simplifies STP port classification.
When enabled (auto-edge), the switch port listens for Bridge Protocol Data Units (BPDUs) for a specific period (typically 3 seconds).
If no BPDUs are received during this time, the port is automatically classified as an edge port and transitions directly to the forwarding state, optimizing data flow.

This configuration option manually defines the STP port type.
It offers different options like point-to-point (default for full-duplex links) or shared (for half-duplex links).
On some switches, there might also be an explicit edge option for link-type.

Auto-edge takes precedence: The switch prioritizes auto-edge. If enabled, it listens for BPDUs.
No BPDU received? Edge port: If no BPDUs are received within the specified time, the port is classified as an edge port regardless of the link-type setting. This speeds up data forwarding.
BPDU received? Normal processing: If BPDUs are detected, auto-edge is disabled, and the switch proceeds with normal STP operation based on the configured link-type.
link-type auto: The switch typically defaults to point-to-point mode for full-duplex links, which might require further STP convergence.
link-type edge (if available): This explicitly sets the port as an edge port, but may not be as efficient as auto-edge as it doesn't skip the BPDU listening phase.

Yes, even with auto-edge, these options are still relevant for the port's STP behavior.
edge-safeguard: This prevents a port from transitioning to a blocking state if it doesn't receive BPDUs for a specific time (useful for edge ports that might not always have a device connected).
bpdu-restrict: This restricts BPDUs from being sent or received on the port, essentially disabling STP on that specific port.

I hope the solution may help you. 

 

Ty, that is very interesting.

I have a port that has "link-type edge" specified, however "Operational Edge" shows "FALSE". Would you happen to have an idea why that is?

 

Stpd: s0 Port: 16 PortId: 8010 Stp: ENABLED Path Cost: 20000
Port Mode : 802.1D Port Role : ----
Port State : FORWARDING Topology Change Ack: FALSE
Port Priority : 128
Designated Root : 00:00:00:00:00:00:00:00 Designated Cost: 0
Designated Bridge : 00:00:00:00:00:00:00:00 Designated Port Id: 0
Partner STP version : Dot1w
Restricted Role : Disabled
Active Role : Disabled
Edge Port Safe Guard : Disabled
BPDU Restrict : Disabled
Restricted TCN : Off
Loop Protect : Off
Loop Protect Partner : Incapable
Operational Edge : FALSE  <-----------------------
Auto Edge : On
Reflection BPDU : On
Participating Vlans: V_MS
configure stpd s0 ports mode dot1d 16
configure stpd s0 ports cost auto 16
configure stpd s0 ports port-priority 128 16
configure stpd s0 ports link-type edge 16      <-------------------
configure stpd s0 ports edge-safeguard disable 16
configure stpd s0 ports bpdu-restrict disable 16
configure stpd s0 ports restricted-role disable 16
configure stpd s0 ports active-role disable 16
configure stpd s0 ports loop-protect off 16
configure stpd s0 ports loop-protect partner incapable 16
configure stpd s0 ports auto-edge on 16
configure stpd s0 ports restricted-tcn off 16
enable stpd s0 ports 16
configure stpd s0 ports reflection-bpdu on 16

This is an X440-G2 running EXOS 31.7.2.28-patch1-8

GTM-P2G8KFN