Physical and Link Layers Brad Karp UCL Computer Science CS 6007/GC15/GA07 23 rd February, 2009.

Slides:



Advertisements
Similar presentations
CSCI-1680 Physical Layer Link Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Primitives for Achieving Reliability 3035/GZ01 Networked Systems Kyle Jamieson Department of Computer Science University College London.
COS 461 Fall 1997 COS 461: Networks and Distributed Computing u Prof. Ed Felten u u.
Lecture 26 Physical Layer Ch 4: Digital Transmission
1 Computer Communication & Networks Lecture 6 Physical Layer: Digital Transmission Waleed Ejaz
Reliability & Channel Coding
Framing and Stuffing Advanced Computer Networks. Framing & Stuffing Outline  Synchronous vs Asynchronous Transmissions  Asynchronous Character Transmissions.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 ITC242 – Introduction to Data Communications Week 10 Topic 16 Data link control.
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
Framing and Encoding EECS 122: Lecture 26 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Katz, Stoica F04 EE122: Encoding & Framing November 17, 2003.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
Review: The application layer. –Network Applications see the network as the abstract provided by the transport layer: Logical full mesh among network end-points.
Winter 2008CS244a Handout 121 CS244a: An Introduction to Computer Networks Handout 12: Physical Layer Sending 1’s and 0’s, Capacity and Clocking Nick McKeown.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
EE 122: Encoding And Framing Ion Stoica September 9, 2002.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Modulation, Multiplexing, & Public Switched Telephone.
Data and Computer Communications. The Data Link Layer.
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Computer Architecture Lecture 30 Fasih ur Rehman.
Copyright 2002, S.D. Personick. All Rights Reserved. Telecommunications Networking I Topic 6 Point-To-Point Digital Communications Dr. Stewart D. Personick.
J.Tiberghien - VUB09-07-K.Steenhaut & J.Tiberghien - VUB 1 Telecommunications Concepts Chapter 1.4 Communications Theory.
Computer Communication & Networks Lecture # 05 Physical Layer: Signals & Digital Transmission Nadeem Majeed Choudhary
02 – Performance Basics 1CS Computer Networks.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Physical Layer – How bits are sent. Goal Physical layer design goal: send out bits as fast as possible with acceptable low error ratio Goal of this lecture:
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Advanced Computer Networks Chapter 2: Direct Link Networks.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Postacademic Interuniversity Course in Information Technology – Module C1p1 Chapter 4 Communications, Theory and Media.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM.
Shannon’s Theorem Nyquist Theorem Modulations Multiplexing
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 6: Datalink layer problems Slides used.
Physical Layer Issues and Methods Outline Physical Layer Ethernet Technology Physical Layer Encoding Final Exam Review - ??
Advanced Computer Networks
Building A Network: Cost Effective Resource Sharing
Lect-10-2: Physical Layer Computer Networks : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking.
1587: COMMUNICATION SYSTEMS 1 Digital Signals, modulation and noise Dr. George Loukas University of Greenwich,
1 CSCD 433 Network Programming Fall 2016 Lecture 4 Digital Line Coding and other...
Data Link Layer.
Part III. Data Link Layer
Advanced Computer Networks
Communication Networks: Technology & Protocols
Data link layer (LLC).
CSCI-1680 Physical Layer Link Layer I
Reliable Transport I: Concepts
CS412 Introduction to Computer Networking & Telecommunication
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
DATA COMMUNICATION Lecture-33.
Building A Network: Cost Effective Resource Sharing
Fundamentals of Computer Networks
CSCI-1680 Physical Layer Link Layer I
Home work project #1 Develop and fully debug your program on the Cushing 208 lab. Machines - planet lab machines may not have good development environment.
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Physical Layer – How bits are sent
Presentation transcript:

Physical and Link Layers Brad Karp UCL Computer Science CS 6007/GC15/GA07 23 rd February, 2009

2 Outline Review of remaining syllabus –Next coursework –Readings Hand out End-to-End Arguments in System Design, reading for discussion on Wednesday Today’s topic: Physical and Link Layers

3 Network Protocol Layering Each layer hides complexity of lower layer(s) Layering enforces modularity 7 OSI layers 3 S&K layers: –End-to-end layer: top 4 OSI layers –Network layer: OSI network layer –Link layer: bottom 2 OSI layers

4 Link Layer: Overview Bottom-most layer Invocation: “send these bytes on this link” Link-specific headers and trailers may be added Problems to solve: –Physical transmission –Framing bits –Framing packets –Detecting transmission errors –Multiplexing link OSI Physical Layer OSI Data Link Layer

5 Digital Data, Analog World Transmitting bit on-chip: –Clock tick 1: send output –Clock tick 2: read input (settled between ticks) No synchronized clock once sender and receiver not on same circuit board! Straw-man scheme: ready/acknowledge –A changes “ready” to signal B to read –B changes “acknowledge” to notify A read complete –Time to send one bit: one round-trip time (RTT) –Bit-rate: 1/RTT –N parallel data lines: bit-rate N/RTT –Inappropriate for use when RTT long!

6 Serial Transmission Don’t wait for acknowledgement per bit! Bits deteriorate when sent over wire (or radio): attenuation, noise, capacitance… When should receiver sample the signal?

7 Clock Recovery: Phase Locking Assume sender and receiver both know transmit rate –Need to synchronize rate and phase Receiver uses voltage-controlled oscillator (VCO) –Multiply VCO output by incoming signal’s voltage, filter –Send result back to adjust VCO Result: phase-locked loop (PLL), recovers rate and phase PLL relies on data transitions (0  1, 1  0) to synchronize Will there always be transitions?

8 Clock Recovery: Manchester Encoding A type of phase encoding Every data bit contains a level transition Each data bit encoded as two bits: –0: 0, 1 –1: 1, 0 Differential Manchester Encoding: –0: transition at start of bit period –1: no transition at start of bit period –Under noise, more robust than comparing to threshold –Robust against polarity reversal at sender or receiver! Both schemes halve data rate

9 Fundamentals: Bandwidth, Noise and Capacity Bandwidth limits on a physical, analog channel: –e.g., chromatic dispersion (optical fiber) –e.g., capacitance (accumulation of charge on wire) –These limit rate at which receiver can detect changes in signal value Shannon’s Theorem: a fundamental limit to channel capacity over given bandwidth: C = B log 2 (1+S/N) C = capacity (bits/s), B = bandwidth (Hz), S/N = signal/noise power ratio (dB) Example: 28.8 Kbps modem –2.4 KHz bandwidth on telephone line –28 Kbps modem must send 12 bits / Hz –S/N ratio must be at least 2 12, or 36 dB; typical telephone line

10 Bit Errors Bit-Error Rate (BER): fraction of sent bits received incorrectly BER models independent, randomly distributed errors In reality, errors often bursty –unpredictable, so hard to filter –corrupt contiguous bits during noise burst –greater bit rate  more corrupted bits / burst Typical link BERs: 10 -6, 10 -7, Are those error rates acceptable for applications?

11 Framing (OSI Data Link Layer) Network layer presents packets for sending on link as frames How to demarcate frame boundaries, given only a bit-oriented physical layer? Reserve a sequence of bits as “end-of- frame” marker –e.g., at end of frame, sender sends “000000”; receiver ends frame upon receipt of “000000” –What if user sends “000000”?

12 Framing: Bit Stuffing Goal: reserve end-of-frame marker bit sequence without limiting what upper layer may send Suppose end-of-frame marker “000000” Sender: –count consecutive “0” bits in input bitstream –after five consecutive “0” bits, insert “1” in output bitstream Receiver: –count consecutive “0” bits in received bitstream –after five consecutive “0” bits, consider next bit: if 0, end frame if 1, discard the 1 What if stuffed “1” received as “0”?

13 Detecting and Reacting to Frame Errors 1 st step: detect errored frame at receiver –sender includes error detection code, derived from frame data, in frame (e.g., parity, CRC) –receiver computes same code using received data; compares with received code 2 nd step: respond to detected errors –Sender could include error correction code, allowing receiver to correct limited number of errored bits –Sender could re-send errored frame; requires link- layer acknowledgements from receiver –Receiver could silently discard errored frame; leave to higher layers to retransmit (or not)

14 BER and Frame Errors Suppose –Pr[bit corrupted] = p –frame length in bits = L then –Pr[bit received correctly] = (1 – p) –Pr[frame received correctly] = (1 – p) L –Pr[frame contains one or more errors] = 1 – (1 – p) L e.g., –BER = –L = 1500 bytes = bits –FER = 1 – (1 – ) = 1.19% Unit of retransmission is frame, not bit –Shorten frames (header overhead vs. retransmission overhead) –Use error correction in physical or link layers

15 Link Multiplexing Link may be shared by multiple network protocols (e.g., IP and AppleTalk on same Ethernet) Sender must specify protocol ID in frame Receiver uses protocol ID to look up code responsible for processing received frame Many protocols at many layers are multiplexed in this way; (IP by UDP and TCP; TCP by HTTP, SMTP, &c.)