Link Layer Communication

Write a short note on framing.

Framing
  • Breaking the bit stream into frames is called as framing.
  • Framing in the data link layer separates a message from one source to a destination.
  • The bits are broken into discrete frames at the data link layer.
  • In framing, the bit stream is error free and checksum of each frame is computed.
  • When a frame is received, the data link layer recomputes the checksum. If it is different from the checksum, then the data link layer knows that an error has occurred.
Methods of Framing

1. Character count
2. Starting and ending characters, with character stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.

1. Character count
  • Character count uses a field in the header to specify the number of characters in the frame.
  • When the data link layer at the destination see the character count, it knows how many characters follow? And where the end of the frame is?
  • The disadvantage of character count is that, if the count is garbled by a transmission error, the destination will lose synchronization and will be unable to locate the start of the next frame, so this method is rarely used.
2. Character stuffing
  • In character stuffing, each frame starts with the ASCII characters sequence DLE STX and end with the sequence DLE ETX. (Where DLE is Data Link Escape, STX is Start of Text and ETX is End of Text).
  • It overcomes the drawbacks of the character count method.
  • If the destination ever loses synchronization, it only has to look for DLE STX and DLE ETX characters.
3. Bit stuffing
  • Bit stuffing allow data frames to contain an arbitrary number of bits.
  • It allows character code with an arbitrary number of bits per character.
  • Whenever the sender data link layer detect the presence of five consecutive ones in the data, it automatically stuffs a 0 bit into the outgoing bit stream, this is called bit stuffing.
4. Physical layer coding violations
  • The physical layer coding violations method is applicable to networks in which the encoding on the physical medium contains some redundancy.