ICS 351: Today's plan
- Ethernet switches
- spanning tree protocols
Ethernet equipment
- much experience so far in lab with Ethernet
- different equipment used to connect Ethernet segments:
- hubs: broadcast everything
- switches: broadcast packets to 0xffffff, and packets
for destinations that are not known, selectively transmit where
possible
- routers: forward packets among different IP networks
- hubs and switches work within a single IP network as a
single broadcast medium (but switches don't always broadcast)
- traditional bridges had two interfaces, and forwarded
everything from one interface to the other -- hubs and switches
both implement this bridging function
Learning Switches
- if a switch gets a packet from A on interface I, it forwards the
packet,
- and remembers that A can be reached on interface I
- the next time a packet for A is received on interface I', it is only
forwarded on interface I (unless I == I', and then it is not forwarded)
- if there is no record of communication from A (within the last 60
seconds), the packet is broadcast on all interfaces except I'
Broadcast Storms
- given a network with redundant links
- if the network is connected by hubs, every packet will cause
collisions with itself
- if the network is connected by switches, any broadcast
packet will live forever
- packets may even be multiplied if there is more than one loop
- this is useless traffic that gets in the way of useful
traffic -- a "broadcast storm"
Preventing broadcast storms
- have no redundant links in the network, or
- restrict "broadcast" forwarding by switches:
- select a root switch, based on priority, using MAC addresses to
break ties in case of equal priority
- find a least-cost path to the root, reached via
the root port for this switch
- for each segment, determine a least-cost switch port to use to
reach the root, the designated port for this segment
- only forward broadcasts along root ports and designated ports
Rapid Spanning Tree Protocol, RSTP
- the regular spanning tree protocol can take tens of seconds
to converge after a topology change
- instead, a switch can pre-select alternate ports that
also lead to the root bridge
- broadcast data is only sent on alternate ports when it is
determined that the root port is disconnected
- similarly for backup paths to individual segments
- switches also actively exchange their information, so one
switch can quickly hand off forwarding to another switch