×

Define Framing in Computer Network

Framing is a function of the data link layer, which provides a way for a sender to transmit a set of bits that should be meaningful to the user. The primary function of Datalink is framing.

What is Framing?

Frames are nothing but a possible group of bits to be communicated.

Bits are boxed up and then combined into frames so that each frame is distinguishable and recognizable from another.

Frame at the data link layer distinguishes a message from a source to a final destination or from one point to another destination by computing a sender address and a destination address together.

Define Framing in Computer Network

Thus, the Data Link Layer needs to pack bits into frames so each frame is distinguishable. 

Inserting a letter into an envelope separates one piece of information; the envelope serves as the delimiter.

The set of zeros and ones is packed into a frame, and these frames are understandable only by the data link layer.

A frame is a Character-oriented Protocol.

Framing type

Frames can be categorized as fixed-size or variable size

 1. Fixed-size frame:

  With fixed-size frames, you don't need to define frame bounds. The size itself can be used as a limit. An example of this type of framing is the ATM vast area network, which uses fixed-size frames called cells.

 2. Variable size frame:

 Variable-sized frames are standard in local area networks and require only a slight announcement of the end of a frame and the beginning of the next frame. Two different approaches are used for this task.

It must be defined to distinguish between the end of a frame and the beginning of the next frame. Here are two methods:

  • Length Field - You can specify the length of the frame by adding a length field to the frame. Used for Ethernet (802.3). The problem with this is that the length field can sometimes get corrupted.
  • End Delimiter (ED) – An ED (pattern) can be introduced to mark the end of the frame. Used in Token Ring. The problem with this is that ED can appear in the data. This can be resolved by Character/Byte Stuffing.

Character/byte stuffing: -

It is used when the frame consists of characters. Then, if the data contains an ED, 1 byte is inserted into the data to distinguish it from the ED.
It is the process of adding one extra byte whenever there is a flag or escaping character in the text. The bits to be transmitted are first broken into discrete frames at the data link layers

The checksum of each frame is computed if we want the bit stream to be error-free.

Now breaking this bit stream into frames is called framing.

The application layer creates the data, a set of zeroes and ones. Then, it goes to the transport layer; in the transport layer, it will add some zeroes and ones.

It is then passed over to the network layer. In the network layer also, it will add a network layer header, which we will call a packet.

So again, a set of zeroes and ones are added, and then it goes to the data link layer.

The two types of variable-sized frames are
1. Character-oriented framing
2. Bit-oriented framing

Character-oriented protocol

In a character-oriented protocol, data to be carried are an 8-bit character from a coding system such as ASCII.

The header, which usually carries the source and destination addresses and other control information, and the trailer, which has error detection or error connection redundant bits, are also multiple of 8 bits.

To separate one frame from the next, an 8-bit (1-byte) flag is added at the frame's beginning and the end. 

The flag, composed of protocol-dependent special characters, signals the start or end of a frame.

The Figure shows the format of a frame in a character-oriented protocol.

  • Any patterns used for the flag could also be part of the information. If this happens, the receiver thinks it has reached the end of the frame when it encounters this pattern in the middle of the data.
  • To fix this problem, a byte-stuffing strategy is added to character-oriented framing in which a particular byte is added to the data section of the frame when there is a character that belongs to the same pattern as that of the flag.
  • This particular extra byte is usually called the escape character(ESC), which has a predefined bit pattern whenever the receiver encounters the ESC character as data, not a delimiting flag.
  • Byte stuffing by the escape character allows the flag's presence in the data section of the frame, but it creates another problem if the text containers contain one or more than one characters that are escape followed by a flag. Then, in this case, the receiver removes the flight.
Define Framing in Computer Network

 To resolve this problem, any break-out characters inside the textual content must additionally be diagnosed with an extra break-out individual. Suppose the break-out individual is a part of the textual content. In that case, a different individual is usually brought to signify that the second individual is a part of the textual content.

Bit-oriented Protocols

In a bit-oriented protocol, the statistics segment of a frame is a series of bits to be interpreted by way of the top layer as text, photograph, audio, video, and so forth. However, similarly to headers (and possible trailers), we need a delimiter to separate one body from the opposite. Most protocols use a unique 8-bit pattern flag 01111110 because the delimiter outlines the frame's beginning and top.

Define Framing in Computer Network

This flag can create a similar kind of problem we saw in the byte-oriented protocols. If the flag sample seems to be inside the information, we must inform the receiver that this isn't the body's end. We do this by stuffing one single bit (in preference to 1 byte) to prevent the pattern from looking like a flag. The process is known as bit Stuffing. In bit stuffing, if zero and five consecutive 1 bit are encountered, a further zero is brought. This more filled bit is ultimately eliminated from the data by the receiver. notice that the extra bit is introduced after one 0 accompanied by way of Five 1s irrespective of the cost of the next bit. This ensures that the flag field series only sometimes seems in the body.

A frame body has the subsequent parts -

  • Frame Header - It includes the control bytes as well as the frame's source and destination addresses.
  • Flag - It marks the start and end of the body.
  • Trailer - It includes mistake detection and mistakes correction bits.
  • Payload field - It includes the message to be delivered.

 Methods of Framing

  • Count of Characters
    The entire number of characters that are available in the frame must typically be counted using the methods presented here, even though it is never worn. While this procedure is frequently carried out by modifying header field values. Although this character count methodology ensures that framing in the data connection layer is at the receiver end about the overall range of characters maintained, and wherever the frame finishes. Utilizing this system has another drawback in that, in the event that the character count is ever incorrectly calculated during the transmission process, the receiver end may experience synchronization loss. The receiver's power is insufficient to determine or establish the beginning of the next frame.
  •  Character-stuffed Flag Byte
    It is more commonly known as bit stuffing specifically. Byte stuffing really affects bytes since bit stuffing affects their bits. When there is communication that has a matching pattern, notably of the flag byte, a specific byte known as ESC (Escape Character) that has a defined design is typically attached to the data section of the frame. Although the receiver separates the ESC and the data, this could cause issues.
  • Starting and Ending Flags with Bit Stuffing
    An alternative name for Starting and Ending Flags with Bit Stuffing is a bit-oriented framing or bit-oriented approach. Bit stuffing is the practice of adding extra bits to data streams created by computer network protocol designers. In order to easily supply and send communication data and information to the recipient and to avoid or simply neglect the element of unwritten or inessential check sequences, additional bits are often lodged within the transmission unit. The only purpose of this type of protocol control is to stop the bit sample, which causes the transmission to go out of sync.
  • Encoding violation
    Encoding in physical media results in a kind of repetition that is used in multiple graphic or visual structures, simply encoding or representing information variables.

Framing's benefits in the data link layer

  • The time-division multiplexing technique frequently employs framing in Data connections. A sender can transmit a class of valid bits to a recipient using frame at the data connection layer.
  • The time-division multiplexing technique uses frames continually. It makes it easier for the sender to fill out a form to convey a set of valid bits to the recipient. Additionally, frames have headers that contain data like error-checking codes.
  • There are frame architectures for A-Frame relay, Token Ring, Ethernet, and other data connection layer techniques. Frames enable the data to be split into numerous recoverable bits that can be checked for corruption further.

Conclusion

Additionally, as part of the data link layer, the header contains data such as error-checking codes.

 Framing in Data Link Layer Relay, Token Ring, Ethernet, and other types of data link layer technologies has a specific frame structure.

 Information can be decomposed into several recoverable pieces, and data link layer framing allows checking for corruption.

 The Data Link Layer Framing feature provides a flow control mechanism that regulates the flow of frames, helping fast senders to prevent slow receivers from information overload.

 Within the peer network layer, data link layer framing provides reliable information transmission services.


Related Topics

FTP: File Transfer Protocol

File Transfer Protocol File transfer protocol is commonly called FTP. The most popular service of the Internet is to download the files. In other words, it is to transfer the files...

3 minutes read.

Mesh Topology Diagram in Computer Network

Topology in simple terms can be defined asthe arrangement of a computer network, which is further divided into logical and physical arrangements. Logical arrangement refers to how the data flow...

4 minutes read.

Address Mapping

Address Mapping: Internet is made of a combination of physical networks connected together by internetworking devices such as routers. A logical address is an internetwork address. A physical address is...

4 minutes read.

OSI Model

OSI Model: OSI stands for Open Systems Interconnection. The ISO (International Standards Organization) was introduced the OSI model in 1983. The OSI model is a standard reference model for communication between...

6 minutes read.

Advantages and Disadvantages of WAN

Before we move to advantages and disadvantages of WAN, first we discuss about what is WAN and what are its features. A wide area network is a vast network of information...

4 minutes read.

APIPA: Automatic Private IP Addressing

What is APIPA? APIPA stands for Automatic Private IP Addressing. It is a word used by Microsoft to describe address auto configuration, which enables a Local Area Network (LAN) computer to...

3 minutes read.

Multiple Access Control

Multiple Access Control: The data link layer is separated into two sub-layers. The upper sub-layer is responsible for flow control and error control that is called the logical link control...

5 minutes read.

Fixed and Flooding Routing Algorithms

Introduction Before going to study fixed and flooding routing algorithms, we have to take a look back to revisit the topic of routing. Routing can be defined as Routing: What is it? Routing...

3 minutes read.

Error Correction and Error Detection

Error Correction and Error Detection Error correction and error detection techniques are work on the data-link layer. The data link layer ensures the frames are sent from the sender to the...

16 minutes read.

E-mail in Computer Network

E-mail E-mail stands for electronic mail. E-mail is an application layer service in which a user can transfer the messages and information with another user. E-mail is the most popular service...

2 minutes read.

Two Port Network in Computer Networks

A Two Port Network is a four-terminal electric network or circuit with 2 terminals on both sides, each connecting with more circuits or devices. Two terminals together make a port, one...

5 minutes read.

TCP Ports

What is TCP? TCP is a transport layer protocol that helps to establish connections. TCP means Transmission Control Protocol. It guarantees secure data transmission between two network-connected devices. The data can...

5 minutes read.

Define Framing in Computer Network

Framing is a function of the data link layer, which provides a way for a sender to transmit a set of bits that should be meaningful to the user. The...

7 minutes read.

Hamming Code Example

What is Hamming Code? Hamming code is an error-detecting and error-correcting code used in computer data storage and transmission to detect and correct errors caused by noise, interference, or data corruption....

4 minutes read.

Unicast Routing Protocol

Unicast Routing Protocol: Unicast is a point to point communication arrangement that only occurs between the sender and receiver. Routing Information Protocol RIP is an open standard protocol that can work with...

3 minutes read.

What is Framing in a Computer Network?

In the stream of bits, the data is stored by transmitting the bit by the connection of two devices through cable. This type of connection for data transmission is called...

6 minutes read.

Session Layer and Presentation Layer

Session Layer and Presentation Layer Session Layer The fifth layer is the Session layer in the OSI model, which controls connections between many computers. It manages, establishes, and terminates the session connection...

2 minutes read.

Computer Network Switching

Switching Many numbers of connected devices are called the network. Whenever a company has multiple devices, there has a problem of how to connected them to make the one to one...

5 minutes read.

Basic Networking Devices

Introduction Physical components, or network devices, allow hardware on a computer network to link and convey with one another. Network equipment such as switches, routers, gateways, hubs, repeaters, bridges, and routers...

6 minutes read.

Working of ARP

The majority of computer programmes and applications send and receive messages using logical addresses (IP addresses), but the actual communication takes place over physical addresses (MAC addresses), which is found...

4 minutes read.