Bridges and LAN Switches

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.
Packet Switching COM1337/3501 Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter 3.
Fundamentals of Computer Networks ECE 478/578 Lecture #13: Packet Switching (2) Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
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 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
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:
Brierley 1 Module 4 Module 4 Introduction to LAN Switching.
 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.
Module 8: Ethernet Switching
Extending LANs Fiber modems Repeaters Bridges Switches.
Chapter Overview Bridging Switching Routing.
CCNA 3 Week 4 Switching Concepts. Copyright © 2005 University of Bolton Introduction Lan design has moved away from using shared media, hubs and repeaters.
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.
Lecture 11: Switches Reading: Section 3.2 ? CMSC 23300/33300 Computer Networks
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs.
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.
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.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
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
Chapter 16– Connecting LANs
Link Layer 5.1 Introduction and services
Advanced Computer Networks
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:

Bridges and LAN Switches Reading: Section 3.2

Abu_sufah@yahoo.com

Outline Devices that shuttle data units at different layers Repeaters and hubs Bridges and switches Routers Switch protocols and mechanisms Dedicated access and full-duplex transfers Cut-through switching Self learning of the switch table Spanning trees Virtual LANs (VLANs)

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

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

Physical Layer: Hubs A hub joins multiple input lines electrically Designed to hold multiple line cards Does not necessarily amplify the signal Very similar to repeaters Also operates at the physical layer hub hub hub hub

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

Bridges: Building Extended LAN’s Traditional LAN Shared medium (e.g., Ethernet) Cheap, easy to administer Supports broadcast traffic Problem Scale LAN concept Larger geographic area (> O(1 km)) More hosts (> O(100)) But retain LAN-like functionality Solution Bridges

Bridges Connect two or more LANs with a bridge Accept and forward Level 2 connection (no extra packet header) Each LAN is its own collision domain A collection of LANs connected by bridges is called an extended LAN

Uses and Limitations of Bridges Limited scalability to O(1,000) hosts not to global networks Not heterogeneous no translation between frame formats

Bridges vs. Switches Bridges and Switches forward frames Bridge Connect shared media All ports bidirectional Receive frame on one port, send frame on all other ports Link layer switch Connects hosts and/or shared media Receive frame on input port Translate address to output port Forward frame

Switches: dedicated access Switch with many interfaces Hosts have direct connection to switch No collisions; full duplex switch A B C D Switching: A-to-C and B-to-D simultaneously, no collisions

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

Switches: Traffic Isolation Switch interconnects LAN segments Frame only forwarded to the necessary segments Segments become separate collision domains switch collision domain hub hub hub collision domain collision domain

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

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

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

Cut-Through Switching Start forward transmission as soon as possible Inspect the frame header and do the look-up If outgoing link is idle, start forwarding the frame Overlapping transmissions Transmit the head of the frame via the outgoing link … while still receiving the tail via the incoming link A B switches

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

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

Self Learning: Handling Misses Miss: output port to destination is not in switch table When frame arrives with unfamiliar destination Forward the frame out all of the interfaces … except for the one where the frame arrived Hopefully, this case won’t happen very often A B C D

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

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

Solution: Spanning Trees Ensure the topology has no loops Avoid using some of the links when flooding … to avoid forming a loop Spanning tree Sub-graph that covers all vertices but contains no cycles

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

Constructing a Spanning Tree Need a distributed algorithm Switches cooperate to build the spanning tree … and adapt automatically when failures occur Key ingredients of the algorithm Switches need to elect a “root” The switch with the smallest identifier For each of its interfaces, a switch identifies if the interface is on the shortest path from the root And it excludes an interface from the tree if not

Constructing a Spanning Tree (cont. I) root Three hops One hop

Constructing a Spanning Tree (cont. II) Use broadcast messages; e.g. (Y, d, X) From node X Claiming Y is the root And the distance from X to root is d

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

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

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

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

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

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

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

Example: Two Virtual LANs RG RG R RG G Red VLAN and Green VLAN Bridges forward traffic as needed

Example: Two Virtual LANs G G G R G R R G RG R G R G R G R Red VLAN and Green VLAN Switches forward traffic as needed

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

Switches vs. Routers both store-and-forward devices routers: network layer devices (examine network layer headers) switches are link layer devices routers maintain routing tables, implement routing algorithms switches maintain switch tables, implement filtering, learning algorithms

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

Comparing Hubs, Switches, Routers Repeater Bridge/ Switch Router Traffic isolation no yes Plug and Play Efficient routing Cut through

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