Local Area Networks: Ethernet, Switching COS 461: Computer Networks Spring 2011 Mike Freedman

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.
Topic 7 Local Area Networks (LAN)
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r Homework 3 out r Project 3 out, link state only. Some slides are.
5: DataLink Layer5-1 Mac Addressing, Ethernet, and Interconnections.
Fundamentals of Computer Networks ECE 478/578 Lecture #13: Packet Switching (2) Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 Ethernet EECS 489 Computer Networks Z. Morley Mao Wednesday Feb 21, 2007 Acknowledgement: Some slides taken.
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.
5: DataLink Layer5-1 MAC Addresses and ARP r 32-bit IP address: m network-layer address m used to get datagram to destination IP subnet r MAC (or LAN or.
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
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.
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r LAN addresses and ARP r Ethernet Some slides are in courtesy of J.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
Introduction 1 Lecture 25 Link Layer (Ethernet, Switch) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
1 ECE453 – Introduction to Computer Networks Lecture 8 – Multiple Access Control (II)
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
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
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
Links Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in CS 104
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:
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 Ethernet “dominant” wired LAN technology: r cheap $20 for 100Mbs! r first widely used LAN technology r Simpler, cheaper than token.
Brierley 1 Module 4 Module 4 Introduction to LAN Switching.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
10/18/2007 EETS Bluetooth Bluetooth Architecture Bluetooth Applications The Bluetooth Protocol Stack The Bluetooth Radio Layer The Bluetooth Baseband.
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.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
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.
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.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Ch 5. The Link Layer and Local Area Networks Myungchul Kim
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.
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.
1 Multiple Access: Ethernet Section Point-to-Point vs. Broadcast Media Point-to-point –PPP for dial-up access –Point-to-point link between Ethernet.
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.
Links Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Lec # 25 Computer Network Muhammad Waseem Iqbal. Learn about the Internetworking Devices – Repeaters – Hubs – Switches – Bridges – Routers.
5-1 Last time □ Multiple access protocols ♦ Channel partitioning MAC protocols TDMA, FDMA ♦ Random access MAC protocols Slotted Aloha, Pure Aloha, CSMA,
Chapter 16– Connecting LANs
Link Layer 5.1 Introduction and services
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
CS 457 – Lecture 6 Ethernet Spring 2012.
Mac Addressing, Ethernet, and Interconnections
Hubs Hubs are essentially physical-layer repeaters:
Links Jennifer Rexford COS 461: Computer Networks
CS4470 Computer Networking Protocols
18: Ethernet, Hubs, Bridges, Switches
LAN Addresses and ARP IP address: drives the packet to destination network LAN (or MAC or Physical) address: drives the packet to the destination node’s.
Presentation transcript:

Local Area Networks: Ethernet, Switching COS 461: Computer Networks Spring 2011 Mike Freedman

Fully-connected links 2

Shared broadcast medium 3

It’s all about resource allocation 4

Three Ways to Share the Media Channel partitioning MAC protocols: – Share channel efficiently and fairly at high load – Inefficient at low load: unused go idle “Taking turns” protocols – Eliminates empty slots without causing collisions – Vulnerable to failures Random access MAC protocols – Efficient at low load: single node can fully utilize channel – High load: collision overhead 5

Hubs: Joining broadcast mediums 6 hub

Bridges / Switches: Isolating broadcast mediums 7 switch

Ethernet Dominant wired LAN technology, first widely used Simpler, cheaper than token LANs and ATM Kept up with speed race: 10 Mbps – 10 Gbps 8 Metcalfe’s Ethernet sketch

Ethernet Frame Structure 9 Preamble: synchronization: ( ) Addresses: 6-byte source and dest MAC addresses – Adaptor passes frame to OS stack if destination matches adaptor or is broadcast address; otherwise, discard frame Type: higher-layer protocol (IP, AppleTalk, …) Error detection: CRC: cyclic redundancy check Best effort: Connectionless, unreliable

Ethernet Uses CSMA/CD Carrier Sense: wait for link to be idle before transmit Collision Detection: listen while transmitting – No collision: transmission complete – Collision: abort and send jam signal Random access: exponential back-off – After collision, wait a random time before retry – After m th collision, choose K randomly from {0, …, 2 m -1} – … and wait for K*64 byte times before retry 10

Limitations on Ethernet Length Latency depends on physical length of link – Time to propagate a packet from one end to the other Suppose A sends a packet at time t – And B sees an idle line just before time t+d, so transmits B detects a collision, and sends jamming signal – But A doesn’t see collision till t+2d 11 latency d A B

Limitations on Ethernet Length A needs to wait for time 2d to detect collision – So, A should keep transmitting during this period – … and keep an eye out for a possible collision Imposes restrictions on Ethernet – Max length of wire: 2500 meters – Min length of packet: 512 bits (64 bytes) 12 latency d A B

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 Repeaters join LANs together – Analog electronic device – Monitors signals on each LAN and transmits amplified copies 13

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

Limitations of Repeaters and Hubs One large shared link – Each bit sent everywhere, aggregate throughput limited Cannot support multiple LAN technologies – Does not buffer or interpret frames – So, can’t interconnect different rates or formats Limitations on maximum nodes and distances 15

Switching for resource isolation 16

17 Link Layer: Bridges and Switches Connects two or more LANs at the link layer – Extracts destination address from the frame – Looks up the destination in a table, forwards to appropriate Each segment can carry its own traffic – Concurrent traffic between LANs/host: A to B while D to C Bridge: connecting LANs; Switches: connecting hosts host Bridge switch A B C D

Bridges/Switches: Traffic Isolation Switch breaks subnet into LAN segments Switch filters packets – Frame only forwarded to the necessary segments – Segments can support separate transmissions hub switch/bridge segment 18

High-density switching 19 SNS group “rack”Facebook rack Each rack has 42 U (“pizza boxes”) Typically servers “top-of-rack” switch(es) 48-port switch

Advantages Over Hubs/Repeaters Only forwards frames as needed – E.g. to destination segments or for broadcast traffic – Reduces unnecessary traffic on segments Extends the geographic span of the network – Ethernet collisions (and distance limitations) only on segment Improves privacy by limiting scope of frames – Hosts can only “snoop” the traffic traversing their segment Can join segments using different technologies 20

Disadvantages Over Hubs/Repeaters Delay in forwarding frames – Bridge/switch must receive frame, parse, lookup, and send – Storing and forwarding the packet introduces delay – Sol’n: cut-through switching (start send after receive header) Need to learn where to forward frames – Forwarding table: destination MAC  outgoing interface – Needs to construct forwarding table, ideally w/o static config – Sol’n: self-learning Higher cost – More complicated devices that cost more money 21

Self Learning: Building the Table When a frame arrives – Inspect source MAC address – Associate addr with incoming interface/port – Store mapping in forwarding table – Use TTL field to eventually forget mapping A C D Switch learns how to reach A B 22

Self Learning: Handling Misses When frame arrives with unfamiliar destination – Forward frame out all interfaces except source – Hopefully, won’t happen very often A C D When in doubt, shout! B 23

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 24

Flooding Can Lead to Loops E.g., if the network contains a cycle of switches Either accidentally or by design for higher reliability Solution: Spanning Tree – Ensure the topology has no loops – Avoid using some of the links when flooding – Spanning tree: Sub-graph that covers all vertices but contains no cycles 25

Spanning Trees Solution: Spanning Tree – Ensure the topology has no loops – Avoid using some of the links when flooding – Spanning tree: Sub-graph that covers all vertices but contains no cycles 26

Constructing a Spanning Tree Distributed algorithm – Switches cooperate to build, auto-adapt on failures Key ingredients of the algorithm – Switches elect a “root” (e.g. one w/ smallest ID) – Each determines if interface is on shortest path from root, excludes if not – Learned via messages from peers (root Y, distance d, from X) – Reacts to root/switch/link failures Path entries have TTL (i.e. soft state) Root periodically reannounces root 1 hop 3 hops 27

Modern concern: Spanning trees don’t scale Flooding for unknown dest’s Broadcasting: “Who has ?” “01:c4:3b:7d:ad:4f has ” High load on root tree edges Low availability on failures Low throughput: can’t use parallel paths 28 Current approach: L3 in datacenters Proposals: L2 everywhere, but no SP nor broadcast

Evolution Toward Virtual LANs In the olden days… – Thick cables snaked through cable ducts in buildings – Every computer was plugged in – All people in adjacent offices were on same LAN More recently due to hubs and switches… – Every office connected to central wiring closets – Flexibility in mapping offices to different LANs Evolution to grouping users based on org structure, not physical layout of building 29

Why Group by Org Structure? Security – Ethernet is a shared media – Interfaces can be put in “promiscuous” mode to see all traffic Load – Some LAN segments are more heavily used than others E.g., researchers can saturate own segment, but not others – May be natural locality of communication E.g., traffic between people in the same research group But people move, organizations changes – Physical rewiring is a huge pain! 30

Virtual LANs Red VLAN and Yellow VLAN Switches forward traffic as needed R RYRYRYRY Y RYRY 31

Virtual LANs R Y RYRY R R R YYY RYRRR Y Y Y Red VLAN and Yellow VLAN Switches forward traffic as needed 32

Making VLANs Work Switches need configuration tables – Saying which VLANs are accessible via which interfaces Approaches to mapping to VLANs – VLAN color per interface Only if all hosts on segment belong to same VLAN – VLAN color per MAC address Changing the Ethernet header – Adding a field for a VLAN tag – VLAN tag added/removed by switches Hosts unaware (backwards compat), cannot spoof (security) 33

34 Comparing Hubs, Switches, Routers Hub / Repeater Bridge / Switch IP Router Traffic isolationnoyes Plug and Playyes no Efficient routingno yes Cut throughyes no