0% found this document useful (0 votes)
73 views43 pages

Spanning Tree Protocol: and Other Advanced Ethernet Topics

The document discusses spanning tree protocol (STP) and its use in eliminating switching loops in networks with redundant paths. STP works by electing a root bridge and designating ports on each segment, blocking all other ports to ensure a loop-free topology. Bridges exchange BPDU frames to agree on the spanning tree. Rapid STP was developed to reduce convergence time from around 50 seconds in STP to less than 30 seconds. The document also introduces the concept of virtual LANs (VLANs) for logically segmenting networks without physical reconfiguration.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views43 pages

Spanning Tree Protocol: and Other Advanced Ethernet Topics

The document discusses spanning tree protocol (STP) and its use in eliminating switching loops in networks with redundant paths. STP works by electing a root bridge and designating ports on each segment, blocking all other ports to ensure a loop-free topology. Bridges exchange BPDU frames to agree on the spanning tree. Rapid STP was developed to reduce convergence time from around 50 seconds in STP to less than 30 seconds. The document also introduces the concept of virtual LANs (VLANs) for logically segmenting networks without physical reconfiguration.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Spanning Tree Protocol

And Other Advanced Ethernet Topics

2E1623
Data Links and Local
Area Networks
Learning Bridges—Loop Problem

2
From B. A. Forouzan: Data Communications and Networking, 3rd ed, McGraw-Hill
Spanning Tree—Basic Idea

• Discover a subset of the topology that is loop-free (a


tree)
• Just enough connectivity so that:
ƒ there is a path between every pair of segments where
physically possible
o the tree is spanning
• Disable (block) all other ports

3
Spanning Tree Starting Point

• Each bridge has a unique ID


• Each port has a unique ID within the bridge
• A cost can be calculated for each path
between two bridges

4
From B. A. Forouzan: Data Communications and Networking, 3rd ed, McGraw-Hill
Spanning Tree Process

1. The node with the smallest ID is selected the root bridge


2. On each bridge, select a root port
ƒ Port with the least cost path to the root bridge

3. On each LAN segment, select a designated bridge


ƒ Bridge with least cost path to root bridge
o If two bridges have same cost, select the bridge with smallest ID

ƒ Mark the corresponding port as the designated port

4. Forward frames only on marked ports


ƒ Designated ports and root ports
ƒ Block on the others

5
Before Spanning Tree

6
From B. A. Forouzan: Data Communications and Networking, 3rd ed, McGraw-Hill
Applying Spanning Tree

7
From B. A. Forouzan: Data Communications and Networking, 3rd ed, McGraw-Hill
Forwarding Ports and Blocking Ports

Blocked

• Note that STP is not a routing protocol


ƒ In the sense that it does not optimize routing
ƒ Traffic concentration towards the root
8
9
Spanning Tree Protocol

• Protocol to calculate a spanning tree

• Convergence
ƒ All bridges should reach a unified view of
the spanning tree

• Special frames sent between neighbour


switches
ƒ Bridge Protocol Data Units, BPDUs

ƒ Not forwarded!
10
Bridge Protocol Data Unit (BPDU)

2 1 1 1 8 4 8 2 2 2 2 2
Root
Proto BPDU Root Bridge Port Msg Max Hello Forward
Ver Flags Path
ID Type ID ID ID Age Age Time Delay
Cost

2 6 2 6
MAC MAC
Priority Priority
Address Address

• Sent as an 802.1 frame


ƒ Destination MAC address 01-80-C2-00-00-00 (multicast)
ƒ BPDU Type 0

• Sent periodically (Hello Time) by root bridges


ƒ Triggers sending of BPDUs in designated bridges

11
Initial State

<Root ID, Root Path Cost, Bridge ID>


I am root
A

<A,0,A> <A,0,A>
<B,0,B> <C,0,C>
I am root I am root

<C,0,C>

<B,0,B>
B C

12
Root Bridge Recognized

<Root ID, Root Path Cost, Bridge ID>


I am root
A

<A,0,A> <A,0,A>

<A,1,C>

<A,1,B>
B C

I am I am
designated designated 13
Designated Bridge Recognized

<Root ID, Root Path Cost, Bridge ID>


I am root
A

<A,0,A> <A,0,A>

<A,1,B>
B C

I am
designated 14
Ports Disabled

<Root ID, Root Path Cost, Bridge ID>


I am root
A

<A,0,A> <A,0,A>

<A,1,B>
B C

I am
designated 15
Topology Changes and Learning Table

• Entries in learning table expires


ƒ Normally after 5 minutes

ƒ Incorrect forwarding
o “Black hole”

• Solution:
ƒ Faster expiration time when network
configuration has changed

ƒ Topology Change Notification PDU

16
Topology Change Notification

2 1 1 1 8 4 8 2 2 2 2 2
Root
Proto BPDU Root Bridge Port Msg Max Hello Forward
Ver Flags Path
ID Type ID ID ID age Age Time Delay
Cost

T
T
C
C
N

• Topology change at a • Bridge sends


bridge spontaneous BPDU
ƒ Port failure ƒ Topology Change
Notification BPDU
ƒ No periodic
configuration BPDUs ƒ BPDU type 0x80
ƒ Port status change

17
Topology Change
TCN BPDU: <Flags>
Configuration BPDU: <Root ID, Root Path Cost, Bridge ID,
Flags, Forward Delay>

I am root
A

<TCA>
Forwarding
<A,0,A,TC, D> Delay shorter
<A,0,A,TC, D>
than normal
<TC>

B C 18
Spanning Tree Protocol Timing

2 1 1 1 8 4 8 2 2 2 2 2
Root
Proto BPDU Root Bridge Port Msg Max Hello Forward
Ver Flags Path
ID Type ID ID ID age Age Time Delay
Cost

• Protocol is timer driven


• Too short timers can give loops and
instabilities
• Too long timers can give long convergence
times
ƒ Until network reaches a stable spanning tree
configuration
19
Designated Bridge Recognized

<Root ID, Root Path Cost, Bridge ID>


I am root
A

<A,0,A> <A,0,A>

I am
designated

<A,1,B>
B C

20
Ports Disabled

I am root
A

I am
designated

B C

21
Port States

Listening
BPDU processing, no
learning, no forwarding Max Age
timeout
Blocked by algorithm
Forward Delay
timeout

Learning Blocked by algorithm Blocking


BPDU processing, No BPDU processing, no
learning, no forwarding learning, no forwarding

Forward Delay
timeout
Blocked by algorithm

Forwarding
BPDU processing,
learning, forwarding

22
Rapid Spanning Tree Protocol

• Ordinary STP takes 30 – 50 seconds to


converge, with default settings

• Rapid Spanning Tree Protocol (RSTP)


ƒ IEEE 802.1w

ƒ Full-duplex mode
o No shared links

23
RSTP vs STP

• RSTP has two more port designations


ƒ Alternate Port—backup for Root Port
ƒ Backup port—backup for Designated Port on the
segment

• In RSTP, all bridges send BPDUs automatically


ƒ While in STP, the root triggers BPDUs

• In RSTP, bridges act to bring the network to


convergence
ƒ While in STP, bridges passively wait for time-outs
before changing port states

24
Virtual Local Area Networks
Virtual LANs (VLAN)

• Need a way to divide the LAN into


different parts
ƒ Without physical reconfiguration

• Moving stations without


reconfigurations
• Create virtual workgroups
• Keep broadcasts isolated
• Keep different protocols from each
other
26
VLAN Divides LAN Into Logical Groups

27
From B. A. Forouzan: Data Communications and Networking, 3rd ed, McGraw-Hill
VLAN Grouping

• How is VLAN membership determined?


ƒ Port number
o Ports 1, 2, 7: VLAN 1

o Ports 3, 4, 5, 6: VLAN 2

• MAC address

• Frame tagging
ƒ VLAN trunking

ƒ Many VLANs over the same link


28
Frame Tagging

6 bytes 6 bytes 2 bytes 2 bytes 46-1500 bytes 4 bytes


Destination Source Tag Length/
DATA CRC
address address Header Type

TPID User VLAN


CFI
(81-00) Priority Identifier
16 bits 3 bits 1 bit 12 bits

• Tag header added to Ethernet header


ƒ IEEE 802.1Q

• 12-bit VLAN ID allows for 4096 VLANs


29
Spanning Trees and VLANs

• Per VLAN Spanning Tree


ƒ One spanning tree per VLAN

ƒ Many spanning tree instances to maintain

ƒ Different roots in different STs


o load sharing

• Common Spanning Tree


ƒ One spanning tree for all VLANs

ƒ Simple, but all traffic goes the same way


30
Multiple Spanning Tree

• Multiple Spanning Tree Protocol (MSTP)


• Network organized in regions
• Regions have their own Multiple
Spanning Tree Instances (spanning-tree
topologies)
ƒ VLANs are associated to MSTIs

• One common spanning tree (CST) for


the entire network
• MSTP based on RSTP (Rapid STP)
31
VLAN Signalling

• GVRP

32
Autonegotiation
Ethernet Autonegotiation

• Incompatible rx/tx modes


ƒ Full/half duplex
ƒ 10/100/1000 Mb/s

• Autonegotiation to allow two devices to


agree on speed and duplex mode
• Based on 10BASE-T “heartbeat”
ƒ Normal Link Pulse
ƒ Sent every 16 ms on idle link

34
Link Code Word

• 100BASE-T “Fast Link Pulse”


• 16-bit code word, with a “Technology ability
field” (8 bits)
ƒ 100BASE-T full duplex
ƒ 100BASE-T4
ƒ 100BASE-T
ƒ 10BASE-T full duplex
ƒ …

• Misconfiguration problems
ƒ Connectivity loss or performance degradation

35
Ethernet PAUSE Frames

6 bytes 6 bytes 2 bytes 2 bytes 2 bytes 42 bytes 4 bytes


Control
Destination Source Type
operation Duration Reserved CRC
address address (88-08)
(00)

• Flow control
ƒ Full duplex mode only
ƒ Negotiated through auto-negotiation

• MAC Control Frame


• Destination address
ƒ 01:80:C2:00:00:01 (pre-defined multicast address)
or address of remote bridge

• Duration is time in units of 512-bit times 36


Quality of Service and Multicast
Quality of Service Switching

6 bytes 6 bytes 2 bytes 2 bytes 46-1500 bytes 4 bytes


Destination Source Tag Length/
DATA CRC
address address Header Type

TPID User VLAN


CFI
(81-00) Priority Identifier
16 bits 3 bits 1 bit 12 bits

• Class of Service
ƒ User Priority field in IEEE 802.1Q header

ƒ 0 – 7, with 7 as highest priority value


38
DiffServ Packet Marking and Aggregation

• Each packet is marked with a DSCP (Differentiated Services


Code Point) directly in the 8-bit IP ToS header field
ƒ 6 bits used Æ 64 possible code points (in practice much less is
used)
ƒ Code points are unique within a domain – but may change at
domain borders

• An ingress node aggregates packets into behavior aggregates,


each marked by a unique code point (DSCP)

DSCP

8-bit ToS Field

IP header IP payload

39
From QoS, RSVP and MPLS Lecture
Quality of Service Switching

• QoS processing depends on


ƒ QoS configuration of port
ƒ IP DSCP
o Ignored, or set to predefined value

ƒ 802.1Q CoS
o Ignored, set to predefined value, or
computed from DSCP

ƒ…
40
Multicast

• Multicast traffic is, by default, flooded


ƒ Increases traffic load
• Switches implement IGMP Snooping
ƒ Internet Group Management Protocol
o Like ICMP
o Monitor “Membership Reports” and “Leave Reports”
o Only forward multicast frames to ports where there are
receivers

ƒ MAC multicast group address is calculated from IP


multicast address
o 25 static bits (01:00:5e:0) plus last 23 bits from IP address
o Hashing—multiple IP addresses map to the same MAC address

41
Summary

• Spanning Tree • Autonegotiation


Protocol ƒ Half/full duplex
ƒ Port disabling ƒ Speed
ƒ Bridge PDUs ƒ Flow control
ƒ Rapid Spanning Tree ƒ …
Protocol (RSTP)
• Quality of Service
• VLANs
• Multicast
ƒ IEEE 802.1Q

ƒ Multiple Spanning
Tree Protocol (MSTP)

42
Reading Instructions

• Behrouz A. Forouzan, ”Data Communications and


Networking,” third edition
ƒ 14 Local Area Networks: Ethernet
o 14.1 Traditional Ethernet
o 14.2 Fast Ethernet
o 14.3 Gigabit Ethernet

ƒ 16 Connecting LANs, Backbone Networks, and Virtual LANs


o 16.1 Connecting Devices
o 16.3 Virtual LANs

• Backes, F., "Transparent bridges for interconnection of


IEEE 802 LANs," IEEE Network, Vol. 2, No. 1. 1988

43

You might also like