Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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

share|improve this answer
does each router/NAT check the IP/TCP header checksum before it relays the packet? – misteryes May 24 '13 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 '13 at 14:33

You must log in to answer this question.

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