Presentation is loading. Please wait.

Presentation is loading. Please wait.

5: DataLink Layer5-1 Link-layer switches. 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links.

Similar presentations


Presentation on theme: "5: DataLink Layer5-1 Link-layer switches. 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links."— Presentation transcript:

1 5: DataLink Layer5-1 Link-layer switches

2 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links at same rate m all nodes connected to hub can collide with one another m no frame buffering twisted pair hub

3 5: DataLink Layer5-3 Switch r link-layer device: smarter than hubs, take active role m store, forward Ethernet frames m 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 r transparent m hosts are unaware of presence of switches r plug-and-play, self-learning m switches do not need to be configured

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

5 5: DataLink Layer5-5 Switch Table r Q: how does switch know that A’ reachable via interface 4, B’ reachable via interface 5? r A: each switch has a switch table, each entry: m (MAC address of host, interface to reach host, time stamp) m looks like a routing table! r Q: how are entries created, maintained in switch table? m something like a routing protocol? A A’ B B’ C C’ switch with six interfaces (1,2,3,4,5,6) 1 2 3 4 5 6

6 5: DataLink Layer5-6 Switch: self-learning r switch learns which hosts can be reached through which interfaces m when frame received, switch “learns” location of sender: incoming LAN segment m records sender/interface pair in switch table A A’ B B’ 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: DataLink Layer5-7 Self-learning, forwarding: example A A’ B B’ 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’ r frame destination unknown: flood A’ A r destination A location known: A’ 4 60 forwarding

8 5: DataLink Layer5-8 Switch: frame filtering/forwarding When frame received: 1. record link associated with sending host 2. index(search) switch table using MAC dest address 3. if entry found for destination then { if dest on segment is interface from which frame arrived then drop the frame (=filtering) else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived

9 5: DataLink Layer5-9 Interconnecting switches r switches can be connected together A B r Q: sending from A to G - how does S 1 know to forward frame destined to G via S 4 and S 3 ? r 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: DataLink Layer5-10 Self-learning multi-switch example Suppose C sends frame to I, I responds to C r 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

11 5: DataLink Layer5-11 Self-learning multi-switch example Suppose C sends frame to I, I responds to C A B S1S1 C D E F S2S2 S4S4 S3S3 H I G MAC addr interface TTL S1S1 C 1 60 1 1 2 1 I 2 2 2 MAC addr interface TTL S4S4 C 1 60 I 2 MAC addr interface TTL S3S3 C 2 60 I 1 r A:

12 5: DataLink Layer5-12 An institutional Layer 2 network to external network router IP subnet mail server web server r Pros:  Self-leaning Switch is easy to maintain the network (switch is plug-&-play device).  Throughput will increase (why? Layer 2 processing). r Cons:  Large L2 network can be overwhelmed by ARP broadcast.  Complex switch network does not provide efficient routing.

13 5: DataLink Layer5-13 Switches vs. Routers r both store-and-forward devices m routers: network layer devices (examine network layer headers) m switches are link layer devices r routers maintain routing tables, implement routing algorithms r switches maintain switch tables, implement filtering, self-learning algorithms Switch


Download ppt "5: DataLink Layer5-1 Link-layer switches. 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links."

Similar presentations


Ads by Google