Lecture 11: Switches Reading: Section 3.2 ? CMSC 23300/33300 Computer Networks

Slides:



Advertisements
Similar presentations
Interconnection: Switching and Bridging
Advertisements

Interconnection: Switching and Bridging CS 4251: Computer Networking II Nick Feamster Fall 2008.
Communication Networks Recitation 3 Bridges & Spanning trees.
University of Calgary – CPSC 441.  We need to break down big networks to sub-LANs  Limited amount of supportable traffic: on single LAN, all stations.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 19 Introduction to Computer Networks.
Fundamentals of Computer Networks ECE 478/578 Lecture #13: Packet Switching (2) Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 EE 122: Ethernet Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer.
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:
5/31/05CS118/Spring051 twisted pair hub 10BaseT, 100BaseT, hub r T= Twisted pair (copper wire) r Nodes connected to a hub, 100m max distance r Hub: physical.
1 Fall 2005 Extending LANs Qutaibah Malluhi CSE Department Qatar University Repeaters, Hubs, Bridges, Fiber Modems, and Switches.
1 Computer Networks Internetworking Devices. 2 Repeaters Hubs Bridges –Learning algorithms –Problem of closed loops Switches Routers.
1 Version 3 Module 8 Ethernet Switching. 2 Version 3 Ethernet Switching Ethernet is a shared media –One node can transmit data at a time More nodes increases.
CSCI 4550/8556 Computer Networks Comer, Chapter 11: Extending LANs: Fiber Modems, Repeaters, Bridges and Switches.
COS 461: Computer Networks
Local Area Networks: Ethernet, Switching COS 461: Computer Networks Spring 2011 Mike Freedman
1 Chapter 8 Local Area Networks - Internetworking.
1 Interconnection ECS 152A. 2 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r But individual.
1 Interconnecting LAN segments Repeaters Hubs Bridges Switches.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
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)
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
1 Computer Networks LAN Bridges and Switches. 2 Where are we?
Mike Freedman Fall 2012 COS 561: Advanced Computer Networks Enterprise Configuration.
Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits.
Connecting LANs, Backbone Networks, and Virtual LANs
Semester 1 Module 8 Ethernet Switching Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
1 CS 4396 Computer Networks Lab LAN Switching and Bridges.
Lecture 17 Ethernet r Widely deployed because: m First LAN technology m Simpler and less expensive than token LANs and ATM m Kept up with the speed race:
 Network Segments  NICs  Repeaters  Hubs  Bridges  Switches  Routers and Brouters  Gateways 2.
10/18/2007 EETS Bluetooth Bluetooth Architecture Bluetooth Applications The Bluetooth Protocol Stack The Bluetooth Radio Layer The Bluetooth Baseband.
Chapter 6 – Connectivity Devices
Module 8: Ethernet Switching
Extending LANs Fiber modems Repeaters Bridges Switches.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Computer Networks 15-1 Chapter 15. Connecting LANs, Backbone Networks, and Virtual LANs 15.1 Connecting devices 15.2 Backbone networks 15.3 Virtual LANs.
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.
1 CSCD 433 Network Programming Fall 2011 Lecture 5 VLAN's.
Sem1 - Module 8 Ethernet Switching. Shared media environments Shared media environment: –Occurs when multiple hosts have access to the same medium. –For.
STORE AND FORWARD & CUT THROUGH FORWARD Switches can use different forwarding techniques— two of these are store-and-forward switching and cut-through.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
Chapter 11 Extending LANs 1. Distance limitations of LANs 2. Connecting multiple LANs together 3. Repeaters 4. Bridges 5. Filtering frame 6. Bridged network.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Bridges and LAN Switches
5: DataLink Layer5-1 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r Multi-tier design provides.
5: DataLink Layer 5a-1 Bridges and spanning tree protocol Reference: Mainly Peterson-Davie.
CCNA3 Module 4 Brierley Module 4. CCNA3 Module 4 Brierley Topics LAN congestion and its effect on network performance Advantages of LAN segmentation in.
4: DataLink Layer1 Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces.
Computer Communication and Networking Lecture # 4 by Zainab Malik 1.
5: DataLink Layer5-1 Hubs Hubs are essentially physical-layer repeaters: m bits coming from one link go out all other links m at the same rate m no frame.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Lec # 25 Computer Network Muhammad Waseem Iqbal. Learn about the Internetworking Devices – Repeaters – Hubs – Switches – Bridges – Routers.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Chapter 3 Part 1 Switching and Bridging
Link Layer 5.1 Introduction and services
MAC Addresses and ARP 32-bit IP address:
Chapter 4 Data Link Layer Switching
Hubs Hubs are essentially physical-layer repeaters:
Chapter 3 Part 1 Switching and Bridging
CS 457 – Lecture 8 Switching and Forwarding
Hubs Hubs are essentially physical-layer repeaters:
LAN switching and Bridges
LAN switching and Bridges
LAN switching and Bridges
CS4470 Computer Networking Protocols
LAN switching and Bridges
Presentation transcript:

Lecture 11: Switches Reading: Section 3.2 ? CMSC 23300/33300 Computer Networks

2 Goals of Today’s Lecture l Devices that shuttle packets at different layers u Repeaters and hubs u Bridges and switches u Routers l Switch protocols and mechanisms u Dedicated access and full-duplex transfers u Cut-through switching u Self learning of the switch table u Spanning trees u Virtual LANs (VLANs)

3 Shuttling Data at Different Layers l Different devices switch different things u Physical layer: electrical signals (repeaters and hubs) u Link layer: frames (bridges and switches) u Network layer: packets (routers) Application gateway Transport gateway Router Bridge, switch Repeater, hub Frame header Packet header TCP header User data

4 Physical Layer: Repeaters l Distance limitation in local-area networks u Electrical signal becomes weaker as it travels u Imposes a limit on the length of a LAN l Repeaters join LANs together u Analog electronic device u Continuously monitors electrical signals on each LAN u Transmits an amplified copy

5 Physical Layer: Hubs l Joins multiple input lines electrically u Designed to hold multiple line cards u Do not necessarily amplify the signal l Very similar to repeaters u Also operate at the physical layer hub

6 Limitations of Repeaters and Hubs l One large collision domain u Every bit is sent everywhere u So, aggregate throughput is limited u E.g., three departments each get 10 Mbps independently u … and then connect via a hub and must share 10 Mbps l Cannot support multiple LAN technologies u Does not buffer or interpret frames u So, can’t interconnect between different rates or formats u E.g., 10 Mbps Ethernet and 100 Mbps Ethernet l Limitations on maximum nodes and distances u Does not circumvent the limitations of shared media u E.g., still cannot go beyond 2500 meters on Ethernet

7 Link Layer: Bridges l Connects two or more LANs at the link layer u Extracts destination address from the frame u Looks up the destination in a table u Forwards the frame to the appropriate LAN segment l Each segment is its own collision domain host Bridge

8 Link Layer: Switches l Typically connects individual computers u A switch is essentially the same as a bridge u … though typically used to connect hosts, not LANs l Like bridges, support concurrent communication u Host A can talk to C, while B talks to D switch A B C D

9 Dedicated Access and Full Duplex l Dedicated access u Host has direct connection to the switch u … rather than a shared LAN connection l Full duplex u Each connection can send in both directions u Host sending to switch, and host receiving from switch u E.g., in 10BaseT and 100Base T l Completely avoids collisions u Each connection is a bidirectional point-to-point link u No need for carrier sense, collision detection, and so on

10 Bridges/Switches: Traffic Isolation l Switch breaks subnet into LAN segments l Switch filters packets u Frame only forwarded to the necessary segments u Segments become separate collision domains hub switch/bridge collision domain

11 Advantages Over Hubs/Repeaters l Only forwards frames as needed u Filters frames to avoid unnecessary load on segments u Sends frames only to segments that need to see them l Extends the geographic span of the network u Separate collision domains allow longer distances l Improves privacy by limiting scope of frames u Hosts can “snoop” the traffic traversing their segment u … but not all the rest of the traffic l Applies carrier sense and collision detection u Does not transmit when the link is busy u Applies exponential back-off after a collision l Joins segments using different technologies

12 Disadvantages Over Hubs/Repeaters l Delay in forwarding frames u Bridge/switch must receive and parse the frame u … and perform a look-up to decide where to forward u Storing and forwarding the packet introduces delay u Solution: cut-through switching l Need to learn where to forward frames u Bridge/switch needs to construct a forwarding table u Ideally, without intervention from network administrators u Solution: self-learning l Higher cost u More complicated devices that cost more money

13 Motivation For Cut-Through Switching l Buffering a frame takes time u Suppose L is the length of the frame u And R is the transmission rate of the links u Then, receiving the frame takes L/R time units l Buffering delay can be a high fraction of total delay u Propagation delay is small over short distances u Making buffering delay a large fraction of total u Analogy: large group walking through NYC A B switches

14 Cut-Through Switching l Start transmitting as soon as possible u Inspect the frame header and do the look-up u If outgoing link is idle, start forwarding the frame l Overlapping transmissions u Transmit the head of the packet via the outgoing link u … while still receiving the tail via the incoming link u Analogy: different folks crossing different intersections A B switches

15 Motivation For Self Learning l Switches forward frames selectively u Forward frames only on segments that need them l Switch table u Maps destination MAC address to outgoing interface u Goal: construct the switch table automatically switch A B C D

16 Self Learning: Building the Table l When a frame arrives u Inspect the source MAC address u Associate the address with the incoming interface u Store the mapping in the switch table u Use a time-to-live field to eventually forget the mapping A B C D Switch learns how to reach A.

17 Self Learning: Handling Misses l When frame arrives with unfamiliar destination u Forward the frame out all of the interfaces u … except for the one where the frame arrived u Hopefully, this case won’t happen very often A B C D When in doubt, shout!

18 Switch Filtering/Forwarding When switch receives a frame: index switch table using MAC dest address 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

19 Flooding Can Lead to Loops l Switches sometimes need to broadcast frames u Upon receiving a frame with an unfamiliar destination u Upon receiving a frame sent to the broadcast address l Broadcasting is implemented by flooding u Transmitting frame out every interface u … except the one where the frame arrived l Flooding can lead to forwarding loops u E.g., if the network contains a cycle of switches u Either accidentally, or by design for higher reliability

20 Solution: Spanning Trees l Ensure the topology has no loops u Avoid using some of the links when flooding u … to avoid forming a loop l Spanning tree u Sub-graph that covers all vertices but contains no cycles u Links not in the spanning tree do not forward frames

21 Constructing a Spanning Tree l Need a distributed algorithm u Switches cooperate to build the spanning tree u … and adapt automatically when failures occur l Key ingredients of the algorithm u Switches need to elect a “root” l The switch with the smallest identifier u Each switch determines if its interface is on the shortest path from the root l And excludes it from the tree if not u Messages (Y, d, X) l From node X l Claiming Y is the root l And the distance is d root One hop Three hops

22 Steps in Spanning Tree Algorithm l Initially, each switch thinks it is the root u Switch sends a message out every interface u … identifying itself as the root with distance 0 u Example: switch X announces (X, 0, X) l Switches update their view of the root u Upon receiving a message, check the root id u If the new id is smaller, start viewing that switch as root l Switches compute their distance from the root u Add 1 to the distance received from a neighbor u Identify interfaces not on a shortest path to the root u … and exclude them from the spanning tree

23 Example From Switch #4’s Viewpoint l Switch #4 thinks it is the root u Sends (4, 0, 4) message to 2 and 7 l Then, switch #4 hears from #2 u Receives (2, 0, 2) message from 2 u … and thinks that #2 is the root u And realizes it is just one hop away l Then, switch #4 hears from #7 u Receives (2, 1, 7) from 7 u And realizes this is a longer path u So, prefers its own one-hop path u And removes 4-7 link from the tree

24 Example From Switch #4’s Viewpoint l Switch #2 hears about switch #1 u Switch 2 hears (1, 1, 3) from 3 u Switch 2 starts treating 1 as root u And sends (1, 2, 2) to neighbors l Switch #4 hears from switch #2 u Switch 4 starts treating 1 as root u And sends (1, 3, 4) to neighbors l Switch #4 hears from switch #7 u Switch 4 receives (1, 3, 7) from 7 u And realizes this is a longer path u So, prefers its own three-hop path u And removes 4-7 Iink from the tree

25 Robust Spanning Tree Algorithm l Algorithm must react to failures u Failure of the root node l Need to elect a new root, with the next lowest identifier u Failure of other switches and links l Need to recompute the spanning tree l Root switch continues sending messages u Periodically re-announcing itself as the root (1, 0, 1) u Other switches continue forwarding messages l Detecting failures through timeout (soft state!) u Switch waits to hear from others u Eventually times out and claims to be the root See Section in the textbook for details and another example

26 Evolution Toward Virtual LANs l In the olden days… u Thick cables snaked through cable ducts in buildings u Every computer they passed was plugged in u All people in adjacent offices were put on the same LAN u Independent of whether they belonged together or not l More recently… u Hubs and switches changed all that u Every office connected to central wiring closets u Often multiple LANs (k hubs) connected by switches u Flexibility in mapping offices to different LANs Group users based on organizational structure, rather than the physical layout of the building.

27 Why Group by Organizational Structure? l Security u Ethernet is a shared media u Any interface card can be put into “promiscuous” mode u … and get a copy of all of the traffic (e.g., midterm exam) u So, isolating traffic on separate LANs improves security l Load u Some LAN segments are more heavily used than others u E.g., researchers running experiments get out of hand u … can saturate their own segment and not the others u Plus, there may be natural locality of communication u E.g., traffic between people in the same research group

28 People Move, and Roles Change l Organizational changes are frequent u E.g., faculty office becomes a grad-student office u E.g., graduate student becomes a faculty member l Physical rewiring is a major pain u Requires unplugging the cable from one port u … and plugging it into another u … and hoping the cable is long enough to reach u … and hoping you don’t make a mistake l Would like to “rewire” the building in software u The resulting concept is a Virtual LAN (VLAN)

29 Example: Two Virtual LANs Red VLAN and Orange VLAN Bridges forward traffic as needed R RORORORO O RORO

30 Example: Two Virtual LANs Red VLAN and Orange VLAN Switches forward traffic as needed R O RORO R R R OOO RORRR O O O

31 Making VLANs Work l Bridges/switches need configuration tables u Saying which VLANs are accessible via which interfaces l Approaches to mapping to VLANs u Each interface has a VLAN color l Only works if all hosts on same segment belong to same VLAN u Each MAC address has a VLAN color l Useful when hosts on same segment belong to different VLANs l Useful when hosts move from one physical location to another l Changing the Ethernet header u Adding a field for a VLAN tag u Implemented on the bridges/switches u … but can still interoperate with old Ethernet cards

32 Moving From Switches to Routers l Advantages of switches over routers u Plug-and-play u Fast filtering and forwarding of frames u No pronunciation ambiguity (e.g., “rooter” vs. “rowter”) l Disadvantages of switches over routers u Topology is restricted to a spanning tree u Large networks require large ARP tables u Broadcast storms can cause the network to collapse

33 Comparing Hubs, Switches, & Routers

34 Conclusion l Shuttling data from one link to another u Bits, frames, packets, … u Repeaters/hubs, bridges/switches, routers, … l Key ideas in switches u Cut-through switching u Self learning of the switch table u Spanning trees u Virtual LANs (VLANs) l Next u Internet topology and routing