CS 3640: Introduction to Networks and Their Applications

Similar documents
CS 3640: Introduction to Networks and Their Applications

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

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

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

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

Links. CS125 - mylinks 1 1/22/14

CS 3640: Introduction to Networks and Their Applications

Data Link Layer: Overview, operations

CSC 4900 Computer Networks: The Link Layer

Chapter 5 Link Layer and LANs

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

CSC 401 Data and Computer Communications Networks

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

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

CS 3640: Introduction to Networks and Their Applications

Goals of Today s Lecture. Adaptors Communicating

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

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

Data Link Layer: Multi Access Protocols

EE 122: Ethernet and

Chapter 5: Link layer

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

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

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

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

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

CS 4453 Computer Networks Winter

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

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

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

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

CSCD 330 Network Programming

Telematics. 5th Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

ECSE 414 Fall 2014 Final Exam Solutions

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

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

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

Networking Link Layer

Problem Set 9 Due: Start of class, December 4

The Link Layer II: Ethernet

Outline: Connecting Many Computers

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

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

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

CSCI Computer Networks

Link Layer and Ethernet

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

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

Module 10 Data Link Layer CS655! 10-1!

Chapter V: Link Layer

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

Introduction to Computer Networks. 03 Data Link Layer Introduction

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

Chapter 6 The Link Layer and LANs

Layer 2 functionality bridging and switching

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

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

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

CSCD 330 Network Programming Fall 2012

Lecture 6 Datalink Framing, Switching. From Signals to Packets

The MAC Address Format

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Link Layer and Ethernet

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

Medium Access Protocols

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

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

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

STEVEN R. BAGLEY PACKETS

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Network Architecture

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

COMP/ELEC 429/556 Introduction to Computer Networks

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

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

Communication Networks

19: Networking. Networking Hardware. Mark Handley

CS 3516: Computer Networks

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

ECE 158A: Lecture 13. Fall 2015

Link Layer. (continued)

Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 Final: 5/20/2005

Inst: Chris Davison

LAN Overview (part 2) Interconnecting LANs - Hubs

Transcription:

CS 3640: Introduction to Networks and Their Applications Fall 2018, Lecture 5: The Link Layer I Errors and medium access Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain 1

You should Be checking Piazza regularly for announcements. Have started working on assignment 1. Know and understand: The three Internet design principles. Encapsulation. The components of the Internet. Circuit- vs. packet- switched networks. Components of end-to-end delay. How do you estimate each of them? How do you identify bottlenecks and address each delay? 2

This week in class 1. Recap: Performance metrics 2. 3. Link layer principles: Errors and medium access Thursday: Assignment in class 3

Recap: How do we assess the performance of a packet-switched network? Delay How long does it take a packet to get to its destination? Transmission delay: How fast can your link interface convert bits into link signals? Propagation delay: How fast can your link send bits from one end to the other? Processing delay: How fast can your processor handle an incoming packet? Queueing delay: How full is the buffer? Loss What fraction of packets that are sent end up getting dropped? Throughput At what rate is data being received by the destination?

Recap: What is the end-to-end transmission delay? Switch 1 100 Gbps Switch 2.5 Gbps Transmission delay: How much time for the switch/router to put all bits on the link? Source transmission delay: 8x10 9 b/1x10 9 bps = 8s Switch 1 transmission delay: 8x10 9 b/100x10 9 bps =.08s Switch 2 transmission delay: 8x10 9 b/.5x10 9 bps = 16s End-to-end transmission delay: 24.08s

Recap: What is the end-to-end propagation delay? 2000m Switch 1 100 Gbps 2000m Switch 2.5 Gbps 4000m Propagation delay: How much time for the link to send data from one end to the other? Source -> switch 1 propagation delay: 2x10 3 m/2x10 8 mps = 10-5 s Switch 1 -> switch 2 propagation delay: 2x10 3 m/2x10 8 mps = 10-5 s Switch 2 -> destination propagation delay: 4x10 3 m/2x10 8 mps = 2x10-5 s End-to-end transmission delay: 10-5 + 10-5 + 2x10-5 s = 4x10-5 s

Recap: What is the end-to-end processing delay? 2000m Switch 1 100 Gbps 2 GHz 2000m Switch 2.5 Gbps 1 GHz 4000m Processing delay: How much time to check packet for errors and decide next hop? Switch 1 processing delay per packet: 1000 cycles per packet/2x10 9 cycles per second =.5x10-6 seconds per packet Switch 2 processing delay per packet: 1000 cycles per packet/.5x109 cycles per second = 2x10-6 seconds per packet End-to-end processing delay per packet: 2.5x10-6 seconds per packet

Recap: What is the end-to-end (average) queueing delay? Switch 1 100 Gbps Switch 2.5 Gbps Queueing delay: How much time, on average, does data spend in buffers? Switch 1. Arrival rate: 1 Gbps Departure rate: 100 Gbps A packet comes in. Queue is empty. It gets sent out. Average queueing delay at switch 1 = 0 s

Maximum queueing delay: 8s. Total bits: 8x10 9 Average queueing delay for a bit at switch 2: (0 + a + 2a + + (8x10 9-1)a)/8x10 9 = a(.5x(8x10 9 )x(8x10 9-1))/8x10 9 =.5x(8x10 9-1)a =.5x8 = 4 s. Recap: What is the end-to-end (average) queueing delay? Switch 1 100 Gbps Switch 2.5 Gbps Queueing delay: How much time, on average, does data spend in buffers? Switch 2. Arrival rate: 1 Gbps (bottlenecked by source sending rate). Departure rate:.5 Gbps For every 2 bits coming in, 1 has to wait in the queue. First bit arrives at t 0 sec. Last bit arrives at t 0 + 8s (time for a 1 GB file to arrive at 1Gbps). Last bit leaves at t 0 + 16s (time for a 1 GB file to leave at.5gbps).

This week in class 1. Recap: Performance metrics 2. 3. Link layer principles: Errors and medium access Thursday: Assignment in class 10

Recap: The link layer What are the functions of the link layer? Write bits to and read bits from the network interface. How does the link layer perform error detection and correction? How do multiple devices share a link? Figure out which wire to put bits on. What does the link layer need to know to put things on the right wire? The link layer protocol can be different things on different devices. Can be Ethernet on one hop, WiFi on the next. They are usually implemented on an adaptor (NIC for Ethernet). We will focus on the principles of the link layer, not any specific protocol.

Recap: The link layer How do adaptors communicate? At the senders side: Link layer gets a datagram from Network layer. Figures out which wire to use for the network layer destination. Encapsulates datagram with link layer header. (Frame) Adds error checking (or, correction) bits to header. Writes frame to link.

Recap: The link layer How do adaptors communicate? At the receivers side: Link layer gets a frame from the link. Figures out which wire to use for the network layer destination. Looks for errors and corrects them if required/possible. Strips link layer headers and passes the datagram up to the network layer.

The link layer: Error detection and correction The link layer may perform error detection and correction on frames when possible and if asked to do so. Why? The physical world is inherently noisy. Interference from radio transmissions and microwaves. Discuss: Is this a violation of the end-to-end principle? When is it OK?

The link layer: Error detection and correction Discuss: How would you detect errors in frames? Hint: Redundancy might help.

The link layer: Error detection and correction A simple solution: Send multiple copies of each frame. An error has occurred if copy 1!= copy 2!=!= copy n. Problems Overhead! n transmissions for each frame.

The link layer: Error detection and correction A better idea: Parity bits Add extra bits to make sure number of 1s is even. Example: 7-bit ASCII chars. Make 8 th bit the parity bit. If number of 1s in any 8bit sequence is odd, error occurred. Overhead: 1 parity bit for every 7 frame bits (14%). Problem? Discuss: What s the minimum number of bits that need to change for this to fail? 0101001 1 1101001 0

The link layer: Error detection and correction A better idea: Two-dimensional parity bits Imagine your frame as a two-dimensional array of bits. Add one parity bit for each row and for each column. Can detect most errors with only 14% overhead! Discuss: What's the minimum number of bits that need to change for this to fail?

The link layer: Error detection and correction An even better idea: Checksums What if you just added all the bytes in your frame. Included the sum in the frame. Requires only 16 bits overhead for the whole frame! (~1% overhead) This is used in the transport layer and IP layer. Problem: Still can have errors. Example (data): 10000000 + 01111111 = 11111111 Error: 11000000 + 00111111 = 11111111

The link layer: Error detection and correction What we actually use in the link layer: Cyclic Redundancy Check (CRC) A more complicated version of checksum. Idea: Perform a series of mathematical operations on the frames data bits to get a semi-unique value. Typically, 32 bit overhead per frame (3%). Chance of error: 1/2 32! Very cheap to implement in hardware. Very quick.

The link layer: Error detection and correction How does a sender know if a frame was: Received error free? Received at all? Discuss: How do you do this IRL?

Time Time The link layer: Error detection and correction The Stop and Wait protocol I ll wait for an ACK before I send the next frame. If I don t get an ACK in x ms, I ll resend the frame. Used by Bluetooth. Problem: Poor efficiency. At best, only one frame every RTT seconds. Discuss: How would you improve the efficiency of this protocol.

Time Time The link layer: Error detection and correction The Sliding Window Protocol We can allow multiple frames to be unacknowledged. This is the window. Better efficiency: Can allow n frames per RTT. 1 2 3 1 2 3

The link layer: Medium access protocols What is a medium access control (MAC) protocol? A transmission medium can be shared by many devices. If everyone talks at the same time, we have collisions and unintelligible data. MAC: Rules for sharing a common transmission medium.

The link layer: Medium access protocols General strategies for MAC protocols Idea 1: Partition the transmission channel so each host has its share. We briefly saw this Time and Frequency division. Each host has a fixed share (time or frequency band) in the medium. What if a host has nothing to send? Idea 2: Pass a transmit now token to hosts. Like me asking a question in class and selecting one person (from many ) to answer. What if multiple people really want to give an answer? Problem: Transmission channel utilization isn t great.

The link layer: Medium access protocols General strategies for MAC protocols Idea 3: Allow collisions, we ll figure out how to recover data. Allows much higher utilization. Now we have new problems: How to identify when a collision has occurred. How to recover from a collision. This strategy is called Random access MAC or Contention-based MAC. Used by Ethernet, mobile transmission protocols, and others.

The link layer: The ALOHA MAC protocol (1970s) Idea: Send a frame as soon as you need to. If you receive a frame while transmitting, a collision has occurred. Wait for some time and transmit again. Eventually, a frame will get transmitted without collisions. Assumptions: All frames are equally sized. Errors (collisions) are detectable. Problem: For successful transmissions, no other frame from any other host should start within T time before or after you. Sensitive transmission period: 2T for each frame. Scales terribly. (Theoretical maximum throughput for large number of hosts: 18%).

The link layer: The Slotted ALOHA MAC protocol (1970s) Idea: If we allow transmissions only at certain time points, the sensitive period for transmissions reduces. Transmissions on the channel can occur only every T seconds. The channel is divided into slots, but anyone can send in any slot. Sensitive transmission period: T for each frame. If a collision occurs, wait some number of time slots and retransmit. Assumptions: All frames are equally sized. All host clocks are synchronized (!!!) Errors (collisions) are detectable. Sensitive period reduced from 2T to T. Theoretical maximum throughput is doubled to 36%. Still not great.

Announcement No lecture on Thursday. I am traveling. In-class working hours. Kowsar (TA) will be in class if you need help with your assignment or any of the material we ve covered so far. 29

What you should remember from this lecture What is the role of the link layer? Where is it implemented? How is error detection/correction done at the link layer? What are the different approaches? General ideas and what goes into selection of an approach. When is it not violating the end-to-end principle? Why is stop-and-wait less efficient than the sliding window? What function to MAC protocols provide? Why is slotted ALOHA better than ALOHA? 30