-1

In a CRC (Cyclic Redundancy Check), usually two nodes agree on an r+1 bit generator. This r is usually 32, and is configured in devices (routers). What happens if two routers have different r bit generators configured (for example one router has a 16-bit generator configured and another has a 32-bit generator configured)? How do they agree upon which generators to use?

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
Anuja
  • 27
  • 3
  • 2
    Checksum computation is defined by RFC. Start with _[RFC 1071, Computing the Internet Checksum](https://tools.ietf.org/html/rfc1071)_, then look at _[RFC 1624, Computation of the Internet Checksum via Incremental Update](https://tools.ietf.org/html/rfc1624)_. – Ron Maupin Apr 11 '18 at 14:52
  • This question is off topic here - it's not programming related. – Alnitak Apr 11 '18 at 20:59

1 Answers1

0

They agree in a standards document written by a committee. See section 3.2.9 in this ethernet standards document for the link layer.

It's more than just the number of bits. They had to agree on the polynomial, the bit ordering, the initial value, and the post processing. It's all there.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • 1
    The question was about routers, and ethernet isn't routed, which is why I referred to the RFCs, not the ethernet standard. – Ron Maupin Apr 11 '18 at 18:46
  • Those RFCs are about a checksum, literally an integer sum, not a CRC. – Mark Adler Apr 11 '18 at 20:41
  • @RonMaupin Also you seem to be assuming that the questioner knows what they're talking about, and that they are asking specifically about the OSI Network Layer. In fact it appears that they are asking about data transport devices in general, proceeding to refer to all of them on any level as a "router". – Mark Adler Apr 11 '18 at 20:57
  • 1
    @Alnitak I leave the policing to those who enjoy that sort of thing. My only objective is to try to be helpful. – Mark Adler Apr 11 '18 at 22:13
  • @MarkAdler Are the devices backward compatible in the sense that if one device has 16bit crc generator configured while other device has 32 bit configured...will the device with 32 bit crc use 16 bit crc instead? And how does this happen? – Anuja Apr 12 '18 at 12:04
  • What protocol in particular are you referring to? – Mark Adler Apr 12 '18 at 15:37
  • In implementation of crc in data link layer. – Anuja Apr 12 '18 at 17:19
  • If you mean ethernet, there is only a CRC-32 frame check. I see no mention of a 16-bit CRC. – Mark Adler Apr 12 '18 at 19:28