Networks: Bit and Byte Stuffing

Slides:



Advertisements
Similar presentations
Synchronous Links/Networks Modems are asynchronous - penalized by start bits and stop bits on each character (and dead time) Synchronous Networks recover.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Framing and Stuffing Advanced Computer Networks. Framing & Stuffing Outline  Synchronous vs Asynchronous Transmissions  Asynchronous Character Transmissions.
Data Transmission and Computer Networks
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
The OSI Reference Model
Bit and Byte Stuffing1. 2 Synchronous versus Asynchronous Transmissions There exists a hierarchy of synchronization tasks: –Bit level : recognizing the.
Networks: OSI Reference Model 1 International Standards Organization Open Systems Interconnect (OSI) Reference Model.
Institute for Experimental Mathematics Ellernstrasse Essen - Germany packet transmission A.J. Han Vinck January 19, 2010.
Transmission Characteristics 1. Introduction (Information Interchange codes) 2. Asynchronous and Synchronous Transmissions 3. Error detection (bit errors)
Computer Networks: Bit and Byte Stuffing 1 Bit and Byte Stuffing.
NETWORKING CONCEPTS. DATA LINK LAYER Data Link Control main functions of the data link layer are Data link control media access control. Data link control.
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.
Chapter-4/5-1CS331- Fakhry Khellah Term 081 Chapter 4 (Only 4.2 – 4.3) Digital Transmission.
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Giuseppe Bianchi Layer 2 Framing HDLC (High-level Data Linl Control)
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Computer Networks Chapter 11 – Data Link Control and Protocols.
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
UNIT-II Computer Network Data Link Layer. Data Link Layer Prepared by - ROHIT KOSHTA Data Link Layer is second layer of OSI reference model and is placed.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Layer Two Data Link Layer Collects bits from layer 1 and organizes into frames Passes bits that make up frames to layer 1 for transmission Concerned with.
1 Message Delineation Identify the start and end of messages by: Identify the start and end of messages by:
Chapter 11 Data Link Control
Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015.
13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA.
Computer Interfacing and Protocols
Point-to-Point Links: Framing
1 Reliable stream service--TCP 1.TCP accepts byte stream, segments 2.It is over IP, so out-of-sequence is very common --lost or error frame results in.
Framing and Stuffing Advanced Computer Networks. Framing & Stuffing Outline  Synchronous vs Asynchronous Transmissions  Asynchronous Character Transmissions.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 6: Datalink layer problems Slides used.
Lecture Focus: Data Communications and Networking  Data Link Layer  MAC Frame Format Lecture 25 CSCS 311.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 6 – Digital Data Communications Techniques.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
+ PPP Protocol. + Outline WAN Data Link Layer protocols Point-to-point serial communications Transmission Synchronization HDLC.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Communications Data Link Layer.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Chapter 11 Data Link Protocols
24/11/1013-Datalink1 The Data Link Layer Role Services Functions –Framing –Encapsulation –Addressing –Connection Control –Ordered Delivery –Flow Control.
Getting Connected (Chapter 2 Part 1)
The University of Adelaide, School of Computer Science
Chapter 11 Data Link Control
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Data link layer (LLC).
Point to Point Data Link Control
Net 221D : Computer Networks Fundamentals
Chapter 11 Data Link Control (DLC)
CS412 Introduction to Computer Networking & Telecommunication
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
Communication Networks NETW 501
Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Fundamentals of Computer Networks
Data Link Control (DLC) Services
Networks: Bit and Byte Stuffing
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
13-LAN, packets, frames and topologies
Introduction Communication Modes Transmission Modes
Presentation transcript:

Networks: Bit and Byte Stuffing 1

Synchronous versus Asynchronous Transmissions There exists a hierarchy of synchronization tasks: Bit level : recognizing the start and end of each bit Character or byte level : recognizing the start and end of each character (or small unit of data) Block or message level : recognize the start and end of each large unit of data (in networks this is a frame). Networks: Bit and Byte Stuffing 2

Synchronous versus Asynchronous Transmissions [Halsall] A fundamental requirement of digital data communications is that the receiver knows the starting time and the duration of each bit. Asynchronous transmission :: each character (or byte) is treated independently for clock (bit) and character (byte) synchronization purposes and the receiver resynchronizes at the start of each character received. Synchronous transmission :: the complete frame is transmitted as a contiguous string of bits and the receiver endeavors to keep in synchronism with the incoming bit stream for the duration of the frame. Networks: Bit and Byte Stuffing 3

Framing Synchronization in Asynchronous Transmission Transmitted at random intervals (e.g., keyboard) Direction of transmission Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 3.68 Networks: Bit and Byte Stuffing 4

Synchronous Transmissions Networks: Bit and Byte Stuffing More efficient, i.e., less overhead Blocks of characters transmitted without start and stop codes The transmitted stream is suitably encoded so the receiver can stay in ‘synch’ by: Using a separate clock line Embedding clocking information into data (e.g. biphase coding). Networks: Bit and Byte Stuffing 5

Methods to Identify Frames [Tanenbaum] Networks: Bit and Byte Stuffing Byte counts Starting/ending bytes [byte stuffing] Starting/ending flags [bit stuffing] Using physical layer coding violations (i.e., invalid physical codes) Networks: Bit and Byte Stuffing 6

Networks: Bit and Byte Stuffing The contents of each frame are encapsulated between a pair of reserved characters or bytes for frame synchronization. frame Preamble Bit Pattern Postamble Bit Pattern Networks: Bit and Byte Stuffing 7

Byte Stuffing [HDLC Example] Also referred to as character stuffing. ASCII characters are used as framing delimiters (e.g. DLE STX and DLE ETX) The problem occurs when these character patterns occur within the “transparent” data. Solution: sender stuffs an extra DLE into the data stream just before each occurrence of an ‘accidental’ DLE in the data stream. The data link layer on the receiving end unstuffs the DLE before giving the data to the network layer. Networks: Bit and Byte Stuffing 8

Networks: Bit and Byte Stuffing HDLC Byte Stuffing DLE STX Transparent Data DLE ETX Before DLE STX A B DLE H W DLE ETX Stuffed DLE STX A B DLE DLE H W DLE ETX Unstuffed DLE STX A B DLE H W DLE ETX Networks: Bit and Byte Stuffing 9

Networks: Bit and Byte Stuffing Networks: Bit and Byte Stuffing Bit Stuffing Each frame begins and ends with a special bit pattern called a flag byte [01111110]. {Note this is 7E in hex} Whenever sender data link layer encounters five consecutive ones in the data stream, it automatically stuffs a 0 bit into the outgoing stream. When the receiver sees five consecutive incoming ones followed by a 0 bit, it automatically destuffs the 0 bit before sending the data to the network layer. Networks: Bit and Byte Stuffing 10 Networks: Bit and Byte Stuffing

Networks: Bit and Byte Stuffing Networks: Bit and Byte Stuffing Bit Stuffing Input Stream 0110111111100111110111111111100000 Stuffed Stream 01101111101100111110011111011111000000 Stuffed bits Unstuffed Stream 0110111111100111110111111111100000 Networks: Bit and Byte Stuffing 11 Networks: Bit and Byte Stuffing

PPP (Point-to-Point Protocol) Frame Format Flag Address Control flag Protocol Information CRC 01111110 1111111 00000011 01111110 All stations are to accept the frame Unnumbered frame Specifies what kind of packet is contained in the payload, e.g., LCP, NCP, IP, OSI CLNP, IPX Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 5.40 Networks: Bit and Byte Stuffing 12

Networks: Bit and Byte Stuffing PPP Byte Stuffing Flag 01111110 Flag Address Control Flag 01111110 flag Protocol Information CRC 01111110 1111111 00000011 01111110 Input 7E 7D 33 7E 42 7E Stuffed Stream 7E 7D 5D 5D 33 7D 5E 42 7E Unstuffed Stream 7E 7D 33 7E 42 7E Networks: Bit and Byte Stuffing 13