Search This Blog

Saturday, 28 June 2014

CS2302 Computer Networks Unit - I (Issues in the data link layer)



Framing

        We are focusing on packet-switched networks, which means that blocks of data (called frames at this level), not bit streams, are exchanged between nodes.

        It is the network adaptor that enables the nodes to exchange frames.

        When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame from the node’s memory. This results in a sequence of bits being sent over the link.

        The adaptor on node B then collects together the sequence of bits arriving on the link and deposits the corresponding frame in B’s memory.

        Recognizing exactly what set of bits constitute a frame—that is,

determining where the frame begins and ends—is the central challenge faced by the adaptor

To transmit frames over the node it is necessary to mention start and end of each frame. There are three techniques to solve this frame

1.     Byte-Oriented Protocols (BISYNC, PPP, DDCMP)

2.     Bit-Oriented Protocols (HDLC)

3.     Clock-Based Framing (SONET)

Byte Oriented protocols


v    To view each frame as a collection of bytes (characters) rather than bits

v     BISYNC (Binary Synchronous Communication) Protocol

o       Developed by IBM (late 1960)

v     DDCMP (Digital Data Communication Protocol)

o       Used in DECNET


Sentinel Approach

The BISYNC protocol illustrates the sentinel approach to framing; its frame format is




  • The beginning of a frame is denoted by sending a special SYN (synchronization) character.
  • The data portion of the frame is then contained between special sentinel characters: STX (start of text) and ETX (end of text).
  • The SOH (start of header) field serves much the same purpose as the STX field.
  • The frame format also includes a field labeled CRC (cyclic redundancy check) that is used to detect transmission errors.
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” the ETX character by preceding it wit h a DLE (data-link-escape) character whenever it appears in the body of a frame; the DLE character is also escaped (by preceding it with an extra DLE) in the frame body. This approach is called character stuffing.

Point-to-Point Protocol (PPP)

The more recent Point-to-Point Protocol (PPP). The format of PPP frame is


  • The Flag field has 01111110 as starting sequence. 
  •  The Address and Control fields usually contain default values.
  • The Protocol field is used for demultiplexing. It defines the high level protocol such as IP or IPX (protocol developed by Novell).
  • The frame payload size can he negotiated, but it is 1500 bytes by default.
  • 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 Control Protocol).
  • LCP sends control messages encapsulated in PPP frames such messages are denoted by an LCP identifier in the PPP Protocol.

Byte-Counting Approach

The number of bytes contained in a frame can he included as a field in the frame header. DDCMP protocol is used for this approach. The frame format is

  • COUNT Field specifies how many bytes are contained in the frame’s body. 
  • Sometime count field will be corrupted during transmission, so the receiver will accumulate as many bytes as the COUNT field indicates. This is sometimes called a framing error. 
  • The receiver will then wait until it sees the next SYN character.

Bit-Oriented Protocols (HDLC)

In this, frames are viewed as collection of bits. High level data link protocol is used. The format is


  • HDLC denotes both the beginning and the end of a frame with the distinguished bit sequence 01111110.
  • This sequence might appear anywhere in the body of the frame, it can be avoided by bit stuffing.
  • On the sending side, any time five consecutive 1’s have been transmitted from the body of the message (i.e., excluding when the sender is trying to transmit the distinguished 01111110 sequence), the sender inserts a 0 before transmitting the next bit.
  • On the receiving side, five consecutive 1’s arrived, the receiver makes its decision based on the next bit it sees (i.e., the bit following the five is).
  • If the next bit is a 0, it must have been stuffed, 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 marker or an error has been introduced into the bit stream. 
  • By looking at the next bit, the receiver can distinguish between these two cases:
a.   If it sees a 0 (i.e., the last eight bits it has looked at are 01111110), then it is the end-of- frame marker.

b.   If it sees a 1 (i.e., the last eight bits it has looked at are 01111111), then there must have been an error and the whole frame is discarded.

 
Clock-Based Framing (SONET)

  • Synchronous Optical Network Standard is used for long distance transmission of data over optical network.
  • It supports multiplexing of several low speed links into one high speed links.
  • An STS-1 frame is used in this method.

 

  • It is arranged as nine rows of 90 bytes each, and the first 3 bytes of each row are overhead, with the rest being available for data.
  • The first 2 bytes of the frame contain a special bit pattern, and it is these bytes that enable the receiver to determine where the frame starts.
  • The receiver looks for the special bit pattern consistently, once in every 810 bytes, since each frame is 9 x 90 = 810 bytes long.



  • The STS-N frame can he thought of as consisting of N STS-1 frames, where the bytes from these frames are interleaved; that is, a byte from the first frame is transmitted, then a byte from the second frame is transmitted, and so on. 
  • Payload from these STS-1 frames can he linked together to form a larger STS-N payload, such a link is denoted STS-Nc. One of the bits in overhead is used for this purpose.