Open In App

What is Frame Check Sequence?

Last Updated : 24 Nov, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Frame Check Sequence (FCS) refers to extra bits added to the frame for error detection. It is used for HDLC error detection. It is 2 byte or 4-byte field that is used to detect errors in the address field, control field, and information field of frames transmitted across the network. It is used to ensure the data frame is not corrupted by the transmission medium while sending it from sender to receiver.

HDLC Frame  Format

HDLC Frame  Format

Features:

  • It is an error detection code present in HDLC frames.
  • Its size varies from 2 bytes to 4 bytes.
  • It is used in the communication protocol.
  • It is only responsible for error detection and not error recovery.
  • The type of FCS technique to be used depends on the protocol followed by the network.

Purpose:

Data frames often get corrupted while transmission through a communication medium. FCS bits are added to the frame prior to its transmission across the network. FCS code is again calculated at the destination site and compared with FCS bits of the frame, if FCS matches then the transmission is considered successful else frames are discarded. Hence, it is used for error detection.

FCS is only used for error detection and does not specify any detail about error recovery. Error recovery technique is entirely based on the transmission protocol. Following are the examples to demonstrate how different protocols respond to errors detected using FCS:

  1. Ethernet, data link layer protocol specifies that data frame should be discarded in case of error detection and does not take any action for error recovery. If the sender sends some message to the destination using ethernet protocol, the message is divided into data frames with FCS bits attached to each frame then these frames are transmitted over the medium. If any of the frames get corrupted while transmission then its FCS bits will be changed. At the destination, FCS is calculated and compared with FCS bits of each frame, and FCS of the corrupted frame will not match the calculated FCS and hence the frame will be discarded. Since ethernet does not specify any action to take like retransmission of corrupted frame in case of error detection hence data will be lost.
     
  2. TCP, transport layer protocol specifies that data frames should be discarded in case of error detection and retransmit corrupted frames and initiate error recovery.  If the sender sends some message to the destination using TCP protocol, the message is divided into data frames with FCS bits attached to each frame then these frames are transmitted over the medium. If any of the frames get corrupted while transmission then its FCS bits will be changed. At destination FCS is calculated and compared with FCS bits of each frame and FCS of the corrupted frame will not match the calculated FCS and hence the frame will be discarded. TCP then initiates error recovery and retransmits the corrupted frames hence data will not be lost in this case.

Implementation:

The receiver computes the running sum of the entire frame with trailing FCS, then the result is compared with FCS bits of the frame, and if the result match then the transmission is considered successful else frame is discarded. Generally, MSB (most significant bit) of FCS is transmitted first but alternatively, FCS can be reversed to send LSB (least significant bit first). 

Different techniques are used to calculate FCS codes for error detection. Following are some of the techniques that are used to detect errors in transmitted frames:

  1. Simple Parity Check: A parity bit is added to the frame for error detection. It is of two types- odd parity checking and even parity checking. In odd parity checking, the parity bit is set to 0 if data contains an odd number of 1s and set to 1 if data contains an even number of 1s. While in even parity checking, the parity bit is set to 1 if data contains an odd number of 1s and set to 0 if data contains an even number of 1s. Here, parity bits form the part of the frame as FCS code.
  2. Two-dimensional Parity Check: Parity bits are calculated for each row and each column and appended to the data frame. Calculation of parity bits for individual rows or columns is similar to a simple parity check. In this technique, the combination of the parity bits of all rows and columns forms the FCS code.
  3. Checksum: Data is divided into multiple segments and all the segments are added using 1s complement arithmetic and obtained sum is complemented to get the checksum. The checksum is sent along with other segments to the destination and at the receiver end sum of all the segments is calculated using 1’s complement and then obtained sum is complemented. If the final result is zero then the transmission is considered successful else the frame is discarded. Sometimes, the checksum is considered as FCS code for the CRC error detection algorithm.
  4. Cyclic Redundancy Check (CRC): A sequence of redundant bits is added to the end of the data unit so that the resulting data is exactly divisible by a predetermined binary number. These bits are called cyclic redundancy check bits. At the receiver end, data is divided by that predetermined number and if the remainder comes out to be 0 then the frame is accepted else it is discarded. In this algorithm, cyclic redundancy bits are considered as FCS bits.

Working:

Data often gets corrupted while transmission hence frame check sequence is appended to the end of the frame while transmission. FCS is calculated by using any error detection techniques such as parity checking, checksum, etc. At the destination, FCS is again calculated by following the same technique that was used to generate FCS at the sender’s site. Then the result is compared with FCS bits present in the data frame and if both of them are the same then the frame is accepted and transmission is considered successful else the frame is discarded assuming some error has occurred while transmission.

For example, suppose there are two devices within a network say A and B, and follows TCP protocol. A wants to send some data to B in such a way that corrupted frames are not accepted by B and communication is error-free. So, A divides the data of each frame in some segments of size m and calculates the checksum by summing up all the segments using 1’s complement and appending it to the end of each frame, and then transmits the frame. Now, B will calculate the running sum of the frame along with FCS bits using 1’s complement and if the sum comes out to be zero then the frame will be accepted by B else it will be discarded. Since the network is following TCP protocol A can retransmit the corrupted frames in case of failure detection. This way communication will be more efficient as no error will lead to inconsistency in communication.


Similar Reads

Token Ring frame format
Prerequisite – Ethernet Frame Format Topology - Ring topology Transmission - Unidirectional Encoding - Differential Manchester encoding Access control - Token passing Data rates - 4 Mbps, 16 Mbps Token Ring Frame format: Start frame delimiter (SFD) - Alerts each station for the arrival of token(or data frame) or start of the frame. It is used to sy
2 min read
What is Minimum Ethernet Frame Size?
The minimum size of an Ethernet frame is 64 bytes. The Ethernet protocol is responsible for Network Interface Card (NIC) to Network Interface Card (NIC) communication of hosts on the same network. It is a protocol of the Layer 1 (Physical Layer) and Layer 2 (Datalink Layer) of the OSI Reference Model. The Ethernet Protocol is used for NIC-to-NIC co
4 min read
IEEE 802.11 Mac Frame
Prerequisite – Basics of Wi-fi MAC layer provides functionality for several tasks like control medium access, can also offer support for roaming, authentication, and power conservation. The basic services provided by MAC are the mandatory asynchronous data service and optional time-bounded service. IEEE 802.11 defines two MAC sub-layers:- Distribut
5 min read
Difference between Frame Relay and ATM
Frame Relay: Frame Relay is that the transmission mode during which information is transferred through electric circuit layer, within the style of packets. It provides the information speed from sixty four Kbps to forty five Mbps. Frame relay has variable packet size. It doesn't give error management and flow management. The responsibility of frame
1 min read
Comparison between X.25 and Frame Relay
X.25 : It is a standard ITU-T standard protocol.It consists of PSE packet switching exchange nodes.X.25 model is based on traditional telephony concept. Frame Relay : It is a packet switching telecommunication used for efficient data transfer which speeds up the transmission.It is used to connect LAN with public wide area networks. Difference betwe
1 min read
Difference between Inter and Intra Frame Compression
In Compression, we reduce the size of our data to achieve high efficiency and easy storage. It is quite cumbersome to transfer files having large size so we need to compress it. Compressed file takes less time for data transmission and reduce the cost of storage. Compression Ratio = B1 / B2 where, B1 = Total Numbers of bits required to represent da
2 min read
Basic Frame Structure of HDLC
High-Level Data Link Control (HDLC) generally uses term “frame” to indicate and represent an entity of data or a protocol of data unit often transmitted or transferred from one station to another station. Each and every frame on link should begin and end with Flag Sequence Field (F). Each of frames in HDLC includes mainly six fields. It begins with
4 min read
Basic Frame Structure of SDLC
Synchronous Data Link Control (SDLC) is generally linked layer protocol that is used with Systems Network Architecture (SNA) environment. SNA is proprietary networking architecture of IBM that is developed in 1974. SDLC also supports huge variety of typologies and different types of data links. Examples include point-to-point links, multipoint link
3 min read
Link Access Procedure Balanced (LAPB) Frame Types
Link Access Procedure, Balanced (LAPB) is protocol that is usually required for data link layer. It is version of High-Level Data Link Control (HDLC) in Asynchronous Balanced Mode (ABM). LAPB use of P/F bit is somewhere different from all of the other protocols. LAPB basically uses three types of data frames. Each of these frames has different func
4 min read
Link Access Procedure, Balanced (LAPB) Frame Format
Link Access Procedure, Balanced (LAPB) is basically a layer 2 protocol that is required in many control protocols like X.25. It was developed by ITU-T, OF Link Access Procedure (LAP) that itself comes from High-Level Data Link Control (HDLC). It runs at Layer 2 i.e. Data Link Layer (DLL) of the OSI Model. It is generally a balanced protocol that us
3 min read