QUIZ : oversubscription

Similar documents
Wireless Communications

Single Error Correcting Codes (SECC) 6.02 Spring 2011 Lecture #9. Checking the parity. Using the Syndrome to Correct Errors

Detecting and Correcting Bit Errors. COS 463: Wireless Networks Lecture 8 Kyle Jamieson

Digital Transmission using SECC Spring 2010 Lecture #7. (n,k,d) Systematic Block Codes. How many parity bits to use?

Lecture 3 Data Link Layer - Digital Data Communication Techniques

Data and Computer Communications

Digital Data Communication Techniques

Lecture 3: Error Handling

Physical-Layer Services and Systems

Layering and Controlling Errors

Encoding and Framing

Encoding and Framing. Questions. Signals: Analog vs. Digital. Signals: Periodic vs. Aperiodic. Attenuation. Data vs. Signal

Lecture 6: Reliable Transmission"

Error Detection and Correction: Parity Check Code; Bounds Based on Hamming Distance

ECE 476/ECE 501C/CS Wireless Communication Systems Winter Lecture 9: Error Control Coding

EECS 122: Introduction to Computer Networks Encoding and Framing. Questions

Error Detection and Correction

Chapter 10 Error Detection and Correction 10.1

Lecture 3: Modulation & Clock Recovery. CSE 123: Computer Networks Stefan Savage

An Efficient Forward Error Correction Scheme for Wireless Sensor Network

Sirindhorn International Institute of Technology Thammasat University

6.004 Computation Structures Spring 2009

Department of Computer Science and Engineering. CSE 3213: Communication Networks (Fall 2015) Instructor: N. Vlajic Date: Dec 13, 2015

Simple Algorithm in (older) Selection Diversity. Receiver Diversity Can we Do Better? Receiver Diversity Optimization.

Lecture 3: Modulation & Clock Recovery. CSE 123: Computer Networks Alex C. Snoeren

Error Correction with Hamming Codes

Outline. EEC-484/584 Computer Networks. Homework #1. Homework #1. Lecture 8. Wenbing Zhao Homework #1 Review

Department of Computer Science and Engineering. CSE 3213: Computer Networks I (Fall 2009) Instructor: N. Vlajic Date: Dec 11, 2009.

Intuitive Guide to Principles of Communications By Charan Langton Coding Concepts and Block Coding

CSCI-1680 Physical Layer Rodrigo Fonseca

Datacommunication I. Layers of the OSI-model. Lecture 3. signal encoding, error detection/correction

BSc (Hons) Computer Science with Network Security BEng (Hons) Electronic Engineering

Revision of Lecture Eleven

CSC344 Wireless and Mobile Computing. Department of Computer Science COMSATS Institute of Information Technology

Lec 19 Error and Loss Control I: FEC

Lecture 4: Wireless Physical Layer: Channel Coding. Mythili Vutukuru CS 653 Spring 2014 Jan 16, Thursday

HY448 Sample Problems

Error Control Coding. Aaron Gulliver Dept. of Electrical and Computer Engineering University of Victoria

Page 1. Outline. Basic Idea. Hamming Distance. Hamming Distance Visual: HD=2

The idea of similarity is through the Hamming

Wireless Communication

Introduc)on to Computer Networks

Chapter 10 Error Detection and Correction

EECS 473 Advanced Embedded Systems. Lecture 13 Start on Wireless

Computer Networks. Week 03 Founda(on Communica(on Concepts. College of Information Science and Engineering Ritsumeikan University

COSC 3213: Communication Networks Chapter 5: Handout #6

Increasing Broadcast Reliability for Vehicular Ad Hoc Networks. Nathan Balon and Jinhua Guo University of Michigan - Dearborn

BSc (Hons) Computer Science with Network Security, BEng (Hons) Electronic Engineering. Cohorts: BCNS/17A/FT & BEE/16B/FT

Digital Television Lecture 5

CSE 461: Bits and Bandwidth. Next Topic

Local Area Networks NETW 901

The ternary alphabet is used by alternate mark inversion modulation; successive ones in data are represented by alternating ±1.

ECE 5325/6325: Wireless Communication Systems Lecture Notes, Spring 2013

Error Protection: Detection and Correction

Lecture 23: Media Access Control. CSE 123: Computer Networks Alex C. Snoeren

olsr.org 'Optimized Link State Routing' and beyond December 28th, 2005 Elektra

The Capability of Error Correction for Burst-noise Channels Using Error Estimating Code

Lecture 8: Media Access Control. CSE 123: Computer Networks Stefan Savage

Basics of Error Correcting Codes

Fine-grained Channel Access in Wireless LAN. Cristian Petrescu Arvind Jadoo UCL Computer Science 20 th March 2012

ECE 5325/6325: Wireless Communication Systems Lecture Notes, Spring 2013

Multiple Downstream Profile Implications. Ed Boyd, Broadcom

Lecture 8: Media Access Control

Lecture 17 Components Principles of Error Control Borivoje Nikolic March 16, 2004.

Digital Communication Systems ECS 452

By Ryan Winfield Woodings and Mark Gerrior, Cypress Semiconductor

Module 3: Physical Layer

A Wireless Communication System using Multicasting with an Acknowledgement Mark

DIGITAL DATA COMMUNICATION TECHNIQUES

Wireless Communication Systems: Implementation perspective

Rep. ITU-R BO REPORT ITU-R BO SATELLITE-BROADCASTING SYSTEMS OF INTEGRATED SERVICES DIGITAL BROADCASTING

ECE Advanced Communication Theory, Spring 2007 Midterm Exam Monday, April 23rd, 6:00-9:00pm, ELAB 325

Lab/Project Error Control Coding using LDPC Codes and HARQ

Transmission Principles

Representation of Information. Transmission Principles. Agenda. Transmission of Information

Wireless Communication in Embedded System. Prof. Prabhat Ranjan

General Class Digital Modes Presentation

Tracking, Telemetry and Command

Spread Spectrum. Chapter 18. FHSS Frequency Hopping Spread Spectrum DSSS Direct Sequence Spread Spectrum DSSS using CDMA Code Division Multiple Access

6. FUNDAMENTALS OF CHANNEL CODER

MULTIPLE CHOICE QUESTIONS

(Refer Slide Time: 2:23)

Burst Error Correction Method Based on Arithmetic Weighted Checksums

Lower Layers PART1: IEEE and the ZOLERTIA Z1 Radio

Solutions to Information Theory Exercise Problems 5 8

DEEJAM: Defeating Energy-Efficient Jamming in IEEE based Wireless Networks

Wireless Sensor Networks

Channel Coding/Decoding. Hamming Method

EECS 380: Wireless Technologies Week 7-8

EE 435/535: Error Correcting Codes Project 1, Fall 2009: Extended Hamming Code. 1 Introduction. 2 Extended Hamming Code: Encoding. 1.

Lecture on Sensor Networks

Data and Computer Communications. Tenth Edition by William Stallings

CAN for time-triggered systems

Understanding and Mitigating the Impact of Interference on Networks. By Gulzar Ahmad Sanjay Bhatt Morteza Kheirkhah Adam Kral Jannik Sundø

16.36 Communication Systems Engineering

T325 Summary T305 T325 B BLOCK 3 4 PART III T325. Session 11 Block III Part 3 Access & Modulation. Dr. Saatchi, Seyed Mohsen.

EECS 473 Advanced Embedded Systems. Lecture 14 Wireless in the real world

Wireless Intro : Computer Networking. Wireless Challenges. Overview

CSE 123: Computer Networks Alex C. Snoeren. Project 1 out Today, due 10/26!

Outline. EECS 122, Lecture 6. Error Control Overview Where are Codes Used? Error Control Overview. Error Control Strategies ARQ versus FEC

Transcription:

QUIZ : oversubscription A telco provider sells 5 Mpbs DSL service to 50 customers in a neighborhood. The DSLAM connects to the central office via one T3 and two T1 lines. What is the oversubscription factor? (Ignore overhead)

QUIZ: T1 Prove that the T1 carrier has a total (gross) data rate of 1.544 Mbps

Solution Prove that the T1 carrier has a total data rate of 1.544 Mbps (8 24 + 1) 2 4000 = 1.544 Mbps

QUIZ: OC-1 Prove that the OC1 carrier has a total (gross) data rate of 51.84 Mbps

Solution Prove that the OC-1 carrier has a total data rate of 51.84 Mbps (9 90) 8 2 4000 = 51.84 Mbps

Chapter 3 The Data Link Layer (L2)

The Data Link Layer (L2) fundamental characteristics A. Whereas L1 is concerned with Tx/Rx of individual bits, L2 works with multi-bit frames. B. Transmission is over one wirelike channel, i.e. a channel which delivers the bits in the same order in which they are sent. As a consequence, L2 does not have to provide any reordering function.

Functions of the Data Link Layer Provide service interface to L3 (Network) Deal w/transmission errors on L1 (Physical) L2 hides the errors that occur in the real transmission, so L3 and higher don t have to worry about them Regulate the flow of data Slow receivers should not be swamped by fast senders

L2 Design Issues Services Provided to L3 (Network) Framing Error Control Flow Control Bit reordering

Services Provided by L2 to L3 (a) Virtual communication. (b) Actual communication.

Services Provided by L2 to L3 (a) Unacknowledged connectionless: Used when error rate is low (e.g. LAN Ethernet), or when there are stringent timing requirements (e.g. VoIP) Recovery is left to higher layers Might be bad b/c one L3 pkt. can be mapped to multiple L2 frames. L3 does not know about it, so it is wasting bandwidth by requiring entire pkt. to be retransmitted. Example:

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? 1. Calculate the probability p that one send is successful:

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? 1. Calculate the probability p that one send is successful: p = 0.8 0.8 0.8 = 0.8 10 = 0.107

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? 2. What are the possible numbers of sends? P(1 send ) =? P(2 sends) =? P(n sends) =?

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? Conclusion: GEOMETRIC distribution! P(X = k) = (1-p) k-1 p Plot source: https://en.wikipedia.org/wiki/geometric_distribution

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? GEOMETRIC distribution: P(X = k) = (1-p) k-1 p What is the expected value (a.k.a. mean, average) of a geometric distribution?

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? GEOMETRIC distribution: P(X = k) = (1-p) k-1 p Expected value (a.k.a. mean, average): weight (multiply) each value of X by the corresponding probability: E[X] = 1 P(X=1) + 2 P(X=2) + k P(X=k) +

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? GEOMETRIC distribution: P(X = k) = (1-p) k-1 p E[X] = 1/p

Problem 1/251 A L3 pkt. is split into 10 frames, each of which has an 80% chance of arriving undamaged. L2 does not do any error control. How many times on average will L3 send the pkt. before it makes it? GEOMETRIC distribution: P(X = k) = (1-p) k-1 p E[X] = 1/p E[X] = 1/0.107 = 9.32 times (What does it mean?)

QUIZ For a GEOMETRIC distribution, write the formulas for: P(X=k) E[X]

QUIZ for individual work: Designing L2 fragmentation The Network layer of Host 1 receives a 512-Byte packet every 20 ms, to be sent to Host 2. The Data Link layer fragments each packet into k frames for transmission, and sends out the frames using unacknowledged, connectionless service over a T1 link. This way, error correction is left entirely to Network, who needs to retransmit entire pkts. The probability for one frame to make it to Host 2 w/o errors is p=0.85 (85%). What is the maximum fragmentation that can be used? (Ignore all overhead, e.g. headers, trailers) Hint: What is the probability that an entire packet be transmitted without errors?

Services Provided by L2 to L3 (b)acknowledged connectionless: Each frame individually ACK-ed, timers, retransmissions Used when error rate is high (e.g. wireless 802.11 WiFi) What if the ACK frame itself gets lost? The ghost frame problem.

Services Provided by L2 to L3 (c)acknowledged and connection-oriented: Used in long, error-prone links (e.g. satellite) Connection established, frames are numbered Eliminates the ghost packet problem Makes an unreliable (error-prone) L1 look reliable to L3. We say that L3 sees a reliable bit-stream at L1. (d) Unacknowledged connection-oriented??

QUIZ Which Data Link type of service should we choose in the 4 cases below? Low error probability High error probability Short propagation delay Long propagation delay

QUIZ Which Data Link type of service should we choose in the 4 cases below? Short propagation delay Long propagation delay Low error probability Unacknowledged connectionless Unacknowledged connectionless High error probability Acknowledged connectionless Acknowledged connection-oriented

L2 framing Stream of bits in L1 (PHYSICAL) Relationship between packets, frames and bits. Unlike packets, frames usually have a strict max. length (for hardware optimization).

Why framing? To control errors and flow Unfortunately, framing introduces its own problem: How does the receiver recognize the beginning and end of a frame?

Framing 5 methods for recognizing frames: Fixed timing (frame-gap-frame-gap ) hard to sync. Character count counter can be garbled (next slide) Flag bytes w/byte stuffing Flag bytes w/bit stuffing L1 (PHY layer) coding violations e.g. 1=hi-lo, 0=lohi, use hi-hi or lo-lo as flags Needs redundancy on L1 Goes against idea of modularity!

Framing with byte count A character stream. (a) Without errors. (b) With one error.

Framing with Flag Bytes (e.g. PPP) What to do if the flag itself is inside the data stream? Byte stuffing (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing.

Extra-credit:

Framing with Flag Bytes Problem: Requires 8-bit characters, otherwise the FLAG boundaries cannot be detected! What do we do if we want Unicode (16 bit)? Solution: Have the FLAG byte contain a pattern of bits not encountered anywhere else in the data! 0111 1110 So what if the pattern does occur in the data?

Framing with Bit Stuffing (e.g. HDLC) Flag is 0111 1110 Bit stuffing (a) The original data. (b) The data as they are transmitted on the line. (c) The data as they are stored in receiver s memory after de-stuffing.

QUIZ Problem 2/252 The following character encoding is used in a L2 protocol: A: 0100 0111 B: 1110 0011 FLAG:0111 1110 ESC: 1110 0000 The payload (actual data) in the frame is: A B ESC FLAG Show the frame for each of these framing methods: Byte count Flag bytes w/byte stuffing Flag bytes w/bit stuffing

Framing - conclusion Most existing L2 protocols use a combination of methods for reliability, e.g. byte stuffing and count field. EOL1

QUIZ For a GEOMETRIC distribution, write the formulas for: P(X=k) E[X]

QUIZ In a certain dry area in the world, the probability for a rainy day is 0.01. How many days do we have to wait on the average for the next rainy day? Hint: Use a Geometric distribution!

Flow Control Does not need negotiation Needs negotiation Feedback-based: receiver sends back explicit messages: Send me more Stop sending Rate-based: Mostly used in higher layers (e.g. L4 TCP) Modern Ethernet cards can switch among 10/100/1000 Mbps

3.2 Error Control Error-Correcting Codes Error-Detecting Codes

Error Control Simple model for errors: bits are affected independently. Closer to real-life: Errors come in bursts Good: at the same average error rate, less frames are affected Bad: Adjacent errors are harder to detect/correct than isolated ones. An entire frame may disappear! Mathematical treatment of errors probability theory

Error Control Mathematical treatment of errors probability theory Three basic rules: The probabilities of complementary events add up to 1 The probabilities of mutually exclusive events add up The probabilities of independent events multiply Example on p.203: 1000 bits in a frame, BER = 10-3, errors independent What is the probability that a frame has errors?

Error Control Three basic rules: The probabilities of complementary events add up to 1 The probabilities of mutually exclusive events add up The probabilities of independent events multiply 1000 bits in a frame, BER = 10-3, errors independent P[no errors in a given frame] =? P[at least 1 error in a given frame] =? Out of many frames (say 10, 000), how many contain errors on average?

Error Control Three basic rules: The probabilities of complementary events add up to 1 The probabilities of mutually exclusive events add up The probabilities of independent events multiply 1000 bits in a frame, BER = 10-3, errors independent Instructive mistake: # of bits x BER Result:?? How can we tell this method is wrong?

QUIZ There are 1000 bits in a frame Errors are independent, with BER = 10-3 Calculate the following: P[exactly one errror in a given frame] =? P[exactly two errrors in a given frame] =? Out of many frames (say 10, 000), what fraction contain: Exactly one error? Exactly two errors?

Principles of Error Detection and Correction Any mechanism for detecting or correcting errors needs redundancy, a.k.a. overhead m data bits + r redundant bits = n-bit codeword m + r = n

codeword m + r = n m < n 2 m < 2 n Hamming distance between two codewords = # of different bits Cubes and hyper-cubes

Let s apply probability to codewords! Assume: Independent errors BER = 10-3 The codeword 000 was transmitted Calculate: P[001 is received] P[010 is received] P[100 is received] P[011 is received] P[111 is received] Conclusion (in terms of Hamming distance):

Hamming distance of a code = minimum of the Hamming distance between all pairs of legal codewords. What is the Hamming distance of the code below? What is the maximum # of errors that can be detected with the code below? Corrected?

Conclusion: To detect d errors, we need a code with Hamming distance at least d+1. Example: Select the codewords that have even-parity-bit. How many data bits does a codeword have? What is the Hamming distance of this code? How many errors can be detected?

handout

Conclusion: To detect d errors, we need a code with Hamming distance at least d+1. QUIZ: Select the codewords that have odd-parity-bit. How many data bits does a codeword have? What is the Hamming distance of this code? How many errors can be detected?

Conclusion: To detect d errors, we need a code with Hamming distance at least d+1. QUIZ: Select the codewords that are palindromes. How many data bits does a codeword have? What is the Hamming distance of this code? How many errors can be detected?

Error-Correcting Codes a.k.a. forward error correction To detect d errors, a code with Hamming distance d+1 (or higher) is needed. New result: To correct c errors, a code with Hamming distance 2 c + 1 (or higher) is needed.

Why 2 c + 1? Basins of attraction

Each of 2 m legal messages needs n+1 codewords assigned Why n+1? B/c each good code needs n insulating neighbors at Hamming distance 1 (Basin of attraction). In the image you have an example for n = 7.

3.2.2 Error-Correcting Codes Mathematical treatment of prev. slide: To correct single errors, each of 2 m legal messages needs n+1 codewords assigned (n+1) 2 m 2 n (m+r+1) 2 n-m (m+r+1) 2 r Take log on both sides log 2 (m+r+1) r log 2 (m) r We say that r has a lower bound which is logarithmic in m In asymptotic notation: r is W(log 2 m)

r is W(log 2 m) The Hamming code is a method of attaining this bound: Number the n bits in the codeword starting at 1. The power-of-two bits (1, 2, 4, 8 ) are check bits, the rest are data. A data bit in position k contributes to the check bits corresponding to the 1s in the binary expansion of k Usually the check bits implement even parity At the receiver: Check the parity of all check bits. If all parities are OK (even), conclude that no errors have ocurred. If the parities of some check bits are not OK, add up the values k of the incorrect check bits. This is the position of the bit in error. Correct that bit, i.e. flip it!

Hamming code redundant bits Initial message (11 information bits): 0 1 0 1 0 0 1 0 1 0 1 Make room for redundant bits in positions that are powers of 2: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 0 1 0 0 1 0 1 0 1 r 1 r 2 r 4 r 8

How to calculate the values of the redundant bits Message with check bits 1 2 3 4 567 8 9.15 inserted in power-of-two positions: r 1 r 2 0 r 4 101 r 8 0010101 Set of bits associated with r 1 : r 1 r 2 0 r 4 101 r 8 0010101 To make the set even, r 1 is made 1: 1 r 2 0 r 4 101 r 8 0010101 Set of bits associated with r 2 : 1 r 2 0 r 4 101 r 8 0010101 To make the set even, r 2 is made 1: 1 1 0 r 4 101 r 8 0010101 Set of bits associated with r 4 : 1 1 0 r 4 101 r 8 0010101 To make the set even, r 4 is made 0: 1 1 0 0 101 r 8 0010101 Set of bits associated with r 8 : 1 1 0 0 101 r 8 0010101 To make the set even, r 8 is made 1: 1 1 0 0 101 1 0010101

QUIZ Hamming code The 12 data bits to be coded are: 1110 1010 0100 Calculate the codeword Hint: Start by inserting the redundant bits

Hamming code extra-credit question

Hamming code error correction Message with check bits 1 2 3 4 56 7 8 9. 15 inserted in power-of-two positions: r 1 r 2 0 r 4 101 r 8 0010101 Codeword transmitted: 1 1 0 0 101 1 0010101 Assume that bit 13 is corrupted in transmission, so the receiver gets: 1 1 0 0 101 0 0010001 Perform the parity calculations for all check bits Which check bits have wrong parity? r 8, r 4 and r 1 8+4+0+1 = 13. What happens if the corrupted bit is one of the check bits?

Hamming code lingo: What is the syndrome? Perform the parity calculations for all check bits Which check bits have wrong parity? r 8, r 4 and r 1 8+4+1 = 13. Parity bit r 8 r 4 r 2 r 1 Has error? yes yes no yes Syndrome 1 1 0 1 If we convert the syndrome to base 10 we have 8+4+0+1 = 13.

Hamming code error correction Message with check bits 1 2 3 4 56 7 8 9. 15 inserted in power-of-two positions: r 1 r 2 0 r 4 101 r 8 0010101 Codeword transmitted: 1 1 0 0 101 1 0010101 Assume that bit 13 is corrupted in transmission, so the receiver gets: 1 1 0 0 101 0 0010001 Perform the parity calculations for all check bits Which check bits have wrong parity? r 8, r 4 and r 1 8+4+0+1 = 13. What happens if the corrupted bit is one of the check bits?

Important: Many Hamming Code Calculators are available on the Web. Their use in this class is not allowed (except for checking results). All work has to be shown, step by step, in the manner presented in our text and the previous slides. Answers without work receive no credit.

This is the end of the material required for the midterm Tuesday lecture: review Wednesday lab: exam Recommended problems for Ch.3: 1, 2, 9 (end of chapter) Solve in notebook before the review! EoL2