Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Communication Networks – 67594 Dr. Michael Schapira Rothberg A413.

Similar presentations


Presentation on theme: "Introduction to Communication Networks – 67594 Dr. Michael Schapira Rothberg A413."— Presentation transcript:

1 Introduction to Communication Networks – 67594 Dr. Michael Schapira Rothberg A413

2 5: Dat aLin k Lay er 5-2 Chapter 5 Link Layer and LANs A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)  If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

3 5: Dat aLin k Lay er 5-3 Switch link-layer device: smarter than hubs, take active role  store, forward Ethernet frames  examine incoming frame ’ s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment transparent  hosts are unaware of presence of switches plug-and-play, self-learning  switches do not need to be configured

4 5: Dat aLin k Lay er 5-4 Switch: allows multiple simultaneous transmissions hosts have dedicated, direct connection to switch switches buffer packets Ethernet protocol used on each incoming link, but no collisions; full duplex  each link is its own collision domain switching: A-to-A ’ and B- to-B ’ simultaneously, without collisions not possible with dumb hub A A’A’ B B’B’ C C’C’ switch with six interfaces (1,2,3,4,5,6) 1 2 3 4 5 6

5 5: Dat aLin k Lay er 5-5 Switch Table Q: how does switch know that A ’ reachable via interface 4, B ’ reachable via interface 5? A: each switch has a switch table, each entry:  (MAC address of host, interface to reach host, time stamp) Q: how are entries created, maintained in switch table? A A’A’ B B’B’ C C’C’ switch with six interfaces (1,2,3,4,5,6) 1 2 3 4 5 6

6 5: Dat aLin k Lay er 5-6 Switch: self-learning switch learns which hosts can be reached through which interfaces  when frame received, switch “ learns ” location of sender: incoming LAN segment  records sender/location pair in switch table A A’A’ B B’B’ C C’C’ 1 2 3 4 5 6 A A’ Source: A Dest: A’ MAC addr interface TTL Switch table (initially empty) A 1 60

7 5: Dat aLin k Lay er 5-7 Switch: frame filtering/forwarding When frame received: 1. record link associated with sending host 2. index switch table using MAC dest address 3. if entry found for destination then { if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived

8 5: Dat aLin k Lay er 5-8 Self-learning, forwarding: example A A’A’ B B’B’ C C’C’ 1 2 3 4 5 6 A A’ Source: A Dest: A’ MAC addr interface TTL Switch table (initially empty) A 1 60 A A’ frame destination unknown: flood A’ A destination A location known: A’A’ 4 60 selective send

9 5: Dat aLin k Lay er 5-9 Interconnecting switches switches can be connected together A B Q: sending from A to G - how does S 1 know to forward frame destined to F via S 4 and S 3 ? A: self learning! (works exactly the same as in single-switch case!) S1S1 C D E F S2S2 S4S4 S3S3 H I G

10 5: Dat aLin k Lay er 5-10 Self-learning multi-switch example Suppose C sends frame to I, I responds to C Q: show switch tables and packet forwarding in S 1, S 2, S 3, S 4 A B S1S1 C D E F S2S2 S4S4 S3S3 H I G 1 2

11 5: Dat aLin k Lay er 5-11 Institutional network to external network router IP subnet mail server web server

12 #12 Interconnection Without Backbone Not recommended for two reasons: - single point of failure at middle hub - all traffic between left segment and right segment must path over the middle segment A B Hub C D E F H I G

13 #13 What will happen with loops? Incorrect learning A B 1 1 2 2 A, 1 2 2

14 #14 What will happen with loops? Frame looping A C 1 1 2 2 C,??

15 #15 What will happen with loops? Frame looping A B 1 1 2 2 B,2 B,1

16 #16 Loop-free: tree A B C A message from A will mark A’s location

17 #17 Loop-free: tree A B C A message from A will mark A’s location A: 

18 #18 Loop-free: tree A B C A:  A message from A will mark A’s location

19 #19 Loop-free: tree A B C A:  A:  A:  A:  A message from A will mark A’s location

20 #20 Loop-free: tree A B C A:  A:  A:  A:  A message from A will mark A’s location

21 #21 Loop-free: tree A B C A:  A:  A:  A message from A will mark A’s location

22 #22 What will happen with loops? Incorrect learning/Frame Looping A B 1 1 2 2 A, 1 2 2

23 #23 Spanning Tree for increased reliability, desirable to have redundant, alternative paths from source to dest with multiple paths, cycles result – switches may multiply and forward frame forever solution: organize switches in a spanning tree by disabling subset of interfaces A B Hub C D E F H I G

24 #24 Introducing Spanning Tree Allow a path between every LAN without causing loops (loop-free environment) Switches communicate with special configuration messages (BPDUs) Standardized by IEEE 802.1D  Used the terminology of bridges Note: redundant paths are good, active redundant paths are bad (they cause loops)

25 #25 Spanning Tree Song 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

26 #26 Overview of STP We make a series of simplifications: Build a ST of switches(in fact, need to span LAN segments!) Assume that we are given a root bridge So we solve in order: 1. How to find a root bridge? 2. How to compute a ST of switches? 3. How to compute a ST LAN segments?

27 #27 1. Choosing a root switch Assume each switch has a unique identifier Each switch remembers best ID seen so far (my_root_ID) Periodically, send my_root_ID to all neighbors (“flooding”) When receiving ID, update if necessary

28 #28 2. Compute ST Given a root Idea: each node finds its shortest path to the root  shortest-path tree Output: At each node, parent pointer (and distance) How: Bellman-Ford algorithm

29 #29 Distributed Bellman-Ford Assumption: There is a unique root node s Idea: Each node, periodically, tells all its neighbors what is its distance from s But how can they tell? s : easy. dist s = 0 always! Another node v : Mark neighbor with least distance as “parent”

30 #30 Why does this work? Suppose all nodes start with distance , and suppose that updates are sent every time unit. C D B E F G A 0       

31 #31 Why does this work? Suppose all nodes start with distance , and suppose that updates are sent every time unit. C D B E F G A 0 1 1  1 1  

32 #32 Why does this work? r Suppose all nodes start with distance , and suppose that updates are sent every time unit. C D B E F G A 0 1 1 2 1 1  2

33 #33 Why does this work? Suppose all nodes start with distance , and suppose that updates are sent every time unit. C D B E F G A 0 1 1 2 1 1 3 2

34 #34 Bellman-Ford: properties Works for any non-negative link weights w(u,v) : Works when the system operates asynchronously. Works regardless of the initial distances!

35 #35 3. ST of LAN segments Assumption: given a ST of the switches Idea: Each segment has at least one switch attached. Only one of them should forward packets!  Choose switch closest to root. Break ties by switch ID (and then by port ID...) Implementation: Switches listen to all distance announcement on each port. Mark port as “designated port” iff best on that port’s LAN

36 #36 Spanning Tree Concepts: Path Cost A cost associated with each port on each switch (“weight” of the segment)  default is 1 The cost associated with transmission onto the LAN connected to the port  Can be manually or automatically assigned  Can be used to alter the path to the root switch

37 #37 Spanning Tree Concepts: Root Port Each non-root bridge has a Root port: The port on the path towards the root bridge  parent pointer The root port is part of the lowest cost path towards the root bridge If port costs are equal on a bridge, the port with the lowest ID becomes root port

38 #38 Example Spanning Tree S3 S5 S7 S2 S1 S6 S4 Protocol operation: 1.Pick a root 2.Each switch picks a root port S8

39 #39 Example Spanning Tree S3 S5 S7 S2 S1 S4 S6 Root 456 8 1 Spanning Tree: root port 3 7 2 S8

40 #40 Spanning Tree Concepts: Designated Port Each LAN has a single designated port This is the port reporting minimum cost path to the root bridge for the LAN Only designated and root ports remain active!

41 #41 Example Spanning Tree S3 S5 S7 S2 S1 S6 S4 Root S8 2457 8 1 Forwarding Tree: Designated Port root port Note: S3, S6 forward nothing

42 #42 Spanning Tree Requirements Each switch has a unique identifier A broadcast address for switches on a LAN A unique port identifier for all ports on all switches  Switch id + port number

43 #43 Spanning Tree Algorithm: Implementation Keep pumping a single message: (my root ID, my cost to root, my ID) BPDU: Bridge Protocol Data Unit Update var’s when receiving: My_root_ID: smallest seen so far My_cost_to_root: smallest received to my_root + link cost  Break ties by ID That’s enough! Best switch wins and it knows it!

44 #44 Spanning Tree Algorithm: Select Designated Switches Switches send BPDU frames to its attached LANs  sender port ID  Switch and port ID of the switch the sender considers as root  root path cost for the sender 3. Best switch wins, and it knows it (and winning port)  (lowest ID/cost/priority)

45 #45 Forwarding/Blocking State 1. Only root and designated ports are active for data forwarding Other ports are in the blocking state: no forwarding! If switch has no designated port, no forwarding at all  block root port too. 2. All ports send BPDU messages To adjust to changes

46 #46 Spanning Tree Protocol: Execution S3 S5 S7 S2 S1 S6 S4 S8 (S1,root=S1, dist=0) (S4, root=S1, dist=1) (S6, Root=S1, dist=1)

47 #47 Spanning Tree Song 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


Download ppt "Introduction to Communication Networks – 67594 Dr. Michael Schapira Rothberg A413."

Similar presentations


Ads by Google