Study guide

3.2 STP Costs, Port Roles, States and BPDUs

JNCIS-ENT Enterprise Routing and Switching Study Guide 2026 Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & Junos Enterprise Fundamentals

1.1 JNCIS-ENT Exam Logistics & Blueprint Breakdown 1.2 Junos CLI, Enterprise Platforms & Interface Families 1.3 Layer 2 Bridging Mechanics & Packet Forwarding

2 Chapter 2: VLANs & Inter-VLAN Routing

2.1 VLAN Segmentation and 802.1Q Tags 2.2 Access, Trunk, Native and Voice VLANs 2.3 IRB Architecture and Interface Families 2.4 IRB Configuration and Packet Walk 2.5 VLAN Configuration, Verification & Troubleshooting

3 Chapter 3: Spanning Tree Protocols

3.1 Layer 2 Loops and Root Bridge Election 3.2 STP Costs, Port Roles, States and BPDUs 3.3 RSTP Rapid Convergence & Link Types 3.4 MSTP Architecture & Spanning Tree Operations

4 Chapter 4: Layer 2 Security & Feature Protection

4.1 Edge BPDU and Root Protection 4.2 Loop Protection and Diagnostic States 4.3 Port Security, MAC Limiting & Persistent MAC Learning 4.4 DHCP Snooping, Dynamic ARP Inspection (DAI) & IP Source Guard 4.5 Layer 2 Firewall Filters: Types, Order and Actions

5 Chapter 5: Advanced Layer 2 Features & Storm Control

5.1 Storm Control & Broadcast/Multicast Suppression 5.2 MACsec Link Security and Key Agreement 5.3 LLDP and LLDP-MED Operations & Verification

6 Chapter 6: Protocol-Independent Routing & Load Balancing

6.1 Static, Aggregate, and Generated Routes 6.2 Routing Instances and RIB Groups 6.3 Junos Load Balancing & Filter-Based Forwarding (FBF) 6.4 Martian Routes and Route Acceptance

7 Chapter 7: Junos Routing Policy & Firewall Filters

7.1 Routing Policy Framework & Term Evaluation 7.2 Prefix Lists & Route Filters 7.3 Firewall Filters & Policers

8 Chapter 8: Open Shortest Path First (OSPF) Operation

8.1 OSPF Architecture & Neighbor Adjacency Formation 8.2 OSPF Areas & LSA Types 8.3 OSPFv2 & OSPFv3 Configuration and Verification

9 Chapter 9: Advanced OSPF Features & Routing Policies

9.1 OSPF Special Area Types 9.2 Route Summarization & OSPF Authentication 9.3 OSPF Diagnostics & Common Failure Scenarios

10 Chapter 10: Intermediate System to Intermediate System (IS-IS)

10.1 IS-IS Encapsulation and NET Identity 10.2 IS-IS Levels, Areas and Default Routing 10.3 IS-IS PDU Families and Neighbor Exchange 10.4 IS-IS Database Synchronization and DIS 10.5 IS-IS Configuration, Metrics & Troubleshooting

11 Chapter 11: Border Gateway Protocol (BGP)

11.1 BGP Roles, AS Numbers and TCP Transport 11.2 EBGP/IBGP Sessions, State Machine and Messages 11.3 BGP Attributes & Junos Path Selection Algorithm 11.4 BGP Configuration & Policy Implementation 11.5 BGP Scaling with Route Reflection & Diagnostics

12 Chapter 12: IP Tunneling & High Availability

12.1 GRE & IP-IP Tunneling Architecture 12.2 Link Aggregation (LAG/LACP) & Redundant Trunk Groups (RTG) 12.3 Virtual Chassis Roles and Elections 12.4 Virtual Chassis Links, Splits and Provisioning 12.5 Routing Engine Redundancy: GRES, NSR, NSB and GR 12.6 BFD Detection and VRRP Gateway Redundancy 12.7 Unified ISSU: Requirements and Verification

3.2 STP Costs, Port Roles, States and BPDUs

Key Takeaways Explain This Topic AI

Long path-cost values distinguish modern link speeds; a 10-Gbps link normally has cost 2000.

RSTP root/designated/alternate/backup roles are different from discarding/learning/forwarding states.

BPDUs convey root and path information plus proposal/agreement and topology-change flags; they do not negotiate a native VLAN.

Last updated: October 2026

Path Cost Calculation: 802.1D vs. 802.1t

Each interface in the spanning tree topology is assigned a path cost representing link bandwidth. As BPDUs travel away from the Root Bridge, each non-root switch adds the receiving interface's ingress cost to the accumulated root path cost.

Legacy IEEE 802.1D used a 16-bit path cost value. This standard quickly became obsolete with the advent of Gigabit and 10-Gigabit Ethernet because 1 Gbps links defaulted to a cost of 4 and 10 Gbps links defaulted to 2 or 1, leaving no dynamic range for 40 Gbps or 100 Gbps speeds.

To solve this, IEEE published 802.1t , establishing a 32-bit path cost metric. Junos OS utilizes 802.1t 32-bit path costs by default across all EX and QFX series switches:

  • Interface Speed 802.1D Cost (16-bit legacy) 802.1t Cost (32-bit Junos Default)
  • 10 Mbps 100 2,000,000
  • 100 Mbps (Fast Ethernet) 19 200,000
  • 1 Gbps (Gigabit Ethernet - ge ) 4 20,000
  • 10 Gbps (10-Gigabit Ethernet - xe ) 2 2,000
  • 40 Gbps (40-Gigabit Ethernet - et ) 1 500
  • 100 Gbps (100-Gigabit Ethernet - et ) 1 200

Engineers can manually override the interface cost in Junos to steer traffic along preferred physical paths: [edit protocols rstp]

  • user@EX4300# set interface ge-0/0/0.0 cost 1000
  • Spanning Tree Port Roles: 802.1D vs. 802.1w

In 802.1D, interfaces are classified into three primary roles: Root Port, Designated Port, or Non-Designated (Blocking) Port. RSTP (802.1w) refines these definitions into four distinct, deterministic roles:

Root Port (RP) : Exactly one port on each non-root switch that provides the lowest accumulated path cost back to the Root Bridge. Root Ports forward user data traffic and receive BPDUs.

Designated Port (DP) : Exactly one port per physical link/segment that advertises the lowest path cost to the Root Bridge for that segment. The root’s ports are normally designated; a redundant connection to the same shared segment can instead have a backup role. Designated Ports transmit BPDUs down into the network and forward data frames.

Alternate Port (AP) : An interface that receives superior BPDUs from another switch, representing an alternate, redundant path to the Root Bridge. The Alternate Port remains in a non-forwarding state but immediately transitions to a Root Port if the primary Root Port fails.

Backup Port (BP) : An interface that receives superior BPDUs transmitted by the same switch (typically seen only when redundant ports connect to an unmanaged hub or shared collision domain). The Backup Port acts as a standby backup for the switch's own Designated Port.

Port States: 802.1D vs. RSTP

Legacy 802.1D defines five distinct port operational states. Because three of these states (Disabled, Blocking, Listening) do not forward user frames or populate the MAC address table, RSTP unifies them into a single operational state called Discarding .

802.1D Legacy State RSTP (802.1w) State Forwards Data Frames? Learns MAC Addresses? Processes BPDUs?

  • Disabled Discarding No No No
  • Blocking Discarding No No Yes
  • Listening Discarding No No Yes
  • Learning Learning No Yes Yes
  • Forwarding Forwarding Yes Yes Yes

Discarding : The port prevents Layer 2 loops by dropping all received data frames and refusing to transmit traffic. It listens to and evaluates incoming BPDUs to maintain topology awareness.

Learning : The port prepares to forward traffic by inspecting the source MAC addresses of passing frames to build the local forwarding database, but it does not yet forward user data frames.

Forwarding : The port fully participates in data transmission, actively learning MAC addresses and forwarding unicast, multicast, and broadcast frames.

BPDU Structure and Encodings

Switches exchange spanning tree control information inside Bridge Protocol Data Units (BPDUs) , encapsulated directly in Ethernet frames with destination MAC 01:80:C2:00:00:00 :

802.1D BPDUs : Legacy STP uses two separate frame formats: the Configuration BPDU (Type 0x00 ), which originates solely from the Root Bridge and is relayed downstream by designated bridges, and the Topology Change Notification (TCN) BPDU (Type 0x80 ), which non-root switches transmit upstream toward the Root Bridge when link states change.

RSTP BPDUs : RSTP uses a single unified RST BPDU (Protocol Version 2, BPDU Type 0x02 ). Every switch generates its own RST BPDUs every Hello interval (default 2 seconds), regardless of whether it receives a BPDU from the Root Bridge.

Furthermore, while 802.1D uses only 2 of the 8 bits in the BPDU Flag Byte (Bit 0 for Topology Change and Bit 7 for Topology Change Acknowledgment), RSTP utilizes all 8 bits of the Flag Byte to execute its rapid convergence protocol: +--------+----------+-----------+-----------+----------+------------+-----------+--------+

  • | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
  • | TCA |Agreement |Forwarding | Learning | Port Role (2 bits) | Proposal | TC |
  • +--------+----------+-----------+-----------+----------+------------+-----------+--------+

The Port Role bits encode four values: 00 (Unknown), 01 (Alternate/Backup), 10 (Root), and 11 (Designated). The Proposal and Agreement bits drive RSTP's sub-second handshake synchronization.

Loading diagram... Bridge Identifier (BID) Format and Components