3

We know that IP/TCP has checksum mechanism to guarantee communication reliability.

However, when a IP/TCP packet is relayed by router or NAT, the IP header may be modified, if if the router/NAT doesn't modify the IP header checksum and TCP header checksum, when the package arrives the destination node, the IP/TCP stack of that node will refuse to accept the packet.

So my question is, do router/NAT modify IP/TCP header checksum when they are relaying packets?

1 Answer 1

3

Yes. NATs modify both, and routers only modify the IP header checksum.

2
  • does each router/NAT check the IP/TCP header checksum before it relays the packet?
    – misteryes
    May 24, 2013 at 14:27
  • Routers aren't supposed to know or care about higher layers, so they only check the IP header checksum. NATs may check both, but some NAT implementations might modify the checksum without seeing if it's good first. So if the checksum were, say, off by 4, it would still be off by 4 after NAT had been done to it.
    – Spiff
    May 24, 2013 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .