2

Why we need pseudo header when calculating the layer 4 protocol checksum ?

Because in layer 3 we already have a checksum to calculate only the layer 3 header checksum, and why we also need to including the pseudo header in layer 4 checksum calculation ?

1
  • "in layer 3 we already have a checksum to calculate only the layer 3 header checksum" For IPv4, but IPv6 has eliminated the IP header checksum. Commented Feb 13 at 13:42

1 Answer 1

4

See RFC 9293:

Including the pseudo-header in the checksum gives the TCP connection protection against misrouted segments. This information is carried in IP headers and is transferred across the TCP/network interface in the arguments or results of calls by the TCP implementation on the IP layer.

For completeness: the pseudo checksum method is a specialty of some transport protocols, no general L4 thing.

3
  • 1
    udp uses the same pseudo-header, Commented Feb 18 at 19:51
  • @PeterGreen Jeez - how could I forget? Commented Feb 18 at 20:10
  • For UDP, it is optional in IPv4, but required for IPv6. Commented Feb 18 at 20:19

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.