CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Similar documents
CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI Computer Networks

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Medium Access Protocols

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

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

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

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

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

CSE 461: Multiple Access Networks. This Lecture

Link Layer and Ethernet

Switching and Forwarding - continued

Switching and Forwarding - continued

Summary of MAC protocols

Link Layer and Ethernet

Housekeeping. Fall /5 CptS/EE 555 1

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

Direct Link Communication II: Wired Media. Multi-Access Communication

Switching and Forwarding

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

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

LAN Interconnection and Other Link Layer Protocols

CSC 4900 Computer Networks: Link Layer (2)

Communication Networks

Some portions courtesy Srini Seshan or David Wetherall

Data Link Layer, Part 3 Medium Access Control. Preface

Computer and Network Security

Ethernet Hub. Campus Network Design. Hubs. Sending and receiving Ethernet frames via a hub

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

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

CSE 123A Computer Networks

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

Principles behind data link layer services

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

Medium Access Control Sublayer Chapter 4

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

The Link Layer II: Ethernet

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Objectives. Hexadecimal Numbering and Addressing. Ethernet / IEEE LAN Technology. Ethernet

The Medium Access Control Sublayer

Internetworking Part 1

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

CSMA/CD (Collision Detection)

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

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

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Direct Link Networks (II)

CSCI-1680 Link Layer Reliability John Jannotti

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Chapter 5 Link Layer and LANs

CS 3640: Introduction to Networks and Their Applications

Shared Access Networks. Media Access Protocols. Ethernet (802.3) Ethernet cont...

Direct Link Communication II: Wired Media. Multi-Access Communication

COS 140: Foundations of Computer Science

Lecture 4b. Local Area Networks and Bridges

CS 3640: Introduction to Networks and Their Applications

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

The Link Layer and LANs. Chapter 6: Link layer and LANs

Topics Today. Lecture 8: Physical and Link Layers. Protocol Layering. Physical layer: chips versus bits. Physical Layer (Layer 1) Protocol Layering

Links. CS125 - mylinks 1 1/22/14

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

More on LANS. LAN Wiring, Interface

Multiple Access Channels

Data Link Layer, Part 5. Medium Access Control

Transparent Bridging and VLAN

EE 122: Ethernet and

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

ECE 4450:427/527 - Computer Networks Spring 2017

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

CMSC 332 Computer Networks Network Layer

Computer Networks Principles LAN - Ethernet

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSE 461: Bridging LANs. Last Topic

The MAC Layer. Mukhopadhyay. Jean Yves Le Boudec 2017

Applied Networks & Security

Access Technologies! Fabio Martignon

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

Switching and bridging

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

The Link Layer and LANs: Ethernet and Swiches

CSC 4900 Computer Networks: The Link Layer

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Protocols for Multiaccess Networks

ECE 4450:427/527 - Computer Networks Spring 2017

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

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

LAN PROTOCOLS. Beulah A AP/CSE

COS 140: Foundations of Computer Science

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

Image courtesy Cisco Systems, Inc. Illustration of a Cisco Catalyst switch

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Data always flows in one direction around ring Like Ethernet, all nodes see all frames, and protocol is necessary to decide when to send

Transcription:

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Janno<

Administrivia Homework I out later today, due next Thursday, Sep 25th

Today: Link Layer (cont.) Framing Reliability Error correction Sliding window Medium Access Control Case study: Ethernet Link Layer Switching

Media Access Control Control access to shared physical medium E.g., who can talk when? If everyone talks at once, no one hears anything Job of the Link Layer Two conflicting goals Maximize utilization when one node sending Approach 1/N allocation when N nodes sending

Different Approaches Partitioned Access Time Division Multiple Access (TDMA) Frequency Division Multiple Access (FDMA) Code Division Multiple Access (CDMA) Random Access ALOHA/ Slotted ALOHA Carrier Sense Multiple Access / Collision Detection (CSMA/CD) Carrier Sense Multiple Access / Collision Avoidance (CSMA/CA) RTS/CTS (Request to Send/Clear to Send) Token-based

Case Study: Ethernet (802.3) Dominant wired LAN technology 10BASE2, 10BASE5 (Vampire Taps) 10BASET, 100BASE-TX, 1000BASE-T, 10GBASE-T, Both Physical and Link Layer specification CSMA/CD Carrier Sense / Multiple Access / Collision Detection Frame Format (Manchester Encoding): 64 48 48 16 32 Preamble Dest addr Src addr Type Body CRC

Ethernet Addressing Globally unique, 48-bit unicast address per adapter Example: 00:1c:43:00:3d:09 (Samsung adapter) 24 msb: organization http://standards.ieee.org/develop/regauth/oui/oui.txt Broadcast address: all 1s Multicast address: first bit 1 Adapter can work in promiscuous mode

Ethernet MAC: CSMA/CD Problem: shared medium 10Mbps: 2500m, with 4 repeaters at 500m Transmit algorithm If line is idle, transmit immediately Upper bound message size of 1500 bytes Must wait 9.6μs (96-bit time) between back to back frames (Old limit) To give time to switch from tx to rx mode If line is busy: wait until idle and transmit immediately

Handling Collisions Collision detection (10Base2 Ethernet) Uses Manchester encoding. Why does that help? Constant average voltage unless multiple transmitters If collision Jam for 32 bits, then stop transmitting frame Collision detection constrains protocol Imposes min. packet size (64 bytes or 512 bits) Imposes maximum network diameter (2500m) Must ensure transmission time 2x propagation delay (why?)

Collision Detection Time Collision Detect No Collision Detect! Without minimum frame length, might not detect collision

When to transmit again? Delay and try again: exponential backoff nth time: k 51.2μs, for k = U{0..2 min(n,10) -1} 1 st time: 0 or 51.2μs 2 nd time: 0, 51.2, 102.4, or 153.6μs Give up after several times (usually 16)

Capture Effect Exponential backoff leads to self-adaptive use of channel A and B are trying to transmit, and collide Both will back off either 0 or 51.2μs Say A wins. Next time, collide again. A will wait between 0 or 1 slots B will wait between 0, 1, 2, or 3 slots

Token Ring Idea: frames flow around ring Capture special token bit pattern to transmit Variation used today in Metropolitan Area Networks, with fiber

Interface Cards Host Host Host Host From previous host To next host From previous host To next host Relay Relay (a) (b) Problem: if host dies, can break the network Hardware typically has relays

Token Ring Frames Frame format (Differential Manchester) 8 8 8 48 48 Variable 32 8 8 Start delimiter Access control Frame control Dest addr Src addr Body Checksum End delimiter Frame status Sender grabs token, sends message(s) Recipient checks address Sender removes frame from ring after lap Maximum holding time: avoid capture Monitor node reestablishes lost token

Switching

Basic Problem Direct-link networks don t scale Solution: use switches to connect network segments

Switching T3 T3 STS-1 Input ports Switch T3 T3 STS-1 Output ports Switches must be able to, given a packet, determine the outgoing port 3 ways to do this: Virtual Circuit Switching Datagram Switching Source Routing

3 Virtual Circuit Switching 0 0 0 3 1 11 3 1 Switch 1 Switch 2 2 2 2 1 7 3 0 Switch 3 1 Host A Explicit set-up and tear down phases Establishes Virtual Circuit Identifier on each link Each switch stores VC table Subsequent packets follow same path Switches map [in-port, in-vci] : [out-port, out-vci] Also called connection-oriented model 2 Host B

Virtual Circuit Model Requires one RTT before sending first packet Connection request contain full destination address, subsequent packets only small VCI Setup phase allows reservation of resources, such as bandwidth or buffer-space Any problems here? If a link or switch fails, must re-establish whole circuit Example: ATM

Datagram Switching Host D 0 Switch 1 Host E 3 1 Host F Host C 2 Switch 2 2 3 1 0 Host A Host G 0 Switch 3 Host B 1 3 2 Host H Each packet carries destination address Switches maintain address-based tables Maps [destination address]:[out-port] Also called connectionless model Switch 2 Addr Port A 3 B 0 C 3 D 3 E 2 F 1 G 0 H 0

Datagram Switching No delay for connection setup Source can t know if network can deliver a packet Possible to route around failures Higher overhead per-packet Potentially larger tables at switches

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 0 1 3 Packets carry entire route: ports Switches need no tables! But end hosts must obtain the path information Variable packet header 0 Switch 3 1 3 Host B 2

Bridging

Bridges and Extended LANs LANs have limitations E.g. Ethernet < 1024 hosts, < 2500m Connect two or more LANs with a bridge Operates on Ethernet addresses Forwards packets from one LAN to the other(s) Ethernet switch is just a multi-way bridge A B C Port 1 Bridge Port 2 X Y Z

A Learning Bridges B C Port 1 Bridge Port 2 X Y Z Idea: don t forward a packet where it isn t needed If you know recipient is not on that port Learn hosts locations based on source addresses Build a table as you receive packets Table is a cache: if full, evict old entries. Why is this fine? Table says when not to forward a packet Doesn t need to be complete for correctness

Attack on a Learning Switch Eve: wants to sniff all packets sent to Bob Same segment: easy (shared medium) Different segment on a learning bridge: hard Once bridge learns Bob s port, stop broadcasting How can Eve force the bridge to keep broadcasting? Flood the network with frames with spoofed src addr!

Bridges Unicast: forward with filtering Broadcast: always forward Multicast: always forward or learn groups Difference between bridges and repeaters? Bridges: same broadcast domain; copy frames Repeaters: same broadcast and collision domain; copy signals

Dealing with Loops Problem: people may create loops in LAN! Accidentally, or to provide redundancy Don t want to forward packets indefinitely A B3 B C B5 B2 D B7 K E F B1 G H I B6 B4 J

Spanning Tree A B3 B C B5 B2 D B7 K E F B1 G H I B6 B4 J Need to disable ports, so that no loops in network Like creating a spanning tree in a graph View switches and networks as nodes, ports as edges

Distributed Spanning Tree Algorithm Every bridge has a unique ID (Ethernet address) Goal: Bridge with the smallest ID is the root Each segment has one designated bridge, responsible for forwarding its packets towards the root Bridge closest to root is designated bridge If there is a tie, bridge with lowest ID wins

Spanning Tree Protocol Send message when you think you are the root Otherwise, forward messages from best known root Add one to distance before forwarding Don t forward over discarding ports (see next slide) Spanning Tree messages contain: ID of bridge sending the message ID sender believes to be the root Distance (in hops) from sender to root Bridges remember best config msg on each port In the end, only root is generating messages

Spanning Tree Protocol (cont.) Forwarding and Broadcasting Port states*: Root port: a port the bridge uses to reach the root Designated port: the lowest-cost port attached to a single segment If a port is not a root port or a designated port, it is a discarding port. * In a later protocol RSTP, there can be ports configured as backups and alternates.

A B3 B Root Port C B5 Designated Port B2 D B7 K Discarding Port E F B1 G H I B6 B4 J

Algorhyme I think that I shall never see a graph more lovely that a tree. A tree whose crucial property is loop-free connectivity. A tree that must be sure to span so packet can reach every LAN. First the root must be selected. By ID, it is elected. Least cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, then bridges find a spanning tree. Radia Perlman

Limitations of Bridges Scaling Spanning tree algorithm doesn t scale Broadcast does not scale No way to route around congested links, even if path exists May violate assumptions Could confuse some applications that assume single segment Much more likely to drop packets Makes latency between nodes non-uniform Beware of transparency

VLANs b1 a1 b2 a2 Company network, A and B departments Broadcast traffic does not scale May not want traffic between the two departments Topology has to mirror physical locations What if employees move between offices?

VLANs a2 a1 b2 b1 Solution: Virtual LANs Assign switch ports to a VLAN ID (color) Isolate traffic: only same color Trunk links may belong to multiple VLANs Encapsulate packets: add 12-bit VLAN ID Easy to change, no need to rewire

Generic switch architecture Generic Switch Architecture Control processor Input port Switch fabric Output port Goal: deliver packets from input to output ports Three potential performance concerns: Throughput in bytes/second Throughput in packets/second Latency

Shared Memory Switch I/O bus CPU Interface 1 Interface 2 Main memory Interface 3 1 st Generation like a regular PC NIC DMAs packet to memory over I/O bus CPU examines header, sends to destination NIC I/O bus is serious bottleneck For small packets, CPU may be limited too Typically < 0.5 Gbps

Shared Bus Switch I/O bus CPU Interface 1 Interface 2 Main memory Interface 3 2 st Generation NIC has own processor, cache of forwarding table Shared bus, doesn t have to go to main memory Typically limited to bus bandwidth (Cisco 5600 has a 32Gbps bus)

Point to Point Switch 3 rd Generation: overcomes single-bus bottleneck Example: Cross-bar switch Any input-output permutation Multiple inputs to same output requires trickery Cisco 12000 series: 60Gbps

Cut through vs. Store and Forward Two approaches to forwarding a packet Receive a full packet, then send to output port Start retransmitting as soon as you know output port, before full packet Cut-through routing can greatly decrease latency Disadvantage Can waste transmission (classic optimistic approach) CRC may be bad If Ethernet collision, may have to send runt packet on output link

Buffering Buffering of packets can happen at input ports, fabric, and/or output ports Queuing discipline is very important Consider FIFO + input port buffering Only one packet per output port at any time If multiple packets arrive for port 2, they may block packets to other ports that are free Head-of-line blocking: can limit throughput to ~ 58% under some reasonable conditions* 1 2 2 Port 1 Port 2 * For independent, uniform traffic, with same- size frames

Head-of-Line Blocking 1 2 2 Port 1 Port 2 Solution: Virtual Output Queueing Each input port has n FIFO queues, one for each output Switch using matching in a bipartite graph Shown to achieve 100% throughput* *MCKEOWN et al.: ACHIEVING 100% THROUGHPUT IN AN INPUT- QUEUED SWITCH, 1999

Coming Up Connecting multiple networks: IP and the Network Layer