Ad hoc and Sensor Networks Chapter 6: Link layer protocols. Holger Karl

Similar documents
Wireless Sensornetworks Concepts, Protocols and Applications. Chapter 5b. Link Layer Control

Principal options and difficulties

4. Error correction and link control. Contents

The Data Link Layer Chapter 3

ELEC 691X/498X Broadcast Signal Transmission Winter 2018

Chapter 3. The Data Link Layer

Multiple Access Technique. Media Access Control (Intro.) Outline. Multiple Access Technique. Designing Issues of MAC protocols. Protocols examples

Data Link Control Layer, Error Detection, Error Correction, and Framing

S Capacity enhancement methods for radio interface ARQ Schemes

Data Link Control Protocols

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

CHANNEL CODING 1. Introduction

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

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

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

The Data Link Layer Chapter 3

CSE 461: Framing, Error Detection and Correction

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

Outline. Basic ARQ schemes. S Capacity enhancement methods for radio interface ARQ Schemes. Classification of error control strategies

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

CSEP 561 Error detection & correction. David Wetherall

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

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

Networked Systems and Services, Fall 2018 Chapter 2. Jussi Kangasharju Markku Kojo Lea Kutvonen

Link Layer. (continued)

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

CS321: Computer Networks Error Detection and Correction

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Chapter 6 Digital Data Communications Techniques

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Inst: Chris Davison

A Class of Adaptive Hybrid ARQ Schemes for Wireless Links

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

3. Data Link Layer 3-2

Networking Link Layer

COMPUTER NETWORKS UNIT-3

Ch. 7 Error Detection and Correction

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

UNIT IV -- TRANSPORT LAYER

The Data Link Layer. Data Link Layer Design Issues


Randomization. Randomization used in many protocols We ll study examples:

Randomization used in many protocols We ll study examples: Ethernet multiple access protocol Router (de)synchronization Switch scheduling

Hands-On Exercises: IEEE Standard

The flow of data must not be allowed to overwhelm the receiver

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

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

DATA LINK LAYER UNIT 7.

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

TCP over wireless links

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

STEVEN R. BAGLEY PACKETS

Lec 19 - Error and Loss Control

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Lecture 7: Flow Control"

Lecture 7: Flow & Media Access Control"

Error Control in Wireless Sensor Networks: A Cross Layer Analysis

INF Data Communication Data Link Layer

Lecture 16: QoS and "

T325 Summary T305 T325 B BLOCK 4 T325. Session 3. Dr. Saatchi, Seyed Mohsen. Prepared by:

CSCI-1680 Link Layer Reliability John Jannotti

FEC Performance in Large File Transfer over Bursty Channels

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

Lecture / The Data Link Layer: Framing and Error Detection

Data Link Layer (cont.) ( h h h ) (Sicherungsschicht) HDLC - 1.

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

CSCI-1680 Link Layer I Rodrigo Fonseca

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

Multi-Hop ARQ 林咨銘 2006/8/24.

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

Link Layer: Error detection and correction

(Sicherungsschicht) Chapter 5 (part 2) [Wa0001] HDLC - 1.

CODE COMBINING ARQ SCHEME

CMPE150 Midterm Solutions

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

CS 641 Project Report Error resilient video transmission over wireless networks. December Gang Ding

TSG-RAN Working Group 2 (Radio layer 2 and Radio layer 3) TSGR2#2(99)085 Stockholm 8th to 11th March 1999

CE693: Adv. Computer Networking

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Basic Communication Concepts

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

Data Link Layer. Srinidhi Varadarajan

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

Data Link Layer (part 2)

ECE 333: Introduction to Communication Networks Fall Lecture 6: Data Link Layer II

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

Ad hoc and Sensor Networks Chapter 13a: Protocols for dependable data transport

CSE 123: Computer Networks

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

William Stallings Data and Computer Communications. Chapter 7 Data Link Control

Outline. CS5984 Mobile Computing

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

CS 3640: Introduction to Networks and Their Applications

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

A study of Skype over IEEE networks: voice quality and bandwidth usage

CSE123A discussion session

TCP: Flow and Error Control

Analysis of TCP Latency over Wireless Links Supporting FEC/ARQ-SR for Error Recovery

Transport Layer TCP / UDP

Transcription:

Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl

Goals of this chapter Link layer tasks in general Framing group bit sequence into packets/frames Important: format, size Error control make sure that the sent bits arrive and no other One of the most important tasks in data link layer Flow control ensure that a fast sender does not overrun its slow(er) receiver Not an issue in sensor networks Link management discovery and manage links to neighbors Do not use a neighbor at any cost, only if link is good enough! Understand the issues involved in turning the radio communication between two neighboring nodes into a somewhat reliable link

Overview Error control Framing Link management

Error control Error control has to ensure that data transport is Error-free deliver exactly the sent bits/packets In-sequence deliver them in the original order Duplicate-free and at most once Loss-free and at least once Causes: fading, interference, loss of bit synchronization, Results in bit errors, bursty, sometimes (see physical layer chapter) In wireless, sometimes quite high average bit error rates 10-2 10-4 possible! Approaches Backward error control ARQ (Automatic Repeat Request) Forward error control FEC

Causes and characteristics of transmission error Sync: consists of a string of 0s or 1s, alerting the receiver that a potentially receivable signal is present. SFD (start frame delimiter): defines the beginning of a frame. Signal: identifies the type of modulation that the receiver must use to demodulate the signal. Services: reserves for future use. CRC: The Signal, Service, and Length fields are all protected with a CCITT CRC-16 frame check sequence Sync(128-bit) SFD(16-bit) Signal(8-bit) Services(8-bit) Length(16-bit) CRC(16-bit) MPDU (variable) Preamble PHY header Format of an IEEE 802.11 physical layer frame

Backward error control ARQ Basic procedure (a quick recap) Put header information around the payload Compute a checksum and add it to the packet Typically: Cyclic redundancy check (CRC), quick, low overhead, low residual error rate Provide feedback from receiver to sender Send positive or negative acknowledgement Sender uses timer to detect that acknowledgements have not arrived Assumes packet has not arrived Optimal timer setting? If sender infers that a packet has not been received correctly, sender can retransmit it What is maximum number of retransmission attempts? If bounded, at best a semi-reliable protocols results

Standard ARQ protocols Alternating bit at most one packet outstanding, single bit sequence number Go-back N send up to N packets, if a packet has not been acknowledged when timer goes off, retransmit all unacknowledged packets Selective Repeat when timer goes off, only send that particular packet

How to use acknowledgements Be careful about ACKs from different layers A MAC ACK (e.g., S-MAC) does not necessarily imply buffer space in the link layer On the other hand, having both MAC and link layer ACKs is a waste Do not (necessarily) acknowledge every packet use cumulative ACKs Tradeoff against buffer space Tradeoff against number of negative ACKs to send

When to retransmit Assuming sender has decided to retransmit a packet when to do so? In a BSC (binary symmetric channel) channel, any time is as good as any In fading channels, try to avoid bad channel states postpone transmissions Instead (e.g.): send a packet to another node if in queue (exploit multi-user diversity) How long to wait? Example solution: Probing protocol Idea: reflect channel state by two protocol modes, normal and probing When error occurs, go from normal to probing mode In probing mode, periodically send short packets (acknowledged by receiver) when successful, go to normal mode

Forward error control Idea: Endow symbols in a packet with additional redundancy to withstand a limited amount of random permutations Additionally: interleaving change order of symbols to withstand burst errors

Block Error Correction Codes Transmitter Forward error correction (FEC) encoder maps each k -bit block into an n -bit block codeword Codeword is transmitted; analog for wireless transmission Receiver Incoming signal is demodulated Block passed through an FEC decoder 4/29/2008

FEC Decoder Possible Outcomes No errors present Codeword produced by decoder matches original codeword Decoder detects and corrects bit errors Decoder detects but cannot correct bit errors; reports uncorrectable error Decoder detects no bit errors, though errors are present 4/29/2008

Block Code Principles Hamming distance- for 2 n -bit binary sequences, the number of different bits E.g., v 1=011011; v 2=110001; d (v 1, v 2) = 3 Example: Data block Codeword 00 00000 01 00111 10 11001 11 11110 We can correct 1-bit error and detect 2-bit error 4/29/2008

Block Code Principles Redundancy ratio of redundant bits to data bits that is (n - k )/k Code rate ratio of data bits to total bits Coding gain the reduction in the required Eb /N0 to achieve a specified BER of an error-correcting coded system 4/29/2008

Block-coded FEC Level of redundancy: blocks of symbols Block: k p -ary source symbols (not necessarily just bits) Encoded into n q -ary channel symbols Injective mapping (code) of pk source symbols into qn channel symbols Code rate : (k ld p) / (n ld q ) When p=q=2: k/n is code rate For p=q =2: Hamming bound code can correct up to t bit errors only if Codes for (n, k, t) do not always exist

Hamming Code Process Hamming codes are designed to correct single bit errors Encoding: k data bits + (n - k ) check bits Decoding: compares received (n -k ) bits with calculated (n - k ) bits using XOR Resulting (n - k ) bits called syndrome word Syndrome range is between 0 and 2(n -k ) - 1 Each bit of syndrome indicates a match (0) or conflict (1) in that bit position and hence 2(n -k ) 1 >= k + (n k ) = n 4/29/2008

Hamming Code Characteristics We would like to generate a syndrome with the following characteristics: If the syndrome contains all 0s, no error has been detected If the syndrome contains only one bit set to 1, then an error has occurred in one of the check bits If the syndrome contains more than one bit set to 1, then the numerical value of the syndrome indicates the position of the data bit in error 4/29/2008

Hamming Code Generation Hamming check bits are inserted at the position of power of 2 i.e., positions 1, 2, 4,, 2(n-k-1 ) The remaining bits are data bits Each data position which has a value 1 is presented by a binary value equal to its position; thus if the 9th bit is 1 the corresponding value is 1001 All of the position values are then XORed together to produce the bits of the Hamming code Example: The 8-bit data block is 00111001 4/29/2008

BCH Codes For positive pair of integers m and t, a (n, k ) BCH code has parameters: Block length: n = 2m 1 Number of check bits: n k <= mt Minimum distance:d min >= 2t + 1 Correct combinations of t or fewer errors Flexibility in choice of parameters Block length, code rate 4/29/2008

Reed-Solomon Codes (Option) Subclass of nonbinary BCH codes Data processed in chunks of m bits, called symbols An (n, k ) RS code has parameters: Symbol length: m bits per symbol Block length: n = 2m 1 symbols = m (2m 1) bits Data length: k symbols Size of check code: n k = 2t symbols = m (2t ) bits Minimum distance: d min = 2t + 1 symbols 4/29/2008

Example Let t = 1 and m = 2. Denoting the symbols as 00, 01, 10, and 11 Then n = 22 1 = 3 symbols = 6 bits Check code = (n - k ) = 2 symbols = 4 bits This code can correct any burst error <= 2 bits 4/29/2008

Block Interleaving Data written to and read from memory in different orders Data bits and corresponding check bits are interspersed with bits from other blocks At receiver, data are de-interleaved to recover original order A burst error that may occur is spread out over a number of blocks, making error correction possible 4/29/2008

Block Interleaving

Convolutional Codes Generates redundant bits continuously Error checking and correcting carried out continuously (n, k, K ) code Input processes k bits at a time Output produces n bits for every k input bits K = constraint factor k and n generally very small n -bit output of (n, k, K ) code depends on: Current block of k input bits Previous K -1 blocks of k input bits 4/29/2008

Convolutional codes Code rate: ratio of k user bits mapped onto n coded bits Constraint length K determines coding gain Energy Encoding: cheap Decoding: Viterbi algorithm, energy & memory depends exponentially on constraint length K

Convolutional Encoder Ex: input 1011 generates output 11100001

Energy consumption of convolutional codes Tradeoff between coding energy and reduced transmission power (coding gain) Overall: block codes tend to be more energyefficient residual bit error prob.!

Comparison: FEC vs. ARQ FEC t: error correction capacity Constant overhead for each packet Not (easily) possible to adapt to changing Relative energy consumption channel characteristics ARQ Overhead only when errors occurred (expect for ACK, always needed) Both schemes BCH + unlimited number of retransmissions have their uses! hybrid schemes

Power control on a link level Further controllable parameter: transmission power Higher power, lower error rates less FEC/ARQ necessary Lower power, higher error rates higher FEC necessary Tradeoff!

Overview Error control Framing Link management

Frame, packet size Small packets: low packet error rate, high packetization overhead Large packets: high packet error rate, low overhead Depends on bit error rate, energy consumption per transmitted bit Notation: h(overhead, payload size, BER)

Dynamically adapt frame length For known bit error rate (BER), optimal frame length is easy to determine Problem: how to estimate BER? Collect channel state information at the receiver (RSSI, FEC decoder information, ) Example: Use number of attempts T required to transmit the last M packets as an estimator of the packet error rate (assuming a BSC) Details: see the references of text book Second problem: how long are observations valid/how should they be aged? Only recent past is if anything at all somewhat credible

Putting it together: ARQ, FEC, frame length optimization Applying ARQ, FEC (both block and convolutional codes), frame length optimization to a Rayleigh fading channel Channel modeled as Gilbert-Elliot

Overview Error control Framing Link management

Link management Goal: decide to which neighbors that are more or less reachable a link should be established Problem: communication quality fluctuates, far away neighbors can be costly to talk to, error-prone, quality can only be estimated The quality of a link is not binary The quality of a link is time variable The quality can only to be estimated Establish a neighborhood table for each node Partially automatically constructed by MAC protocols

Link quality characteristics Expected: simple, circular shape of region of communication not realistic Sometimes links are asymmetric Instead: Correlation between distance and loss rate is weak; iso-losslines are not circular but irregular Asymmetric links are relatively frequent (up to 15%) Significant short-term PER variations even for stationary nodes

Three regions of communication Effective region : PER consistently < 10% Transitional region: anything in between, with large variation for nodes at same distance Poor region : PER well beyond 90%

Link quality estimation How to estimate, on-line, in the field, the actual link quality? Requirements for estimator Precision estimator should give the statistically correct result Agility estimator should react quickly to changes Stability estimator should not be influenced by short aberrations Efficiency avoid too much listening for other nodes transmission There are active or passive estimator Example: only estimates at fixed intervalsrn : received packets in interval fn : packet identified as lost Pn = αpn-1 + (1- α ) fn /(rn + fn ) Pn is the prediction of packet loss rate at time t + nt

Conclusion Link layer combines traditional mechanisms Framing, Error control, flow control with relatively specific issues Careful choice of error control mechanisms tradeoffs between FEC & ARQ & transmission power & packet size Link estimation and characterization