5. framing

Upload: sakthivel-velusamy

Post on 02-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 5. Framing

    1/16

    FRAMING

  • 7/27/2019 5. Framing

    2/16

    TopicsByte Oriented Protocols ( BISYNC , PPP) Sentinel Approach Byte - Counting Approach (DDCMP)

    Bit Oriented Protocols ( HDLC)

    Clock Based Framing (SONET)

    7/29/2013 Computer Networks By Sakthivel AP/CSE 2

  • 7/27/2019 5. Framing

    3/16

    FRAMINGThe stream of bits are not advisible to maintain

    in networks.When an error occurs, then the entire streamhave to retransmitted.To avoid this, the framing concept is used.

    In this, the stream of bits are divided intomanageable bit units called frames.To achieve, we are using several ways.

    They are, 1. Byte Oriented Protocols 2. Bit Oriented Protocols 3. Clock Based Protocols

    7/29/2013 Computer Networks By Sakthivel AP/CSE 3

  • 7/27/2019 5. Framing

    4/16

    Contd 1. BYTE ORIENTED PROTOCOLS:

    Each frame is considered as a collection of bytes ratherthan a collection of bits.

    There are two approaches. They are, 1. Sentinel Approach

    2. Byte Counting Approach1. Sentinel approach

    In this approach it uses special characters called sentinelcharacters to indicate where frames start and end.

    This approach is called character stuffing because extracharacters are inserted in the data portion of the frame.

    Ex: 1. Binary Synchronous Communication (BISYNC)2. Point to Point Protocol

    7/29/2013 Computer Networks By Sakthivel AP/CSE 4

  • 7/27/2019 5. Framing

    5/16

    Contd

    Fig: BISYNC Frame format

    The beginning of a frame is denoted by sendinga special SYN(synchronization) character.The data portion of the frame contain specialsentinel characters

    STX (Start of TeXt)ETX(End of TeXt)

    The SOH (Start Of Header) field serves much thesame purpose as the STX field.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 5

  • 7/27/2019 5. Framing

    6/16

    Contd The problem with the sentinel approach is that the

    ETX character might appear in the data portion of the frame.BISYNC overcomes this problem by escaping theETX character by preceding it with a DLE(Data Link-

    Escape) character whenever it appears in the body of a frame.The DLE character is also escaped in the frame body.The approach is called character stuffing because

    extra characters are inserted in the data portion of the frame.CRC (Cyclic Redundancy Check) is used to detecttransmission errors.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 6

  • 7/27/2019 5. Framing

    7/16

    Point to Point protocol (PPP)PPP is commonly run over dial up modem linksThe format of PPP frame is

    Fig: PPP Frame FormatThe Flag field has 01111110 as starting sequence.The Address and Control fields usually contain default valuesThe Protocol field is used for demultiplexing.The frame payload size can be negotiated, but it is 1500 bytes bydefault.The PPP frame format is unusual in that several of the field sizes are

    negotiated rather than fixed.Negotiation is conducted by a protocol called LCP (Link ControlProtocol).LCP sends control messages encapsulated in PPP frames suchmessages are denoted by an LCP identifier in the PPP Protocol.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 7

  • 7/27/2019 5. Framing

    8/16

    Contd 2. Byte Count Approach

    In this approach no of bytes in frame are countedand entered in the header.

    Ex: 1.Digital Data Communication Message

    Protocol(DDCMP)

    7/29/2013 Computer Networks By Sakthivel AP/CSE 8

  • 7/27/2019 5. Framing

    9/16

  • 7/27/2019 5. Framing

    10/16

    Bit-Oriented Protocols (HDLC) In this, frames are viewed as collection of

    bits. High level data link protocol(HDLC) isused. The format is

    Fig: HDLC Frame Format

    7/29/2013 Computer Networks By Sakthivel AP/CSE 10

  • 7/27/2019 5. Framing

    11/16

    Contd HDLC denotes both the beginning and the end

    of a frame with the distinguished bit sequence01111110.This sequence might appear anywhere in thebody of the frame, it can be avoided by bitstuffing.On the sending side, any time five consecutive1s have been transmitted from the body of themessage (i.e., excluding when the sender istrying to transmit the distinguished 01111110sequence), the sender inserts a 0 beforetransmitting the next bit.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 11

  • 7/27/2019 5. Framing

    12/16

    Contd On the receiving side, five consecutive 1s

    arrived, the receiver makes its decisionbased on the next bit it sees (i.e., the bitfollowing the five is).

    If the next bit is a 0, it must have beenstuffed, and so the receiver removes it. If the next bit is a 1, then one of two things is

    true, either this is the end-of-frame markeror an error has been introduced into the bitstream.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 12

  • 7/27/2019 5. Framing

    13/16

    Contd By looking at the next bit, the receiver candistinguish between these two cases:If it sees a 0 (i.e., the last eight bits it haslooked at are 01111110), then it is the end-

    of- frame marker.If it sees a 1 (i.e., the last eight bits it haslooked at are 01111111), then there must

    have been an error and the whole frame isdiscarded.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 13

  • 7/27/2019 5. Framing

    14/16

    Clock-Based Framing (SONET) Synchronous Optical Network Standard is used for

    long distance transmission of data over opticalnetwork.

    It supports multiplexing of several low speed linksinto one high speed links.

    An STS-1 frame is used in this method.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 14

  • 7/27/2019 5. Framing

    15/16

    Contd It is arranged as nine rows of 90 bytes each,

    and the first 3 bytes of each row areoverhead, with the rest being available fordata.The first 2 bytes of the frame contain a

    special bit pattern, and these bytes thatenable the receiver to determine where theframe starts.

    The receiver looks for the special bit patternconsistently, once in every 810 bytes, sinceeach frame is 9 x 90 = 810 bytes long.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 15

  • 7/27/2019 5. Framing

    16/16

    Contd

    The STS-N frame can be thought of as consisting of NSTS-1 frames, where the bytes from these frames areinterleaved; that is, a byte from the first frame istransmitted, then a byte from the second frame istransmitted, and so on.

    Payload from these STS-1 frames can be linkedtogether to form a larger STS-N payload, such a linkis denoted STS-Nc. One of the bit in overhead is usedfor this purpose.

    7/29/2013 Computer Networks By Sakthivel AP/CSE 16