CS 43: Computer Networks The Link Layer. Kevin Webb Swarthmore College November 28, 2017

Similar documents
CS 43: Computer Networks The Network Layer. Kevin Webb Swarthmore College November 2, 2017

CSC 401 Data and Computer Communications Networks

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

CS 455/555 Intro to Networks and Communications. Link Layer

Chapter 5 Link Layer and LANs

Chapter 6 The Link Layer and LANs

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

PART III. Data Link Layer MGH T MGH C I 204

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Data Link Layer Overview

Network Model. Why a Layered Model? All People Seem To Need Data Processing

CSC 4900 Computer Networks: The Link Layer

Data Link Layer Overview

Data Link Layer Overview

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

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

Data Link Layer Overview

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS

19: Networking. Networking Hardware. Mark Handley

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

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Module 10 Data Link Layer CS655! 10-1!

416 Distributed Systems. Errors and Failures, part 2 Feb 3, 2016

Introduction to Information Science and Technology 2017 Networking I. Sören Schwertfeger 师泽仁

ECE4110 Internetwork Programming. Introduction and Overview

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

Lecture 8 Link Layer: functionality, error detection, media access algorithm

ENEE 457: Computer Systems Security 11/07/16. Lecture 18 Computer Networking Basics

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Computer Networks LECTURE 10 ICMP, SNMP, Inside a Router, Link Layer Protocols. Assignments INTERNET CONTROL MESSAGE PROTOCOL

OSI and TCP/IP Models

Introduction to Computer Networks. 03 Data Link Layer Introduction

CS 4453 Computer Networks Winter

Links. CS125 - mylinks 1 1/22/14

Computer Communications DIT 420 EDA343

Review. Some slides are in courtesy of J. Kurose and K. Ross

Introduction to computer networking

Introduction to Internetworking

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Where we are in the Course

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

LINK LAYER AND LANS 1

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Homework 4 assignment for ECE374 Posted: 04/06/15 Due: 04/13/15

The Data Link Layer. 32 PART I Networking Basics

Chapter V: Link Layer

Computer and Network Security

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

CSE 123A Computer Networks

CS 3640: Introduction to Networks and Their Applications

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

Data Link Layer. Srinidhi Varadarajan

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

Lecture 20: Link Layer

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

CS 4390 Computer Networks. Transport Services and Protocols

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

ECSE 414 Fall 2014 Final Exam Solutions

Problem Set 9 Due: Start of class, December 4

CS 43: Computer Networks. 15: Transport Layer & UDP October 5, 2018

CS519: Computer Networks. Lecture 1 (part 2): Jan 28, 2004 Intro to Computer Networking

ECE 435 Network Engineering Lecture 12

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

Some portions courtesy Robin Kravets and Steve Lumetta

Goals of Today s Lecture. Adaptors Communicating

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

Chapter 16 Networking

ECE 650 Systems Programming & Engineering. Spring 2018

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

Layer 2 functionality bridging and switching

How the Internet Works

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

The Data Link Layer Chapter 3

Significance of TCP/IP Model Divya Shree Assistant Professor (Resource Person), Department of computer science and engineering, UIET, MDU, Rohtak

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

CSE 123: Computer Networks

IP Basics Unix/IP Preparation Course June 29, 2010 Pago Pago, American Samoa

cs144 Midterm Review Fall 2010

Chapter 5 Link Layer and LANs

Chapter 10 Error Detection and Correction 10.1

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 5: Link layer

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Study Guide. Module Two

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

ch02 True/False Indicate whether the statement is true or false.

ECE 158A: Lecture 7. Fall 2015

Networking and TCP/IP. John Kalbach November 8, 2004

Module 4 Data Link Layer CS655! 4-1!

Link Layer and LANs. CMPS 4750/6750: Computer Networks

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Basic Communication Concepts

Homework 3 Discussion

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

CS164 Final Exam Winter 2013

Transcription:

CS 43: Computer Networks The Link Layer Kevin Webb Swarthmore College November 28, 2017

TCP/IP Protocol Stack host host HTTP Application Layer HTTP TCP Transport Layer TCP router router IP IP Network Layer IP IP Ethernet interface Ethernet interface SONET SONET interface Link Layer interface Ethernet interface Ethernet interface

Internet Protocol Stack Application: Email, Web, Transport: TCP, UDP, Network: IP Link: Ethernet, WiFi, SONET, Physical: copper, fiber, air, Email Web UDP TCP IP Ethernet ATM Hourglass model, thin waist, narrow waist

Recall IP Motivation 1970 s: new network technologies emerge SATNet, Packet Radio, Ethernet All islands to themselves didn t work together IP question: how to connect these networks? This implies: These networks do all the stuff networks need to do, without IP or routers. Solves some of the same problems as IP Often in a different way (smaller scale)

From Macro- to Micro- Previously, we looked at Internet scale Other Networks Other Networks Customer s ISP Destination AS Customer AS

Within a Subnet Router

Link Layer Goal Get from one node to it s adjacent neighbor. Abstract the details of the underlying network technology from the protocols above it (IP). Lots of media with different characteristics: Copper cable Fiber optic cable Radio/electromagnetic broadcast Satellite

Challenges Even with one medium: Potentially many ways to format & signal data. Multiple users may contend to transmit. How do we address endpoints? How do we locate destinations?

Link Layer Functions 1. Addressing: identifying endpoints Must be able to uniquely identify each host on the network. Can t assume IP. Implication: each host on the Internet will have two addresses: IP & link-layer Typically referred to as MAC address Media Access Control

Addressing Typically, humans deal in IP addresses (or DNS names that resolve to them) Network needs a mechanism to determine corresponding MAC address for local sending

ARP: Address Resolution Protocol Common in networks you use: Ethernet, WiFi Broadcast to entire local network: I m looking for the MAC address of the host with IP address A.B.C.D. If you re out there, please respond to me! You will implement this in lab 7!

ARP Example IP: 130.58.68.10 MAC: IP: 130.58.68.11 MAC: Switch Switch Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 IP: 130.58.68.13 MAC:

ARP Example IP: 130.58.68.10 MAC: IP: 130.58.68.11 MAC: Switch Switch Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet User at highlighted host wants to send to the Internet. IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 IP: 130.58.68.13 MAC: It needs to address data to the router!

ARP Example IP: 130.58.68.10 MAC: IP: 130.58.68.11 MAC: Switch Switch Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet User at highlighted host wants to send to the Internet. IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 IP: 130.58.68.13 MAC: It knows router s IP, needs to get router s MAC.

ARP Example IP: 130.58.68.10 MAC: Switch IP: 130.58.68.11 MAC: Switch I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet It creates an ARP message to find the router s MAC. IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 IP: 130.58.68.13 MAC:

ARP Example I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? IP: 130.58.68.10 MAC: Switch I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? IP: 130.58.68.11 MAC: I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 Switch I m 130.58.68.12 @ 00:65:88:42:E1:B2. Who has 130.58.68.1? IP: 130.58.68.13 MAC: Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet Broadcast the ARP to everyone on the local network.

ARP Example IP: 130.58.68.10 MAC: IP: 130.58.68.11 MAC: Switch I m 130.58.68.1@ 00:11:3D:09:F7:9A Switch Router IP: 130.58.68.1 MAC: 00:11:3D:09:F7:9A Internet Router will reply directly back to host. IP: 130.58.68.12 MAC: 00:65:88:42:E1:B2 IP: 130.58.68.13 MAC: Host caches the entry.

Link Layer Functions 1. Addressing: identifying endpoints 2. Framing: Dividing data into pieces that are sized for the network to handle. Data pieces: Transport: Segments Network: Datagrams (or packets) Link: Frames Physical: Bits

Link Layer Functions 1. Addressing: identifying endpoints 2. Framing: Dividing data into pieces that are sized for the network to handle. Data pieces: Transport: Segments Network: Datagrams (or packets) Link: Frames Physical: Bits Big freaking deal, Sherlock!

Why do we put a limit on the size of a frame? A. To keep one user from hogging the channel. B. To make signaling message boundaries easier. C. To achieve higher performance D. Some other reason.

Link Layer Functions 1. Addressing: identifying endpoints 2. Framing: Dividing data into pieces that are sized for the network to handle. 3. Link access: Determining how to share the medium, who gets to send, and for how long.

Link Access Some networks may not require much. Router Point to point link, no sharing with other devices. Router Example 1: Single copper wire, only one of them can send at a time. Example 2: Two copper wires in cable, each can send on one simultaneously.

Link Access For other networks, this is a huge challenge.

Link Access For other networks, this is a huge challenge. Collision!

How should we handle collisions in general (for WiFi and other link media)? A. Enforce at the end hosts that only one sender transmit at a time. B. Enforce in the network that only one sender transmit at a time. C. Detect collisions and retransmit later. D. Something else.

Link Layer Functions 1. Addressing: identifying endpoints 2. Framing: Dividing data into pieces that are sized for the network to handle. 3. Link access: Determining how to share the medium, who gets to send, and for how long. 4. Error detection/correction and reliability.

Reliability in the link layer seems at odds with the E2E principle. Why would we add reliability here? A. Legacy reasons: reliability was done at the link layer first, E2E came later. B. It improves performance. C. It s necessary for correctness. D. Some other reason. E. It s completely unnecessary.

Link Layer Functions 1. Addressing: identifying endpoints 2. Framing: Dividing data into pieces that are sized for the network to handle. Not so complex 3. Link access: Determining how to share the medium, who gets to send, and for how long. 4. Error detection/correction and reliability. Next time (6.3 in book)

Recall: Internet Checksum Goal: detect errors (e.g., flipped bits) in transmitted packet (note: used at transport layer only) Sender: treat segment contents as sequence of 16-bit integers checksum: 1 s complement sum of segment contents sender puts checksum value into UDP checksum field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless?

Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction otherwise

Simple Parity - Sender Suppose you want to send the message: 001011011011000110010 For every d bits (e.g., d = 7), add a parity bit: 1 if the number of one s is odd 0 if the number of one s is even Message chunk Parity bit 0010110 1 1101100 0 0110010 1 001011011101100001100101

Simple Parity - Sender Suppose you want to send the message: 0010110 1101100 0110010 For every d bits (e.g., d = 7), add a parity bit: 1 if the number of one s is odd 0 if the number of one s is even Message chunk Parity bit 0010110 1 1101100 0 0110010 1 001011011101100001100101

Simple Parity - Receiver For each block of size d: Count the number of 1 s and compare with following parity bit. If an odd number of bits get flipped, we ll detect it (can t do much to correct it). Cost: One extra bit for every d In this example, 21 -> 24 bits.

Two-Dimensional Parity Suppose you want to send the same message: 001011011011000110010 Add an extra parity byte, compute parity on columns too. Can detect 1, 2, 3-bit (and some 4-bit) errors Message chunk Parity bit 0010110 1 1101100 0 0110010 1 Parity byte: 1001000 0

Forward Error Correction With two-dimensional parity, we can even correct single-bit errors. Parity bits Parity byte 0 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 Exactly one bit has been flipped. Which is it?

In practice Bit errors occur in bursts. We re willing to trade computational complexity for space efficiency. Make the detection routine more complex, to detect error bursts, without tons of extra data Insight: We need hardware to interface with the network, do the computation there!

Cyclic redundancy check more powerful error-detection coding view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (Ethernet, 802.11 WiFi, ATM)

Summary The link layer provides lots of functionality: addressing, framing, media access, error checking could be used independently of IP! typically only small scale Many different technologies out there. copper wires, optics, wireless, satellite differing challenges for each