Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.

Slides:



Advertisements
Similar presentations
Mohmmad Khalily Dermany Islamic Azad University. Goals – Link layer tasks in general Framing – group bit sequence into frames Important: format, size.
Advertisements

Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.
1 Wireless Sensor Networks Link Layer Protocols Mario Čagalj FESB University of Split Based on “Protocols and Architectures.
1 Wireless Sensor Networks Akyildiz/Vuran Administration Issues  Take home Mid-term Exam  Assign April 2, Due April 7  Individual work is required 
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
Chapter 6 Errors, Error Detection, and Error Control
Chapter 6 Errors, Error Detection, and Error Control.
Coding and Error Control
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Lecture 9-10: Error Detection and Correction Anders Västberg Slides are a selection from the slides from chapter 8 from:
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
The OSI Reference Model
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
Chapter 6: Errors, Error Detection, and Error Control
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Chapter 6 Errors, Error Detection, and Error Control
Digital Data Communications Techniques Updated: 2/9/2009.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
1/26 Chapter 6 Digital Data Communication Techniques.
1 Wireless Sensor Networks Akyildiz/Vuran Chapter 6: Error Control.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data and Computer Communications. The Data Link Layer.
BMAC - Versatile Low Power Media Access for Wireless Sensor Networks.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
TOBB ETÜ ELE46/ELE563 Communications Networks Lecture 01 May 6, 2014 Fall 2011 Tuesday 10:30 – 12:20 (310) Thursday 15:30 – 17:20 (372) İsrafil Bahçeci.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Computer Networks Group Universität Paderborn TANDEM project meeting Protocols, oversimplification, and cooperation or: Putting wireless back into WSNs.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
Lecture 3-2: Coding and Error Control (Cont.) ECE
1 Chapter 8. Coding and Error Control Wen-Shyang Hwang KUAS EE.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 6: Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach Third Edition.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Error/Flow Control Modeling (ARQ Modeling). © Tallal Elshabrawy 2 Data Link Layer  Data Link Layer provides a service for Network Layer (transfer of.
TCP-Cognizant Adaptive Forward Error Correction in Wireless Networks
Tufts University. EE194-WIR Wireless Sensor Networks. February 17, 2005 Increased QoS through a Degraded Channel using a Cross-Layered HARQ Protocol Elliot.
1/30/ :20 PM1 Chapter 6 ─ Digital Data Communication Techniques CSE 3213 Fall 2011.
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.
Channel Coding and Error Control 1. Outline Introduction Linear Block Codes Cyclic Codes Cyclic Redundancy Check (CRC) Convolutional Codes Turbo Codes.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
1 Wireless Networks Lecture 5 Error Detecting and Correcting Techniques (Part II) Dr. Ghalib A. Shah.
Coding and Error Control
Computer Communication & Networks
Reliable Transmission
Chapter 9: Data Link Control
Data Link Layer.
Chap. 4 Data link layer 2.
Data Link Layer What does it do?
Overview Jaringan Komputer (2)
Coding and Error Control
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Chapter 9: Data Link Control
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols2 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  Forward and backward error control  Flow control – ensure that a fast sender does not overrun its slow(er) receiver  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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols3 Overview  Error control  Framing  Link management

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols4 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 heavy-tailed runs (see physical layer chapter)  In wireless, sometimes quite high average bit error rates – … possible!  Approaches  Backward error control – ARQ  Forward error control – FEC

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols5 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols6 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols7 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols8 When to retransmit  Assuming sender has decided to retransmit a packet – when to do so?  In a BSC 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols9 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols10 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 p k source symbols ! q n 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols11 Communication Errors  Parity bits (even versus odd)  Checkbytes  Error correcting codes

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols12 The ASCII codes for the letters A and F adjusted for odd parity

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols13 Figure 1.29 An error-correcting code

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols14 Figure 1.30 Decoding the pattern using the code in Figure 1.30

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols15 Popular block codes  Popular examples  Reed-Solomon codes (RS)  Bose-Chaudhuri-Hocquenghem codes (BCH)  Energy consumption  E.g., BCH encoding: negligible overhead (linear-feedback shift register)  BCH decoding: depends on block length and Hamming distance (n, t as on last slide)  Similar for RS codes

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols16 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols17 Energy consumption of convolutional codes  Tradeoff between coding energy and reduced transmission power (coding gain)  Overall: block codes tend to be more energy- efficient RESIDUAL bit error prob.!

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols18 Comparison: FEC vs. ARQ  FEC  Constant overhead for each packet  Not (easily) possible to adapt to changing channel characteristics  ARQ  Overhead only when errors occurred (expect for ACK, always needed)  Both schemes have their uses ! hybrid schemes BCH + unlimited number of retransmissions Relative energy consumption t: error correction capacity

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols19 Power control on a link level  Hybrid : Use FEC only in re-transmissions  Further controllable parameter: transmission power  Higher power, lower error rates – less FEC/ARQ necessary  Lower power, higher error rates – higher FEC necessary  Tradeoff!

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols20 Overview  Error control  Framing  Link management

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols21 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)

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols22 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: homework assignment  Second problem: how long are observations valid/how should they be aged?  Only recent past is – if anything at all – somewhat credible

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols23 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

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols24 Overview  Error control  Framing  Link management

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols25 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  Establish a neighborhood table for each node  Partially automatically constructed by MAC protocols

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols26 Link quality characteristics  Expected: simple, circular shape of “region of communication” – not realistic  Instead:  Correlation between distance and loss rate is weak; iso-loss-lines are not circular but irregular  Asymmetric links are relatively frequent (up to 15%)  Significant short-term PER variations even for stationary nodes

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols27 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%

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols28 Link quality estimation  How to estimate, on-line, in the field, the actual link quality?  Requirements  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 – Active or passive estimator  Example: WMEWMA only estimates at fixed intervals

SS 05Ad hoc & sensor networs - Ch 6: Link layer protocols29 Conclusion  Link layer combines traditional mechanisms  Framing, packet synchronization, flow control with relatively specific issues  Careful choice of error control mechanisms – tradeoffs between FEC & ARQ & transmission power & packet size …  Link estimation and characterization