Katz, Stoica F04 EE122: Encoding & Framing November 17, 2003.

Slides:



Advertisements
Similar presentations
Physical Layer: Signals, Capacity, and Coding
Advertisements

Physical Layer II: Framing, SONET, SDH, etc.
CSCI-1680 Physical Layer Link Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Chapter 2 Fundamentals of Data and Signals
Physical Layer CHAPTER 3. Announcements and Outline Announcements Credit Suisse – Tomorrow (9/9) Afternoon – Student Lounge 5:30 PM Information Session.
CS 4700 / CS 5700 Network Fundamentals Lecture 5: Physical Layer (The layer for EE majors…) Revised 1/14/13.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Chapter 3 Data and Signals
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
IS250 Spring 2010 Physical Layer IS250 Spring 2010
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
William Stallings Data and Computer Communications 7th Edition (Selected slides used for lectures at Bina Nusantara University) Data, Signal.
Module 3.0: Data Transmission
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CS 164: Slide Set 3: Chapter 2 Direct Link Networks.
Framing and Encoding EECS 122: Lecture 26 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Network Technology CSE3020 Week 2
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 4 Digital Transmission.
Chapter 3 Data and Signals
Chapter 4 Digital Transmission
1 Computer Communication & Networks Lecture 5 Physical Layer: Data & Signals Waleed Ejaz
331: STUDY DATA COMMUNICATIONS AND NETWORKS.  1. Discuss computer networks (5 hrs)  2. Discuss data communications (15 hrs)
1 Physical Layer. 2 Analog vs. Digital  Analog: continuous values over time  Digital: discrete values with sharp change over time.
Review: The application layer. –Network Applications see the network as the abstract provided by the transport layer: Logical full mesh among network end-points.
1-1 Basics of Data Transmission Our Objective is to understand …  Signals, bandwidth, data rate concepts  Transmission impairments  Channel capacity.
Lecture 3-1: Coding and Error Control
1 Ch 6 Long-Distance Communication Carriers, Modulation, and Modems.
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.
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
Computer Communication & Networks Lecture # 05 Physical Layer: Signals & Digital Transmission Nadeem Majeed Choudhary
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
3-2008UP-Copyrights reserved1 ITGD4103 Data Communications and Networks Lecture-11:Data encoding techniques week 12- q-2/ 2008 Dr. Anwar Mousa University.
British Computer Society (BCS)
Physical and Link Layers Brad Karp UCL Computer Science CS 6007/GC15/GA07 23 rd February, 2009.
The Physical Layer Lowest layer in Network Hierarchy. Physical transmission of data. –Various flavors Copper wire, fiber optic, etc... –Physical limits.
Physical Layer PART II. Position of the physical layer.
Data Comm. & Networks Lecture 6 Instructor: Ibrahim Tariq.
CS 4700 / CS 5700 Network Fundamentals
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.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
Physical Layer Issues and Methods Outline Physical Layer Overview Non-Return to Zero Manchester 4B/5B.
Encoding How is information represented?. Way of looking at techniques Data Medium Digital Analog Digital Analog NRZ Manchester Differential Manchester.
CSCI 465 Data Communications and Networks Lecture 8 Martin van Bommel CSCI 465 Data Communications and Networks 1.
Point-to-Point Links: Framing
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 6: Datalink layer problems Slides used.
1 CSCD 433 Network Programming Fall 2013 Lecture 5a Digital Line Coding and other...
Physical Layer Issues and Methods Outline Physical Layer Ethernet Technology Physical Layer Encoding Final Exam Review - ??
Advanced Computer Networks
1 Point-to-Point Links: Encoding Encoding: Section 2.2 (Section 2.1 read on your own)
Signal Encoding Techniques. Digital Data, Digital Signal  Digital signal discrete, discontinuous voltage pulses discrete, discontinuous voltage pulses.
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...
Computer Communication & Networks
Advanced Computer Networks
פרק 2: השכבה הפיזית הרצאה זו מבוססת בעיקר על שתי המצגות הבאות :
CSCI-1680 Physical Layer Link Layer I
CHAPTER 3 Physical Layer.
CHAPTER 3 Physical Layer.
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
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.
EECS 122: EE122: Error Detection and Reliable Transmission
Presentation transcript:

Katz, Stoica F04 EE122: Encoding & Framing November 17, 2003

Katz, Stoica F04 EECS 122: Introduction to Computer Networks Encoding and Framing Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA

Katz, Stoica F04 3 Today’s Lecture: 23 Network (IP) Application Transport Link Physical 2 7, 8, 9 10,11 14, 15, 16 21, ,18 19, 20 24

Katz, Stoica F04 4 Questions  Why are some links faster than others?  What limits the amount of information we can send on a link?  How can we increase the capacity of a link?

Katz, Stoica F04 5 Signals: Analog vs. Digital  Signal: a function s(t) that varies with time (t stands for time)  Analog: varies continuously -Example: voltage representing audio (analog phone call)  Digital: discrete values; varies abruptly -Example: voltage representing 0s an 1s

Katz, Stoica F04 6 Signals: Periodic vs. Aperiodic  Period: repeat over and over again, once per period -Period (T) is the time it takes to make one complete cycle -Frequency (f) is the inverse of period, f = 1/T;measured in hz  Aperiodic: don’t repeat according to any particular pattern T = 1/f Signal strength

Katz, Stoica F04 7 Data vs. Signal signal data communication medium data signal Telephone Analog Modem Digital Analog CODEC Analog Digital Transmitter Digital

Katz, Stoica F04 8 Attenuation  Links become slower with distance because of signal attenuation  Amplifiers and repeaters can help

Katz, Stoica F04 9 Noise  A signal s(t) sent over a link is generally -Distorted by the physical nature of the medium This distortion may be known and reversible at the receiver -Affected by random physical effects Fading Multipath effects -Also interference from other links Wireless Crosstalk  Dealing with noise is what communications engineers do s(t)r(t) n(t) Σ link - noise transmitted signalreceived signal

Katz, Stoica F04 10 Noise Limits the Link Rate  Suppose there were no noise -Then, if send s(t) always receive s(t+Δ) -Take a message of N bits say b 1 b 2 ….b N, and send a pulse of amplitude of size 0.b 1 b 2 ….b N -Can send at an arbitrarily high rate -This is true even if the link distorts the signal but in a known way  In practice the signal always gets distorted in an unpredictable (random) way -Receiver tries to estimate the effects but this lowers the effective rate

Katz, Stoica F04 11 Physical Layer Functions  Functions 1.Encode bit sequence into analog signal 2.Transmit bit sequence on a physical medium (Modulation) 3.Receive analog signal 4.Convert Analog Signal to Bit Sequence Adaptor Signal Adaptor: convert bits into physical signal and physical signal back into bits

Katz, Stoica F04 12 Block Diagram NRZI

Katz, Stoica F04 13 Modulation  The function of transmitting the encoded signal over a link, often by combining it with another (carrier signal) -E.g., Frequency Modulation (FM) Combine the signal with a carrier signal in such a way that the i frequency of the received signal contains the information of the carrier -E.g. Frequency Hopping (OFDM) Signal transmitted over multiple frequencies Sequence of frequencies is pseudo random Bit sequence Modulated signalReceived signalReceived bit sequence

Katz, Stoica F04 14 Outline  Relation between bandwidth and link rate  Fourier transform -Nyquist’s Theorem -Shannon’s Theorem  Encoding  Framing

Katz, Stoica F04 15  Any periodic signal g(t) with period T (=1/f) can be constructed by summing a (possibly infinite) number of sines and cosines  To construct signal g(t) we need to compute the values a 0, a 1, …, b 0, b 1, …, and c ! -Compute coefficients using Euler’s formulae  But it’s an infinite series...  Often the magnitude of the a n ’s and b n ’s get smaller as the frequency (n times 2  f ) gets higher.  Key point: a “reasonable reconstruction” can be often be made from just the first few terms (harmonics) -Tough the more harmonics the better the reconstruction… Fourier Transform

Katz, Stoica F04 16 Fourier Transform: Example sin(2 πf t) + 1/3 sin(6 πf t) = g 3 (t) Note: f = 1/T

Katz, Stoica F04 17 Bandwidth & Data Rate  Physical media attenuate (reduce) different harmonics at different amounts  After a certain point, no harmonics get through.  Bandwidth: the range of frequencies that can get through the link  Example: -Voice grade telephone line 300Hz – 3300Hz -The bandwidth is 3000Hz  Data rate: highest rate at which hardware change signal

Katz, Stoica F04 18 Outline  Signal study -Fourier transform  Nyquist’s Theorem -Shannon’s Theorem  Encoding  Framing

Katz, Stoica F04 19  Establish the connection between data rate and bandwidth (actually the highest frequency) in the absence of noise -Developed in the context of analog to digital conversion (ACDs)  Say how often one needs to sample an analog signal to reproduce it faithfully  Suppose signal s(t) has highest frequency f max -Assume B = f max, i.e., lowest frequency is 0  Then, if T≤ 1/(2B) then it is possible to reconstruct s(t) correctly  Niquist’s Theorem: Data rate (bits/sec) <= 2*B (hz) Nyquist’s Theorem (aka Nyquist’s Limit)

Katz, Stoica F04 20 Why Double the Frequency?  Assume a sine signal, then -We need two samples in each period to identify sine function -More samples won’t help

Katz, Stoica F04 21 Nyguist’s Theorem Revisited  If signal has V distinct levels, then Data rate <= 2*B*log 2 V -V distinct values can be used to encode log 2 (V) bits -Bi-level encoding V = 2  Data rate <= 2*B -Example of achieving 2*B with bi-level encoding  Can you do better than Nyquist’s limit? -Yes, if clocks are synchronized sender and receiver, we only need one sample per period -This is because the synchronized starting sample counts as one of the two points 0 V 5 V 1/B 1/(2B)

Katz, Stoica F04 22 Outline  Signal study -Fourier transform -Nyquist’s Theorem  Shannon’s Theorem  Encoding  Framing

Katz, Stoica F04 23 Shannon Theorem  Establish the connection between bandwidth and data rate in the presence of noise  Noisy channel -Consider ratio of signal power to noise power. -Consider noise to be super-imposed signal -Decibel (dB) = 10 log 10 (S/N) -S/N of 10 = 10 dB -S/N of 100 = 20 dB -S/N of 1000 = 30 dB

Katz, Stoica F04 24 Shannon Theorem (cont’d)  Data rate in the presence of S/N is bounded as follows Data rate <= B log 2 (1 + S/N)  Example: -Voice grade line: S/N = 1000, B=3000, C=30Kbps -Technology has improved S/N and B to yield higher speeds such as 56Kb/s  Higher bandwidth  higher rate; Intuition: -Signal has more space to “hide” from noise -Noise gets “diluted” across frequency space

Katz, Stoica F04 25 Outline  Signal study -Fourier transform -Nyquist’s Theorem -Shannon’s Theorem  Encoding  Framing

Katz, Stoica F04 26 Encoding  Specify how bits are represented in the analog signal -This service is provided by the physical layer  Challenges: achieve: -Efficiency – ideally, bit rate = clock rate -Robust – avoid de-synchronization between sender and receiver when there is a large sequence of 1’s or 0’s

Katz, Stoica F04 27 Assumptions  We use two discrete signals, high and low, to encode 0 and 1  The transmission is synchronous, i.e., there is a clock used to sample the signal -In general, the duration of one bit is equal to one or two clock ticks  If the amplitude and duration of the signals is large enough, the receiver can do a reasonable job of looking at the distorted signal and estimating what was sent.

Katz, Stoica F04 28 Non-Return to Zero (NRZ)  1  high signal; 0  low signal NRZ (non-return to zero) Clock  Disadvantages: when there is a long sequence of 1’s or 0’s -Sensitive to clock skew, i.e., difficult to do clock recovery -Difficult to interpret 0’s and 1’s (baseline wander)

Katz, Stoica F04 29 Non-Return to Zero Inverted (NRZI)  1  make transition; 0  stay at the same level  Solve previous problems for long sequences of 1’s, but not for 0’s Clock NRZI (non-return to zero intverted)

Katz, Stoica F04 30 Manchester  1  high-to-low transition; 0  low-to-high transition  Addresses clock recovery and baseline wander problems  Disadvantage: needs a clock that is twice as fast as the transmission rate -Efficiency of 50% Clock Manchester

Katz, Stoica F bit/5-bit (100Mb/s Ethernet)  Goal: address inefficiency of Manchester encoding, while avoiding long periods of low signals  Solution: -Use 5 bits to encode every sequence of four bits such that no 5 bit code has more than one leading 0 and two trailing 0’s -Use NRZI to encode the 5 bit codes -Efficiency is 80% bit 5-bit

Katz, Stoica F04 32 Outline  Signal study -Fourier transform -Nyquist’s Theorem -Shannon’s Theorem  Encoding  Framing

Katz, Stoica F04 33 Framing  Specify how blocks of data are transmitted between two nodes connected on the same physical media -This service is provided by the data link layer  Challenges -Decide when a frame starts/ends -If use special delimiters, differentiate between the true frame delimiters and delimiters appearing in the payload data

Katz, Stoica F04 34 Byte-Oriented Protocols: Sentinel Approach  STX – start of text  ETX – end of text  Problem: what if ETX appears in the data portion of the frame?  Solution -If ETX appears in the data, introduce a special character DLE (Data Link Escape) before it -If DLE appears in the text, introduce another DLE character before it  Protocol examples -BISYNC, PPP, DDCMP Text (Data)STXETX 8 8

Katz, Stoica F04 35 Byte-Oriented Protocols: Byte Counting Approach  Sender: insert the length of the data (in bytes) at the beginning of the frame, i.e., in the frame header  Receiver: extract this length and decrement it every time a byte is read. When this counter becomes zero, we are done

Katz, Stoica F04 36 Bit-Oriented Protocols  Both start and end sequence can be the same -E.g., in HDLC (High-level Data Link Protocol)  Sender: in data portion inserts a 0 after five consecutive 1s  Receiver: when it sees five 1s makes decision on the next two bits -If next bit 0 (this is a stuffed bit), remove it -If next bit 1, look at the next bit If 0 this is end-of-frame (receiver has seen ) If 1 this is an error, discard the frame (receiver has seen ) Text (Data) Start sequence 8 8 End sequence

Katz, Stoica F04 37 Clock-Based Framing (SONET)  SONET (Synchronous Optical NETwork)  Developed to transmit data over optical links -Example: SONET ST-1: Mbps -Many streams on one link  SONET maintains clock synchronization across several adjacent links to form a path -This makes the format and scheme very complicated

Katz, Stoica F04 38 SONET Multiplexing  STS-3c has the payloads of three STS-1’s byte-wise interleaved.  STS-3 is a SONET link w/o multiplexing  For STS-N, frame size is always 125 microseconds -STS-1 frame is 810 bytes -STS-3 frame is 810x3 =2430 bytes STS-1FH STS-1FH STS-1FH STS-3cFH

Katz, Stoica F04 39 STS-1 Frame  First two bytes of each frame contain a special bit pattern that allows to determine where the frame starts  No bit-stuffing is used  Receiver looks for the special bit pattern every 810 bytes -Size of frame = 9x90 = 810 bytes 90 columns 9 rows Data (payload) overhead SONET STS-1 Frame

Katz, Stoica F04 40 Clock-Based Framing (SONET)  Details: -Overhead bytes are encoded using NRZ -To avoid long sequences of 0’s or 1’s the payload is XOR-ed with a special 127-bit pattern with many transitions from 1 to 0

Katz, Stoica F04 41 What do you need to know?  Concept of bandwidth and data rate  Nyquist’s Theorem  Shannon’s Theorem  Encoding -Understand (not memorize) NRZ, NRZI, Manchester, 4/5 bit  Framing - Understand framing for bit/byte oriented protocols and clock based framing