Switching and Forwarding Reading: Chapter 3 1/30/14 1

Similar documents
Switching and Forwarding

L2 Addressing and data plane. Benjamin Baron

HWP2 Application level query routing HWP1 Each peer knows about every other beacon B1 B3

ECE 158A: Lecture 13. Fall 2015

Switching and Forwarding - continued

Switching and Forwarding - continued

Switching and Forwarding

Research paper Measured Capacity of an Ethernet: Myths and Reality

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

Medium Access Protocols

Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Principles behind data link layer services

CSCI Computer Networks

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Packet Switching. Hongwei Zhang Nature seems to reach her ends by long circuitous routes.

Internetworking Part 1

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Principles behind data link layer services:

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Principles behind data link layer services:

CSE 461: Bridging LANs. Last Topic

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Chapter Seven. Local Area Networks: Part 1. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Some portions courtesy Srini Seshan or David Wetherall

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

CS610- Computer Network Solved Subjective From Midterm Papers

7010INT Data Communications Lecture 7 The Network Layer

Lecture 7. Reminder: Homework 2, Programming Project 1 due today. Homework 3, Programming Project 2 out, due Thursday next week. Questions?

CompSci 356: Computer Network Architectures. Lecture 7: Switching technologies Chapter 3.1. Xiaowei Yang

More on LANS. LAN Wiring, Interface

LAN Interconnection and Other Link Layer Protocols

Cisco Cisco Certified Network Associate (CCNA)

King Fahd University of Petroleum & Minerals Electrical Engineering Department EE 400, Experiment # 2

Communication Networks

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Chapter 6 Connecting Device

CSE 123A Computer Networks

Addressing and Switching in the Link Layer

Summary of MAC protocols

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs.

Packet Switching Techniques

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21!

EPL606. Internetworking. Part 2a. 1Network Layer

More on Link Layer. Recap of Last Class. Interconnecting Nodes in LAN (Local-Area Network) Interconnecting with Hubs. Computer Networks 9/21/2009

Lecture 4b. Local Area Networks and Bridges

Interface The exit interface a packet will take when destined for a specific network.

Revision of Previous Lectures

Internetwork Expert s CCNP Bootcamp. Hierarchical Campus Network Design Overview

CSC 401 Data and Computer Communications Networks

Switching & ARP Week 3

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CSC 4900 Computer Networks: Link Layer (2)

Computer Networks. Wenzhong Li. Nanjing University

Chapter 4 NETWORK HARDWARE

Lecture 9: Bridging & Switching"

EEC-484/584 Computer Networks

Lecture 6: Bridges and Switches. CS/ECE 438: Communication Networks Prof. Matthew Caesar February 19, 2010

Link layer: introduction

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

Telematics I. Chapter 6 Internetworking. (Acknowledement: These slides have been compiled from H. Karl s set of slides)

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

Layer 2 functionality bridging and switching

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Underlying Technologies -Continued-

TCOM 370 NOTES 99-1 NETWORKING AND COMMUNICATIONS

ET4254 Communications and Networking 1

2. LAN Topologies Gilbert Ndjatou Page 1

Administrivia. Homework on class webpage If you are having problems following me in class (or doing the homework problems), please buy the textbook

Switching and bridging

Networking interview questions

The Network Layer and Routers

Router Construction. Workstation-Based. Switching Hardware Design Goals throughput (depends on traffic model) scalability (a function of n) Outline

Introduction to LAN Protocols

Extending the LAN. Context. Info 341 Networking and Distributed Applications. Building up the network. How to hook things together. Media NIC 10/18/10

Switched Ethernet Virtual LANs

===================================================================== Exercises =====================================================================

Distributed Queue Dual Bus

Local Area Network Overview

Packet Switching. Guevara Noubir Fundamentals of Computer Networks. Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann

Chapter 15 Local Area Network Overview

Connecting LANs, Backbone Networks, and Virtual LANs

LAN Overview (part 2) Interconnecting LANs - Hubs

1: Review Of Semester Provide an overview of encapsulation.

Module 15: Network Structures

Cell Switching (ATM) Commonly transmitted over SONET other physical layers possible. Variable vs Fixed-Length Packets

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

CSCD 330 Network Programming Spring 2017

Prepared by Agha Mohammad Haidari Network Manager ICT Directorate Ministry of Communication & IT

Introduction to Communication Networks Spring Unit 13 Network extensions Bridges.

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks.

A primer on modern LANs

Module 16: Distributed System Structures

Transcription:

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Switching and Forwarding Next Problem: Enable communication between hosts that are not directly connected Fundamental Problem of the Internet or any large Network Outline/Goals Store-and-Forward Switches Bridges and Extended LANs Cell Switching Segmentation and Reassembly Spanning Tree Cut-through 1/30/14 2

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) TCP/IP Application gateway! Transport gateway! Router! Frame header! IP header! TCP header! User! data! Bridge, switch! Repeater, hub! 1/30/14 3

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 Continuously monitors electrical signals on each LAN Transmits an amplified copy Repeater 1/30/14 4

Hubs: Physical-Layer Repeaters Hubs are physical-layer repeaters (historical) Bits coming from one link go out all other links At the same rate, with NO frame buffering No CSMA/CD at hub: adapters detect collisions Joins multiple lines electrically just multi port repeater twisted pair hub 51/30/14

Interconnecting with Hubs Backbone hub interconnects LAN segments All packets seen everywhere, forming one large collision domain Can t interconnect Ethernets of different speeds Collision Heaven!!! hub hub hub hub 61/30/14

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 multiple 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 1/30/14 7

Link Layer: Scalable Networks Switch/Bridge Forwards frames from input port to output port stores frames, needs memory port selected based on address in frame header T3 T3 STS-1 Input ports Switch T3 T3 STS-1 Output ports Advantages cover large geographic area (tolerate latency) support large numbers of hosts (scalable bandwidth) can add hosts without performance penalty vs. shared medium 1/30/14 8

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

Bridges and Extended LANs LANs have physical limitations (e.g., 2500m) Connect two or more LANs with a bridge accept and forward strategy, forwarding Frames level 2 connection (does not add packet header) A B C Bridge Port 1 Port 2 X Y Z Ethernet Switch = Bridge on Steroids 1/30/14 10

Learning Bridges Do not forward when unnecessary Maintain forwarding table A B C Bridge Port 1 Port 2 X Y Z Host Port A 1 B 1 C 1 X 2 Y 2 Z 2 Learn table entries based on source address of frame Table is an optimization; need not be complete Always forward broadcast frames Timeouts & Aging - Why? 1/30/14 11

Link Layer: Switches Link layer device Stores and forwards (Ethernet) frames Examines frame header and selectively forwards frame based on MAC dest address 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 12 1/30/14

Link Layer: Switches Typically connect individual computers A switch is essentially same as a bridge though typically used to connect hosts, not LANs Collision domain moved into switch Like bridges, support concurrent communication Host A can talk to C, while B talks to D Many ports, many simultaneous conversations B A C switch 13 1/30/14 D

Switching Hardware Design Goals throughput (depends on traffic model) scalability (a function of n) Control processor Switch fabric Ports circuit management (e.g., map VCIs, route datagrams) buffering (input and/or output) Fabric as simple as possible sometimes do buffering (internal) Input port Output port Spring 2002 14

Buffering Wherever contention is possible input port (contend for fabric) internal (contend for output port) output port (contend for link) Head-of-Line Blocking input buffering 1 2 2 Port 1 Port 2 Switch Spring 2002 15

Crossbar Switches Spring 2002 16

Workstation-Based or Switch Switching Aggregate bandwidth 1/2 of the I/O bus bandwidth capacity shared among all hosts connected to switch example: 1Gbps bus can support 5 x 100Mbps ports (in theory) Packets-per-second must be able to switch small packets 300,000 packets-persecond is achievable e.g., 64-byte packets implies 155Mbps CPU Main memory I/O bus Interface 1 Interface 2 Interface 3 Switching Fabric Spring 2002 17

Bridges/Switches: Traffic Isolation Bridge/Switch breaks subnet into LAN segments when multiple nodes per port Bridge/Switch filters frames Frame only forwarded to the necessary segments Segments become separate collision domains switch/bridge collision domain hub hub hub 1/30/14 18 collision domain collision domain

Bridge/Switch Advantages Over Hub/Repeater 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, less collisions Improves privacy by limiting scope of frames Hosts can ONLY 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 Can join segments using different technologies 1/30/14 19

Bridge/Switch Advantages over Hubs/Repeater Dedicated access 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 100BaseT Completely avoids collisions Each connection is a bidirectional point-to-point link No need for carrier sense, collision detection, and so on 1/30/14 20

Bridge/Switch Disadvantages Over Hubs/Repeater Delay in forwarding frames Bridge/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 Bridge/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 But hardware is free 1/30/14 21

Bridge/Switch operation: Broadcast and Multicast Forward (flood) all broadcast/multicast frames current practice Learn when no group members downstream Accomplished by having each member of group G send a frame to bridge multicast address with G in source field Must maintain many Multicast graphs 1/30/14 22

Bridge/Switch: 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 23 1/30/14

Bridge/Switch: Loop Solution Spanning Tree Algorithm Problem: loops A B3 B C B5 B2 D B7 K E F B1 G H I B6 B4 J Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 802.1 specification Subgraph covers all LANs, no loops (a) (b) 1/30/14 24

Spanning Tree Algorithm Overview Each bridge has unique id (e.g., B1, B2, B3) Select bridge with smallest id as root key point Select bridge on each LAN closest to root as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge A: B5 over B3, hops B: B5 over B7, ID I: B4 over B6, ID C E G A B2 B3 D B1 B5 B7 F H B K I B6 B4 J 1/30/14 25

Spanning Tree Algorithm Details Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be root bridge distance (hops) from sending bridge to root bridge Each bridge records current best configuration message for each port Initially, each bridge believes it is the root sends out config info 1/30/14 26

Spanning Tree Algorithm Details (cont) When learn not root, stop generating config messages in steady state, only root generates configuration messages When learn not designated bridge, stop forwarding config messages in steady state, only designated bridges forward config messages Root continues to periodically send config messages If any bridge does not receive config message after a period of time, it starts generating config messages claiming to be the root 1/30/14 27

Limitations of Bridges/Switches Do not scale spanning tree algorithm does not scale broadcast does not scale Do not accommodate heterogeneity Not really directly connected: Drops, reorders, no guaranteed delivery 1/30/14 28

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 (possibly) a large fraction of total time A B 29 1/30/14 switches

Cut-Through Switching Start transmitting 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 packet via the outgoing link while still receiving the tail via the incoming link Sure hope it is a good frame. A B 1/30/14 switches

Frame Routing Knowing and Traveling the Path Problem: Choose output port Source Routing Virtual Circuits Datagrams Problem: Name receiving host: Addresses 1/30/14 31

Approach 1: Source Routing 3 0 2 Switch 1 1 3 0 1 1 3 0 3 2 0 Switch 2 1 3 0 2 1 Host A Need to know: Path to Destination Ports on Path to Destination Header size is variable Header rotation checksum issues 0 Switch 3 1 3 1/30/14 32 0 1 3 2 Host B

Approach 2: Virtual Circuit Switching Explicit connection setup (and tear-down) phase Subsequence packets follow same circuit Sometimes called connection-oriented model 3 0 1 11 3 0 1 3 0 1 Analogy: phone call Each switch maintains a VC table 2 Host A Switch 1 5 5 is VC ID, Not Port Switch 2 2 7 3 0 2 Switch 3 1 2 4 Host B 1/30/14 33

Notes: Virtual Circuit Model Typically wait full RTT for connection setup before sending first data packet. While the connection request contains the full address for destination, each data packet contains only a small identifier, making the per-packet header overhead small. If a switch or a link in a connection fails, the connection is broken and a new one needs to be established. Connection setup provides an opportunity to reserve resources. 1/30/14 34

Approach 3: Datagram Switching No connection setup phase Each packet forwarded independently Sometimes called connectionless model Host D Analogy: postal system 3 Host C 0 2 Switch 1 1 Host E 2 Switch 2 3 1 Host F Each switch maintains a forwarding (routing) table Host A 0 Host G 0 Switch 3 1 3 Host B 2 Host H 1/30/14 35

Notes: Datagram Model There is no round trip delay waiting for connection setup; a host can send data as soon as it is ready. Source host has no way of knowing if the network is capable of delivering a packet or if the destination host is even up. Since packets are treated independently, it is possible to route around link and node failures. Since every packet must carry the full address of the destination, the overhead per packet is higher than for the connection-oriented model. Someone must build the tables in each switch 1/30/14 36

Example Tables Circuit Table (switch 1, port 2) VC In VC Out Port Out 5 11 1 6 8 1 Forwarding Table (switch 1) Address Port A 2 C 3 F 1 G 1 1/30/14 37

Typical Network Individual broadcast and collision domains Connected by routers Routers add latency to packet transmission 1/30/14 38

Typical network with Switches and Routers LAN == Collision Domain 1/30/14 39

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 Want flexibility in mapping offices to different LANs Routers add some delay VLAN allows Grouping users based on organizational structure, rather than the physical layout of the building.! 1/30/14 40

Why Organize LAN 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 Reduce router traffic by keeping on common collision domain 1/30/14 41

LAN Reality: People Move, and Roles Change Organizational changes are frequent E.g., faculty office becomes a grad-student office Physical rewiring is a major pain Requires unplugging the cable from one port and plugging it into another and hoping you don t make a mistake Would like to rewire the building in software The resulting concept is a Virtual LAN (VLAN) VLAN Virtual LAN Group devices on different physical LANs as if on same physical LAN Shared Collision Domain 1/30/14 42

VLAN Grouping 1/30/14 43

Making VLANs Work Bridges/switches need configuration tables Saying which VLANs are accessible via which interfaces Changing the Ethernet header Adding a field for a VLAN tag Implemented on the bridges/switches key point but can still interoperate with old Ethernet cards Devices (nodes) do not care, only switches need to understand. 1/30/14 44

VLAN Benefits Increased performance Organized collision domains workgroups with different private services Group users into logical networks with smaller collision and broadcast domains Reduce routed traffic Improved manageability Allow centralized configuration of devices located in diverse locations Easier to add/subtract nonlocal users Configure LANs without moving hosts 1/30/14 45

VLAN Benefits Network Tuning Group users and software configurations IP addresses, subnet masks, etc. Bootp and DHCP easier to manage Increased Security sensitive material isolate testing 1/30/14 46

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 1/30/14 47

Comparing Hubs, Switches, & Routers hubs routers switches traffic isolation no yes yes plug & play yes no yes optimal routing cut through no yes no yes no yes 1/30/14 48

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) 1/30/14 49