Full width home advertisement

Electronics Hub

Internet of Networks

Post Page Advertisement [Top]


As we know, Data link layer is responsible for movements of the frames from one hop to the next (hop-to-hop delivery).

There are mainly two functions of data link layer: data link control and media access control.

Data Link Control


It includes framing, flow control and error control and some software based protocols that provide easy ad reliable transmission of frames between hops.

Framing 


Like we know, physical layer in network models is concerned with the movements of the bits in the form of signal from a source to destination.
But on the other hand, data link layer needs to bundle those bits into frames, so that each frames can be differentiated from another.

Framing separates a message from one source to a destination by adding a sender address and a destination address. Sender address contains the address of the recipient (to acknowledge the receipt) and destination address contains where the packet needs to go.
Two types of approach are in hand for framing,

a)   Character-Oriented approach.

b)   Bit-Oriented approach.

Character-Oriented protocol:  In a character oriented protocol, 8-bit character data is to be carried from a coding system such as ASCII. The header contains the source address and destination address along with other information, the trailer contains error detection or error correction unnecessary redundant bits, which are also multiples of 8 bit.

To separate one frame from the next, a 1 Byte (8 bit) flag is added at the beginning and at the end of the frame.

Look at the picture below for better understanding,
frame png, frame photo
Framing

The character oriented framing was used only for text communication by data link layers. The flag could be selected to be any type of character which is not to be used for any kind of text communication.

However, nowadays we can send graphs, audio, and video as well. Any pattern used for the flag could also be a part of the information. But whenever this happens, the receiver when it encounters this pattern in the middle of the data, thinks it has reached the end the frame. And hence, it became a serious problem to be dealt on.

This problem was fixed by using byte stuffing strategy.

In byte stuffing, a special byte (character) known as Escape character (ESC) is added to the data section of the frame when there is a character with same the pattern as the flag. Thus, the data section is stuffed with an extra byte.

In this matter, whenever the receiver encounters an ESC character, it eradicates the ESC from the data sequence and treats the next character as data, not a flag.
frame design, frame photo
Framing

Note: Byte staffing is just a process of adding 1 extra byte whenever there’s a flag or escape character in the text.    

Bit-Oriented protocol: In this case, the data section in the frame is a sequence of bits to be interpreted by the upper layer as audio, video and text etc. Nevertheless, in addition to headers and trailers we need to have a delimiter to separate from one frame to another. Here, we use a 8-bit pattern flag such as ‘01111110’ as the delimiter to recognize the beginning and the end of the frame.
frame design, frame png
Framing

However, this flag can create same type of problem occurred in character-oriented protocol.

So, what do we do?

We, do this by staffing 1 single bit (instead of 1 byte) to put a stop to the pattern looking like a flag. This is called bit staffing.

In bit staffing, if a 0 and five consecutive 1 bits are encountered, we add an extra 0 over there. This extra 0 is eventually removed from the data received by the receiver. Matter of a fact is this ensures that the flag field sequence does not and will not appear in the frame.

Look at the picture below,
framing in data link layer, frame png
Framing

Study Sessions


Q1: What is Framing? and what are their approach?

Q2. What is Character-based approach? what is the problem associated with it, and how it is solved?

Q3. What is bit-oriented approach? what is the problem associated with it, and how it is solved?



PLEASE USE THE COMMENT SECTION FOR ANY DOUBTS AND QUERIES.

2 comments:

  1. Your article about Data link control: Framing, Flow control, and Error control is very helpful and informative. After reading we tried to note this following tips. So we are waiting for https://www.cybjurnal.com/

    ReplyDelete

Bottom Ad [Post Page]

| Designed by Sriparna Sarkar