Lecture 4 - Spanning Tree Protocol + Token Ring
Lecture 4 - Spanning Tree Protocol + Token Ring
B
B3
D B7
B2 K
B
B3
C B5 In order to populate forwarding tables
B2
D B7 K so that packets don’t end up looping
forever, first we have to remove cycles
E F
B1
from the network graph and find a
spanning tree.
G H
B6 B4
I
J
Spanning Tree Algorithm : A Loop prevention protocol
Bridge ID
Composed of
Bridge Priority - Often default
values
MAC address
Spanning Tree Protocol: BPDU messages
Root Port Selection : Lowest Bridge ID
Spanning Tree Protocol
Next Step:
Root Port Selection
Path Cost
• Bridges use concept of cost to evaluate
how close they are to other bridges
Root Port Selection
Basic idea: A token circulates around the ring. When a host has a
frame to transmit, it seizes the token and injects the frame on the
medium. The frame is forwarded by intermediate nodes until
arriving at the destination. The destination puts the frame back
after receiving it, but with a “special mark”. The frame circulates
back to the sender.
Physical Properties
Question: What happens if a node on the ring fails?
Host Host
Host
From previous
Typical token ring data rates go from 4 Mbps
to 16 Mbps. Number of stations can be as
MSAU
To next
MSAU
Host high as 260.
Token Ring Frame Format
(IEEE 802.5)
8 8 8 48 48 Variable 32 8 8
Start Access Frame Dest Src Body Checksum End Frame
delimiter control control addr addr delimiter status
Switches
Connected to a set of links: each one runs a data-
link (layer 2) protocol.
Primary job: receive incoming frames/packets from
one link and output them to the appropriate link.
Each input or output is a port (bidirectional).
Question: How does a switch decide what output port to use?
Alternatives:
Datagrams, or Connection-less approach
Source routing.
Datagrams : connectionless networks
Destinati Port
on
Host D
0 Switch 1 Host E
A 3 3 1
Host F
Host C 2 Switch 2
B 0 2 3 1
0
C 3 Host A
D 3
E 2 Host G
1
0 Switch 3
3
Host B
F 1 2
G 0 Host H
Establish a connection 3
0
1 3
0
1 2