Frame check sequence

A frame check sequence (FCS) is an error-detecting code added to a frame in a communications protocol. Frames are used to send payload data from a source to a destination.

Structure of an Ethernet packet, including the FCS that terminates the Ethernet frame.[1]

Purpose

All frames and the bits, bytes, and fields contained within them, are susceptible to errors from a variety of sources. The FCS field contains a number that is calculated by the source node based on the data in the frame. This number is added to the end of a frame that is sent. When the destination node receives the frame the FCS number is recalculated and compared with the FCS number included in the frame. If the two numbers are different, an error is assumed and the frame is discarded.

The FCS provides error detection only. Error recovery must be performed through separate means. Ethernet, for example, specifies that a damaged frame should be discarded and does not specify any action to cause the frame to be retransmitted. Other protocols, notably the Transmission Control Protocol (TCP), can notice the data loss and initiate retransmission and error recovery.[2]

Implementation

Detailed structure of an Ethernet frame

The FCS is often transmitted in such a way that the receiver can compute a running sum over the entire frame, together with the trailing FCS, expecting to see a fixed result (such as zero) when it is correct. For Ethernet and other IEEE 802 protocols, the standard states that data is sent least significant bit first, while the FCS is sent most significant bit (bit 31) first. An alternative approach is to generate the bit reversal of the FCS so that the reversed FCS can be also sent least significant bit (bit 0) first. Refer to Ethernet frame ยง Frame check sequence for more information.

Types

By far the most popular FCS algorithm is a cyclic redundancy check (CRC), used in Ethernet and other IEEE 802 protocols with 32 bits, in X.25 with 16 or 32 bits, in HDLC with 16 or 32 bits, in Frame Relay with 16 bits,[3] in Point-to-Point Protocol (PPP) with 16 or 32 bits, and in other data link layer protocols.

Protocols of the Internet protocol suite tend to use checksums.[4]

gollark: Guess I'm secretly socialist and in denial!
gollark: > The relatively small, liberal, pro-business, outspoken government juggles the competing demands of Administration, Education, and Industry. Citizens pay a flat income tax of 8.2%.
gollark: > The Free Land of Anrak is a massive, efficient nation, remarkable for its deadly medical pandemics, keen interest in outer space, and absence of drug laws. The hard-nosed, hard-working, democratic population of 2.677 billion Anrakians live in a state of perpetual fear, as a complete breakdown of social order has led to the rise of order through biker gangs.
gollark: I have Notelia, my main one which also seems to have gone socialist because the game seems to like that for some reason, Anrak, where there is literally no law enforcement (but government-provided education if I remember right), and Doemokria, where I do random testing.
gollark: I mostly just answer the issues occasionally on my three nations.

See also

References

  1. "3.1.1 Packet format", 802.3-2012 - IEEE Standard for Ethernet (PDF), IEEE Standards Association, 2012-12-28, retrieved 2015-07-05
  2. Cf: Wendell ODOM, Ccie #1624, Cisco Official Cert Guide, Book 1, Chapter 3: Fundamentals of LANs, Page 74
  3. "Frame Relay Glossary". Cisco Systems. 2009-04-30. Retrieved 2015-07-05.
  4. Computing the Internet Checksum. doi:10.17487/RFC1071. RFC 1071.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.