ethernet backoff revisited bridges and lan switches
play

Ethernet Backoff revisited Bridges and LAN Switches After N - PDF document

Ethernet Backoff revisited Bridges and LAN Switches After N collisions, pick a number k between 0 and 2 N -1 Wait for k*51.2 us Send frame if no one has started using the channel 9/20/06 CS/ECE 438 - UIUC, Fall 2006 1 9/20/06


  1. Ethernet Backoff revisited Bridges and LAN Switches  After N collisions, pick a number k between 0 and 2 N -1  Wait for k*51.2 us  Send frame if no one has started using the channel 9/20/06 CS/ECE 438 - UIUC, Fall 2006 1 9/20/06 CS/ECE 438 - UIUC, Fall 2006 2 Repeated Collisions Capture Effect  Suppose A, B, and C each have a  A and B collide frame to send, causing a collision A picks 0, B picks 1  A wins, transmits frame  A picks k=0, B and C pick k=1   Suppose A has another frame to send  A wins, sends frame A and B collide again   After A is done, B and C both try to A’s collision counter is 1, pick k from 0,1  send again B’s collision counter is 2, pick k from 0,1,2,3   Collision again  A is likely to win again  Increase collision counter And keep winning!  9/20/06 CS/ECE 438 - UIUC, Fall 2006 3 9/20/06 CS/ECE 438 - UIUC, Fall 2006 4 Bridges: Building Extended LAN’s Bridges Traditional LAN Problem   LANs have physical limitations Shared medium (e.g., Ethernet)   Ethernet – 1500m Cheap, easy to administer   Solution  Supports broadcast traffic  Connect two or more LANs with a bridge  Problem  Accept and forward  Scale LAN concept Level 2 connection (no extra packet header)   Larger geographic area (> O(1 km)) A collection of LANs connected by bridges is called an   extended LAN More hosts (> O(100))  But retain LAN-like functionality  Solution  bridges  9/20/06 CS/ECE 438 - UIUC, Fall 2006 5 9/20/06 CS/ECE 438 - UIUC, Fall 2006 6 1

  2. Uses and Limitations of Bridges vs. Switches Bridges  Switch  Bridges Receive frame on input port  extend LAN concept  Translate address to output port  Limited scalability  Forward frame  to O(1,000) hosts   Bridge not to global networks  Connect shared media Not heterogeneous   All ports bidirectional some use of address, but   Repeat subset of traffic no translation between frame formats   Receive frame on one port  Send on all other ports  9/20/06 CS/ECE 438 - UIUC, Fall 2006 7 9/20/06 CS/ECE 438 - UIUC, Fall 2006 8 Example Extended LAN with Bridges with Loops LOOPS  Problem A B If there is a loop in the extended LAN, a packet  B9 B7 could circulate forever B5 Side question: Are loops good or bad?  C F D  Solution K B2 B1 Select which bridges should actively forward  J Create a spanning tree to eliminate E  unnecessary edges G H Adds robustness  B B4 Complicates learning/forwarding  I 9/20/06 CS/ECE 438 - UIUC, Fall 2006 9 9/20/06 CS/ECE 438 - UIUC, Fall 2006 10 Spanning Tree Algorithm Defining a Spanning Tree  Basic Rules  View extended LAN as bipartite graph Bridge with the lowest ID is the root LAN’s are graph nodes   For a given bridge Bridges are also graph nodes   A port in the direction of the root bridge is the root port  Ports are edges connecting LAN’s to bridges  For a given LAN   Spanning tree required The bridge closest to the root (or the bridge with the  lowest ID to break ties) is the designated bridge for a Connect all LAN’s  LAN Can leave out bridges  The corresponding port is the designated port  Bridges with no designated ports and ports that  are neither a root port nor a designated port are not part of the tree. 9/20/06 CS/ECE 438 - UIUC, Fall 2006 11 9/20/06 CS/ECE 438 - UIUC, Fall 2006 12 2

  3. Using a Spanning Tree: Spanning Tree Algorithm Forwarding Forwarding  A B D D Each bridge Root  D forwards frames A B B9 B7 over each LAN for B5 B7 D – B5 which it is the R designated bridge designated R C F C F D D D or connected by a port D D K root port B2 K B1 B1 B2 B1 B1 R – J E root port G H R D J E B4 D D G H R R I D B B4 D I 9/20/06 CS/ECE 438 - UIUC, Fall 2006 13 9/20/06 CS/ECE 438 - UIUC, Fall 2006 14 Using a Spanning Tree: Finding the Tree by a Broadcast and Multicast distributed Algorithm Forward all   Bridges run a distributed spanning broadcast/ multicast frames tree algorithm Learn when A B   Select when bridges should actively there are no B7 B5 group members forward frames C F D downstream K B2 B1 B1  Developed by Radia Perlman at DEC Have each  J member of E  Now IEEE 802.1 specification group G send a G H frame with B4 multicast address G in it I to a bridge 9/20/06 CS/ECE 438 - UIUC, Fall 2006 15 9/20/06 CS/ECE 438 - UIUC, Fall 2006 16 Distributed Spanning Tree Distributed Spanning Tree Algorithm Algorithm  Bridges exchange configuration messages  Bridges forward configuration messages (Y,d,X) Outward from root bridge   Y = root node  i.e., on all designated ports  d = distance to root node   Bridge assumes X = originating node   Each bridge records current best It is designated bridge for a LAN  configuration message for each port Until it learns otherwise   Initially, each bridge believes it is the root  Steady State  When a bridge discovers it is not the root, root periodically send configuration messages  stop generating messages A timeout is used to restart the algorithm  9/20/06 CS/ECE 438 - UIUC, Fall 2006 17 9/20/06 CS/ECE 438 - UIUC, Fall 2006 18 3

  4. Spanning Tree Algorithm Bridges: Limitations Example at bridge B3  Does not scale  B3 receives (B2, 0, B2) 1. Spanning tree algorithm scales linearly  Since 2 < 3, B3 accepts B2 as 2. Broadcast does not scale root  A B B3 adds one to the distance 3. B7  Virtual LANs (VLAN) B5 advertised by B2 and sends C F D An extended LAN that is partitioned into several (B2, 1, B3)  K B2 B1 B1 B2 accepts B1 as root and networks 4. J sends (B1, 1, B2) E Each network appears separate G H  B5 accepts B1 as root and 5. B4 sends (B1, 1, B5) Limits effect of broadcast  I B3 accepts B1 as root and 6. Simple to change virtual topology  stops forwarding 9/20/06 CS/ECE 438 - UIUC, Fall 2006 19 9/20/06 CS/ECE 438 - UIUC, Fall 2006 20 Bridges: Limitations Switch  Link layer device  Does not accommodate heterogeneity stores and forwards Ethernet frames Networks must have the same address format   examines frame header and selectively e.g. Ethernet-to-Ethernet   forwards frame based on MAC dest address  Caution when frame is to be forwarded on segment,  Beware of transparency uses CSMA/CD to access segment  May break assumptions of the point-to-point protocols   transparent Frames may get dropped  hosts are unaware of presence of switches  Variable latency   plug-and-play, self-learning Reordering  Bridges happen!  switches do not need to be configured  9/20/06 CS/ECE 438 - UIUC, Fall 2006 21 9/20/06 CS/ECE 438 - UIUC, Fall 2006 22 Forwarding Self learning switch 1 2  A switch has a switch table 3  entry in switch table: (MAC Address, Interface, Time Stamp)  hub hub hub stale entries in table dropped (TTL can be 60  min)  switch learns which hosts can be reached through which interfaces • How do determine onto which LAN segment to when frame received, switch “learns” location  forward frame? of sender: incoming LAN segment • Looks like a routing problem... records sender/location pair in switch table  9/20/06 CS/ECE 438 - UIUC, Fall 2006 23 9/20/06 CS/ECE 438 - UIUC, Fall 2006 24 4

  5. Filtering/Forwarding Switch example Suppose C sends frame to D address When switch receives a frame: interface  switch 1 A 1 3 2 index switch table using MAC dest address B 1 if entry found for destination then { E 2 hub 3 if dest on segment from which frame arrived hub G hub A then drop the frame I else forward the frame on interface indicated F D G B C H } E else flood Switch receives frame from from C  forward on all but the interface notes in bridge table that C is on interface 1  on which the frame arrived because D is not in table, switch forwards frame into  interfaces 2 and 3 frame received by D 9/20/06 CS/ECE 438 - UIUC, Fall 2006 25  Switch: traffic isolation Switch example  switch installation breaks subnet into LAN segments Suppose D replies back with frame to C.  switch filters packets: interface address switch  same-LAN-segment frames not usually forwarded A 1 onto other LAN segments B 1 E 2  segments become separate collision domains hub hub G 3 hub A C 1 I switch F D G B C E H collision domain Switch receives frame from from D  hub hub notes in bridge table that D is on interface 2 hub  because C is in table, switch forwards frame only to  interface 1 frame received by C  collision domain collision domain Switches: dedicated access More on Switches A  Switch with many  cut-through switching: frame interfaces C’ B forwarded from input to output port  Hosts have direct without first collecting entire frame connection to switch switch  slight reduction in latency  No collisions; full duplex  combinations of shared/dedicated, C 10/100/1000 Mbps interfaces Switching: A-to-A’ and B- B’ A’ to-B’ simultaneously, no collisions 9/20/06 CS/ECE 438 - UIUC, Fall 2006 29 9/20/06 CS/ECE 438 - UIUC, Fall 2006 30 5

Recommend


More recommend