CompSci 356: Computer Network Architectures
Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch 3.1.5 & 3.2
Xiaowei Yang [email protected] Review
• Past lectures – Single link networks • Point-to-point, shared media – Ethernet, token ring, wireless networks • Encoding, framing, error detection, reliability – Delay-bandwidth product, sliding window, exponential backoff, carrier sense collision detection, hidden/exposed terminals
– Packet switching: how to connect multiple links • Connectionless: Datagram • Connection-oriented: Virtual circuits • Source routing • Pros and cons • Ethernet switches Today
• Spanning Tree Algorithm • Virtual LAN • New topic: how to connect different types of networks – E.g., how to connect an Ethernet and an ATM network Learning Bridges • Overall design goal: complete transparency • Plug-and-play • Self-configuring without hardware or software changes • Bridges should not impact operations of existing LANs
• Three parts to learning bridges: • (1) Forwarding of Frames • (2) Learning of Addresses • (3) Spanning Tree Algorithm (1) Frame Forwarding
• Assume a MAC frame arrives Port x onIs port MAC x. address of destination in forwarding Bridge 2 table? Port A Port C Port B
Not Found? found ?
Flood the frame, Forward the frame on the i.e., appropriate port send the frame on all ports except port x. Danger of Loops • Consider the two LANs that are connected by two bridges. • Assume host A is transmitting a frame F with a broadcast address LAN 2 What is happening? • Bridges A and B flood the frame to LAN 2. F F • Bridge B sees F on LAN 2, and updates the port mapping of Bridge A Bridge B MAC_A, and copies F F the frame back to LAN 1 • Bridge A does the same. LAN 1 • The copying continues Where s the problem? What s the F solution ?
host A Spanning Tree Algorithm • A solution is the spanning tree algorithm that prevents LAN 2
loops in the topology d – By Radia Perlman at DEC Bridge 3 Bridge 4
Bridge 1 LAN 5
Bridge 5
LAN 1
Bridge 2
LAN 3 LAN 4 Algorhyme (the spanning tree poem)
• I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree that must be sure to span So packets can reach every LAN. First, the root must be selected. By ID, it is elected. Least-cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, Then bridges find a spanning tree.
• —Radia Perlman Graph theory on spanning tree
• For any connected graph consisting of nodes and edges connecting pairs of nodes, a spanning tree of edges maintains the connectivity of the graph but contains no loops – n-node