[comp.protocols.tcp-ip] Pseudo headers in TCP/UDP checksum -- Why?

kiernan@sham.berkeley.edu (Mike Kiernan) (02/17/89)

What is the historical reasoning behind including a pseudo header
(IP src/dst addr, proto #, TCP/UDP len) in the TCP/UDP checksums?

The RFCs state:
	This gives the TCP/UDP protection against misrouted segments.

Misrouted segments from the IP level???  I can't buy this...

People have suggested that it is because TCP might be layered on top
of something else (that doesn't checksum its header), but that doesn't
seem likely (adding a header checksum layer makes more sense).

What is the real reason behind the pseudo header?
Do misrouted packets really get through the IP level to the TCP/UDP level?

Mike Kiernan
kiernan@xcf.berkeley.edu

romkey@asylum.SF.CA.US (John Romkey) (02/18/89)

In article <10010@pasteur.Berkeley.EDU> kiernan@sham.berkeley.edu
(Mike Kiernan) doesn't believe that the historical reason for the TCP
pseudoheader is to detect misrouted IP datagrams.

The keyword is "historical". It doesn't matter much now, but when the
first IP implementations were being written, people knew a lot less
about networking and layered protocols, and this was probably an
important consistency check for the first TCP/IP implementations.
-- 
			- john romkey
USENET/UUCP: romkey@asylum.sf.ca.us	Internet: romkey@xx.lcs.mit.edu
"Can you find me soft asylum..." - The Doors

CERF@A.ISI.EDU (02/18/89)

Mike,

We wanted to make sure that we had true end/end (at TCP level)
checking since the IP level passed through gateways as was potentially
modified en route. We didn't want to literally duplicate information
in the TCP header which was carried in the IP header, so we formed
a pseudo header for efficiency (taking some of the IP fields which
were not supposed to change and making them play a part in the
TCP level checking).

Vint Cerf

p.s. This may sound like a "layer crossing violation" but was
just a way of not duplicating header information.