Title: Chapter 3 Ethernet Bridges
1Chapter 3Ethernet Bridges Switches, ATM
Switching
- Professor Rick Han
- University of Colorado at Boulder
- rhan_at_cs.colorado.edu
2Announcements
- Previous lecture online
- Reminder Programming assignment 1 is due Feb.
19 - Homework 2 will be available on the Web site on
Thurs. Feb. 7 - Shifted Office Hours Today 430-530 pm
- Reading in Chapter 3
- 3.2 Ethernet bridges and switches
- 3.1, 3.3 ATM packet switching
- Skip 3.4
- Next, Ethernet bridges, switches, and ATM
3Recap of Previous Lecture
- Interconnecting Ethernet LANs
- Ethernet Repeaters Hubs Physical Layer
- Amplify analog signal
- Problems
- Limited range
- Amplify noise
- Same collision domain
- Cant connect LANs with different bit rates
- Ethernet Bridges Layer 2
- Forward Ethernet frames
- Construct a table for frame forwarding
- When a frame arrives, put ltsrc addr, src LANgt in
table
4Recap of Previous Lecture (2)
- Ethernet Bridges Layer 2
- Frame forwarding rules
- If dest. and src on same LAN, dont forward frame
- If dest. and src on diff. LAN, route frame to
dest. LAN - If dest. unknown, forward to all outgoing
interfaces - Advantages
- Can connect LANs with different bit rates
- Separate collision domains
- Indefinite range
- No noise amplification
- Problems
- Loops can develop, causing endless packet
forwarding - Packet multiplication effect
- Solution spanning trees
5Problems With Bridges
- Bridges can interconnect LANs and have multiple
paths between every node - Inadvertent
Layer 2 Bridge
Bridge
- Purposely for robustness, in case highest tier
fails
Bridge
- Problem Frames can cycle forever in a loop and
multiply to crash LAN!
Bridge
6Problems With Bridges Packet Multiplication
Effect
- Suppose all bridges have just booted
- Suppose A wants to send to Z
Bridge 4
Bridge 1
- Bridge 1 sends As frame to LAN 5 4
- These two frames propagate to Bridge 3, where
they multiply into 4 copies
LAN4
Z
LAN1
A
LAN3
LAN5
Bridge 2
LAN2
Bridge 3
- Exponentially multiplying copies!
7Problems With BridgesEndless Looping
- Suppose all bridges have just booted
- Suppose A wants to send to Z
Bridge 4
Bridge 1
- Bridge 2 sends frame to LAN 2
- Bridge 3 sends frame to LAN 3
- Bridge 4 -gt LAN 4
- Back to LAN 1
LAN4
A
Z
LAN1
LAN3
Bridge 2
LAN2
Bridge 3
- Frames can cycle forever!
8Solution Spanning Tree Algorithm
- Invented by Radia Perlman, modified into 802.1d
spanning tree standard - Bridges communicate with each other to set up a
spanning tree that has no loops
Bridge 4
Bridge 1
- Disconnect some interfaces, though physical link
exists - Some frames may take long route though shorter
direct route exists
LAN4
A
Z
LAN3
LAN1
Bridge 2
LAN2
Bridge 3
- Some bridges may become orphans
9Rules to Build Spanning Tree
- Elect a root bridge with the smallest global id
- Each bridge computes its shortest distance to
root - Each LAN selects a forwarding/designated bridge
closest to root
Bridge 4
Bridge 3
- Spanning tree root forwarding bridges
- Root forwards frames on all outgoing ports
- If dest. not on LAN, send via forwarding bridge
- Eliminates loops!
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
Root
10Control Messages to Build Spanning Tree
- Each bridge creates a configuration message
- ltbridge source id, distance to root, root bridge
idgt - Each bridge floods its initial configuration
message on each of its ports/LANs - ltsrcmy id, dist.0, rootmy idgt
- Each bridge stores best config msg for each
port/LAN - A config msg C1 is better than stored config msg
C2 if - Root id of C1 lt root id of C2
- Root ids equal and distance of C1 lt distance of
C2 - If root ids and distances equal, C1 is better
than C2 if transmitting bridge on C1 is lower
than C2
11First, Elect the Root
- If advertised root of new config msg C1 has
smaller id, then - Stop sending out its own bridge id config msgs
- Forward new smaller id on all outgoing ports
- Higher id config messages are discarded.
- Eventually, lowest ID bridge suppresses all other
bridges config msgs - Root bridge knows it is the root because the
lowest ID is its own
Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
12First, Elect the Root (2)
- Example
- Regardless of the config msgs exchanged by
Bridges 2,3, and 4, as soon as Bridge 1 floods
its config msg to Bridge 2 and 4, they both
- stop sending out their own bridge id config msgs
and - Begin forwarding Bridge 1s config msg on all
outgoing ports - Eventually, Bridge 3 also stops sending its
config msgs
Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
13Next, Build Shortest-Path Forwarding Tree to Root
- Conceptually, build shortest-path forwarding tree
after electing the root - But, as the roots config msg floods the network,
notice that the shortest-path tree can
simultaneously be calculated - Thus, piggyback on Bridge 1s config msg flooding
to set up the shortest path tree to root - Each bridge increments by one the distance, as it
receives Bridge 1s config msg, and forwards
config msg with Bridge 1 as root to all outgoing
ports
14Next, Build Shortest-Path Forwarding Tree to Root
(2)
- When a bridge receives a config message from
another bridge on same LAN with Bridge 1 as root,
it stops sending config messages on that port/LAN
if - Other bridge is closer to root
- Other bridge is same distance from root, but has
a lower ID - Thus, a bridge de-selects itself as the
designated forwarding bridge for that port/LAN
15Next, Build Shortest-Path Forwarding Tree to Root
(3)
- Bridge 1 floods its config message
- Bridge D is part of a loop, and will receive
multiple config msgs from Bridge 1 - Bridge D deselects itself from both LANs because
Bridges 2 3 are closer to root Bridge 1
Bridge 1
Bridge 2
Bridge 3
Bridge D
16Next, Build Shortest-Path Forwarding Tree to Root
(4)
- Bridge 4 is designated forwarding bridge for LAN
A, since it closer to root than Bridge 3 on LAN A - Bridge 3 removes itself
- For LAN B, Bridge 2 is designated forwarding
bridge - Bridge 3 removes itself
Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
17Topology Change
- Root bridge periodically sends keep-alive
messages - If this is not heard locally, then local bridges
start the spanning-tree algorithm all over again - Handles the case when root bridge failed
- Handles the case when intermediate bridge failed,
and the network becomes a - Partitioned network
- Non-partitioned network
18Ethernet Switches
- Essentially, the same as bridges, with support
for many more interfaces - Still forward frames based on destination address
- Still construct forwarding table based on source
address - Special routing fabric to speed frame routing
from input interface to output interface
1980/20 Rule
- Position a bridge so that
- 80 of traffic on a segment is local
- 20 is forwarded
- Higher throughput, because each LAN has its own
conversation - Example place users of Server 1 on same LAN.
Server 1 could be a file/Web server
Server 2
Server 1
20Why Not Bridge Ethernet Indefinitely?
- Couldnt really bridge cross-country
- Delay accumulates in each bridge
- Many bridges, due to small segment sizes
- Many different types of LANs, e.g. Token Ring
and FDDI, with completely different addressing
schemes
?
Ethernet
Ethernet
21ATM Switching
- Point-to-Point Links Interconnect Switches
- Closer to Internet topology
- Dont connect shared-media segments
Switch C
Host A
Switch B
Host F
Switch E
Switch D
22ATM Switching (2)
- Big difference with Internet routing ATM uses
virtual circuits to route packets - Packet switching, but with fixed-length cells
- 48 bytes 5 bytes header
- Why fixed-length cells?
- Optimized hardware in switch can get higher
throughput - Why 48 bytes?
- Europe and US couldnt agree, one wanted 64 bytes
and another 32 bytes, so they split the difference
23ATM Adaptation Layer 3/4
- Due to small packet sizes, need a layer above ATM
to fragment and reassemble long packets - ATM Adaptation Layer (AAL) 3/4
- IP packets can be encapsulated in ATM packets IP
over ATM - ATM operates as a part of Internet backbone
- Since ATM is network layer protocol, then still
need link layer SONET, e.g. encapsulate IP over
ATM over SONET - too much overhead!
24Virtual Circuit Routing
- Create a virtual circuit path across an
interconnected mesh of switches - Each packet is labeled with a virtual circuit ID
in its header
Switch C
Host A
Switch B
Host F
Switch E
Switch D
25Virtual Circuit Routing (2)
- Each node chooses an unused VC number on a leg of
circuit - Each switch maintains a routing table mapping VC
on input interface to VC on output interface
Switch C
7
Host A
Switch B
Host F
10
88
Switch E
Switch D
26Virtual Circuit Routing (3)
Switch B Routing Table
Any cell with VCI7 from A Is (1) relabeled with
VCI88 (2) Then routed onto E interface
Incoming Interface Incoming VCI Outgoing Interface Outgoing VCI
From A 7 To E 88
Switch C
7
Host A
Switch B
Host F
10
88
Switch E
Switch D
27Virtual Circuit Routing (4)
Switch E Routing Table
Any cell with VCI88 from B Is (1) relabeled with
VCI10 (2) Then routed onto F interface
Incoming Interface Incoming VCI Outgoing Interface Outgoing VCI
From B 88 To F 10
VCs have local scope
Switch C
7
Host A
Switch B
Host F
10
88
Switch E
Switch D
28Setting up VC Routing Tables
- Permanent Virtual Circuits (PVC) are set up by a
network administrator - Switched Virtual Circuits (SVC) are set up by
sending control signals into the network - Send setup message with dest. address
- Assume for now that switches can determine the
best outgoing interface to forward a setup packet
on when the setup packet arrives - As setup message courses through network, each
switch picks its incoming VCI (an unused ) - When setup msg reaches destination, send
acknowledgment back along same path, so each
upstream switch knows VCI chosen by downstream
switch