Announcements Late homework policy New Add Updated on course website

Slides:



Advertisements
Similar presentations
Communication Networks Recitation 3 Bridges & Spanning trees.
Advertisements

Topic 7 Local Area Networks (LAN)
Cs/ee 143 Communication Networks Chapter 6 Internetworking Text: Walrand & Parekh, 2010 Steven Low CMS, EE, Caltech.
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
CSE 534 Fundamentals of Computer Networks Lecture 4: Bridging (From Hub to Switch by Way of Tree) Based on slides from D. Choffnes Northeastern U. Revised.
CS 4700 / CS 5700 Network Fundamentals Lecture 7: Bridging (From Hub to Switch by Way of Tree) Revised 1/14/13.
CPSC 441 TUTORIAL TA: FANG WANG HUBS, SWITCHES AND BRIDGES Parts of the slides contents are courtesy of the following people: Jim Kurose, Keith Ross:
Bridging. Bridge Functions To extend size of LANs either geographically or in terms number of users. − Protocols that include collisions can be performed.
1 Chapter 9 Computer Networks. 2 Chapter Topics OSI network layers Network Topology Media access control Addressing and routing Network hardware Network.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
CSE390 Advanced Computer Networks Lecture 7: Bridging (From Hub to Switch by Way of Tree) Based on slides from D. Choffnes Northeastern U. Revised Fall.
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
Cs/ee 143 Communication Networks Chapter 3 Ethernet Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random.
Connecting LANs, Backbone Networks, and Virtual LANs
17-LAN extensions: Fiber Modems, Repeaters, Bridges and Switches Dr. John P. Abraham Professor UTPA.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 8: Bridging Slides used with permissions.
1 Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
1 CS 4396 Computer Networks Lab LAN Switching and Bridges.
CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001.
Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
The Medium Access Control Sublayer Chapter 4. The Channel Allocation Problem Static Channel Allocation Dynamic Channel Allocation  Delay for the divided.
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
Multiplexing FDM & TDM. Multiplexing When two communicating nodes are connected through a media, it generally happens that bandwidth of media is several.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Scaling Broadcast Ethernet Some slides used with.
Cisco 3 - Switching Perrine. J Page 16/4/2016 Chapter 4 Switches The performance of shared-medium Ethernet is affected by several factors: data frame broadcast.
Sem1 - Module 8 Ethernet Switching. Shared media environments Shared media environment: –Occurs when multiple hosts have access to the same medium. –For.
CSE 461 University of Washington1 Topic How do we connect nodes with a switch instead of multiple access – Uses multiple links/wires – Basis of modern.
1 Data Link Layer Lecture 23 Imran Ahmed University of Management & Technology.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
Ch. 15 Connecting LANs.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
CCNA3 Module 4 Brierley Module 4. CCNA3 Module 4 Brierley Topics LAN congestion and its effect on network performance Advantages of LAN segmentation in.
1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
Chapter 3 Part 1 Switching and Bridging
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
CS 3700 Networks and Distributed Systems
CT301 LECTURE 8.
Bridging.
3. Internetworking (part 2: switched LANs)
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
Chapter 4 Data Link Layer Switching
: An Introduction to Computer Networks
Chapter 3 Part 1 Switching and Bridging
CS 3700 Networks and Distributed Systems
CS 457 – Lecture 8 Switching and Forwarding
Services of DLL Framing Link access Reliable delivery
Intra-Domain Routing Jacob Strauss September 14, 2006.
LAN switching and Bridges
CS 4700 / CS 5700 Network Fundamentals
Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs
Overview Jaringan Komputer (3)
LAN switching and Bridges
CS 4700 / CS 5700 Network Fundamentals
Dr. Rocky K. C. Chang 23 February 2004
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Chapter 15. Connecting Devices
LAN switching and Bridges
Bridges Neil Tang 10/10/2008 CS440 Computer Networks.
Virtual LAN (VLAN).
Presentation transcript:

Announcements Late homework policy New Add Updated on course website Up to 1 HW can be late for up to 5 days without penalty After that, late HW accepted and graded with discount of 10%/day for up to 5 days Late HW will not be accepted after 5 days from deadline New Add STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

Announcements Projects Details on the course website (will be updated) Form project team by Fri Oct 12 If your team wants to work on EV projects, talk to Zach Lee or me ASAP Let us know your background, esp software experience Schedule weekly meetings with TA by Fri Oct 19 Meetings start week 4 (10% of course grade) Project tutorials: Fri Oct 19 class There will be 2 tutorials Network simulator: ANB 105 ACN simulator: ANB 213 STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

Recap Sharing Metrics Scalability Layering Application topology Application & technology independence Application topology Little’s law: informal proof

Recap

cs/ee/ids 143 Communication Networks Chapter 3 Ethernet Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech Economic Dispatch in Power Networks with Storage March 10-12, 2010: Workshop on Distributed Decisions via Games and Price Mechanisms, Lund University, Sweden (Anders Rantzer)

Agenda Ethernet: MAC protocols Ethernet: routing protocol History and performance Ethernet: routing protocol Spanning tree protocol

Ethernet Each (layer 2) network full connectivity: every node can reach every other node broadcast capable: every node (inc. router) can broadcast to all other nodes e.g. Ethernet, WiFi, cable network, etc. A key issue: how to share common medium, efficiently & fairly ?

Ethernet Medium Access Control (MAC) protocols

Aloha network (1970) Randomized multiple access Send on frequency f1; receive ack on frequency f2.

Aloha network (1970) Randomized multiple access If an ack is not outstanding, transmit immediately If no ack after timeout, wait a random time and re-transmit

Aloha network (1970) Randomized multiple access Max utilization (prob of success) ~ 1/e ~ 37%

Slotted Aloha utilization Model Slotted time, fixed packet size, n stations 1 slot = 1 pkt transmission time In each slot, each station transmits independently with probability p Prob (slot t has a successful transmission)

Slotted Aloha utilization

Slotted Aloha utilization

Slotted Aloha utilization

Unslotted Aloha utilization Model Fixed packet size, n stations Slotted time of duration t << 1. pkt transmission time lasts 1/t time slots In each t-slot, each station transmits independently with probability p Small t => approximates unslotted operation Prob (slot t has a successful transmission)

Unslotted ALOHA utilization Prob (a pkt transmission started in an arbitrary t-slot by station 1 is successful)

Unslotted ALOHA utilization Prob (a pkt transmission started in an arbitrary t-slot by station 1 is successful)

Unslotted ALOHA utilization

Unslotted ALOHA utilization

Unslotted ALOHA utilization reduces to slotted case If K=1

Unslotted ALOHA utilization

Unslotted ALOHA utilization

Unslotted ALOHA utilization

Cable Ethernet (1973-76) CSMA/CD (carrier sensing multiple access/collision detection) Wait till channel is idle; wait for a random time. Transmit when the channel is idle following the random wait. Abort if collision is detected, and goto 1.

Cable Ethernet (1973-76) Truncated binary exponential backoff Pick X uniformly at random from {0, 1, ..., 2^n-1}, n = min (10, m), m = #collisions. Give up & declare error when m = 16. Wait X x 512 bit times (4,096 bits for 1G) If collide, increment m and repeat.

Cable Ethernet (1973-76) Capture or winner-takes-all effect A station that collides is more likely to pick a larger random backoff time. A station that successfully transmits is more likely to pick a smaller backoff time and hence more likely to successfully transmit again

Hub Ethernet (1980s) CSMA/CD as in Ethernet cable

Hub Ethernet (1980s) A station waits a random multiples of T = 2 PROP before transmitting When n stations transmit independently with prob p, then prob of success is <= 1/e when n is large Hence avg time till first success = e T Utilization = TRANS / (TRANS + (e-1)T) = 1 / (1 + 3.4A), A = PROP/TRAN

Switched Ethernet Ethernet switch eliminates collision, provided switch buffer is big enough.

Ethernet switch: forwarding table (Ethernet) MAC address 48 bit Globally unique to MAC device, location independent (c.f. IP) Broadcast address: 48 ones

Ethernet switch: forwarding table Example: A  J Send [J | A | data] to switch S1 S1 looks at table and sends it out on port 4 Etc. What happen if a switch receives a packet for a destination not in its table? e.g. if a new device has been added The switch broadcasts it on all its output ports, except the port on which the packet arrived [simple, not security-conscious] Whenever it gets a packet, it adds the corresponding source address to the table entry that corresponds to the port on which it came. e.g. when switch S1 receives [J | A | data] from port 1, it adds an entry [A=1] to its table. VLAN: network admin can define a subset of links to be a VLAN. Each link belongs to a set of VLANs. Packets are restricted to its own VLAN Benefit: security, service differentiation x  y: [ y | x | data ]

Agenda Ethernet: MAC protocols Ethernet: routing protocol History and performance Ethernet: routing protocol Spanning tree protocol

Ethernet bridges/switches Cable Ethernet H1 H2 H3 H4 H1 H2 H4 B2 B3 B4 B5 B1 B6 Switched Ethernet H3 STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

Ethernet routing: STP Goal Operation Example Performance STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! Goal Operation Example Performance

Spanning tree protocol Goal: for all switches in a LAN to compute a shortest-path tree used to route layer-2 packets one tree for entire LAN rooted at the switch with the smallest ID (MAC address) decentralized, asynchronous, robust computation STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

Spanning tree protocol Three criteria The root switch always forwards messages on all its ports Each switch computes its shortest path (in #bridges) to root All switches connected to a LAN elect a designated switch for the LAN to send packets towards root switch A switch that is not elected for any of the LANs it is connected to will not receive nor forward any data packet STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

Spanning tree protocol Switches send packets asynchronously with [ my ID | current root ID | distance to root ] A switch relays packets whose “current root ID” is the smallest it has seen so far (& smaller than its own “current root ID”), and adds 1 to “distance to root” If the “distances to root” on STP packets received by a switch on all its ports are the same or smaller than what it believes its distance is, then the switch stops forwarding … until protocol converges Completely decentralized, asynchronous, robust STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

STP: example I’m 3 I think root is 3 my distance to root is 0 STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! I think root is 3 my distance to root is 0

STP: example I’m 3 I think root is 3 my distance to root is 0 STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! I think root is 3 my distance to root is 0

STP: example a new initiation before previous converges STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

STP: example a new initiation before previous converges STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!

STP: example a new initiation before previous converges STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! During transient, B5 may connect to root B1 either via B3 or B4 – which should B5 use? Ans: use switch with a smaller ID (B3)

STP: example a new initiation before previous converges STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! B5’s distance to root (B1) is 2 and no greater than “distance to root” on STP packets it received from both its neighbors It stops forwarding (it will operate only as backup)

STP: designated switches STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! B4 believes its distance to root B1 is 2 The STP packets from both its ports have distances equal or less. So it does not forward and is not a designated switch for neither LAN B3 has smaller ID & connects the same LANs as B4 does

STP: result STP has converged STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! H1 H2 STP has converged The switches form a tree rooted at switch with smallest ID Every LAN segment is connected to exactly 1 designated switch

STP: result STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path! H1 H2 Neither B4 nor B5 will be involved in forwarding data packets

Spanning tree protocol Performance Unique path between every source-destination pair Can potentially be bad since 2 switches may communicate only via root e.g. in a ring of switches, the switch with the largest ID communicates with root via the longest path Penalty is usually not too bad since it is in a LAN STP: goal STP protocol allows the switches to find the shortest path tree rooted at the switch with the smallest ID (i.e. smallest MAC address on all its interfaces). To break a tie, a switch selects, among interfaces with the same distance to the root, the next hop with the smallest ID. STP: Operation Switches send packets with [my ID | current root ID | distance from current root], *asynchronously*. A switch relays packets whose “current root ID” is the smallest (& smaller than its current root ID) it has seen so far, and the switch adds one to the distance to current root ID. STP: Example Switch B3 starts by sending [3 | 3 | 1] Followed by switch B5, etc. Tie-breaking: When eventually B5 receives from both B3 and B4 packets [3 | 1 | 2] and [4 | 1 | 2], it chooses B3 because it has a smaller ID. STP: What is the performance? Can be bad, e.g., in a ring of switches, the switch with the largest ID communicate with root via *longest* path!