Re: IP: optimize as a router not host

Rogier Wolff (r.e.wolff@et.tudelft.nl)
Mon, 18 Mar 1996 11:06:49 +0100


Ulrich Windl wrote:
>
> On 18 Mar 96 at 0:55, root wrote:
>
> > > On 16 Mar 96 at 7:13, Herbert Rosmanith wrote:
> > > > reading about "IP: optimize as a router not host" says, that this will
> > > > turn off checksum calculation. couldn't this be done automatically,
> > > > i.e. for any packet that is known to be routed, don't perform checksum
> > > > calculus, while any other packet, that directly addresses this host,
> > > > will be checksummed (e.g. any address that contains one of our
> > > > interface addresses in the dest field).
> > > In case of a bad checksum, wouldn't it be better for the router to
> > > discard/reject the packet as compared to forward it. In the latter
> > > case an other version of that packet will pass the router again (if
> > > the logical endpoint of the VC (virtual connection) complained).
> >
> > No. If the endpoint gets a bad checksum, it can request the packet again
> > immediately.
>
> Yes, but the router will send out the bad (received) packet to the
> endpoint, the endpoint will complain and return an error through the
> router, the other endpoint will have to resend, the router will have
> to route it one more time,...
>
> Can't the ROUTER compain about bad packets and return a NAK (or
> whatever) to the sender?

There is no NAK in TCP/IP. A workaround is that you ACK whatever
you've got untill that moment to indicate to the sender that you
got something that didn't make sense.

Lets make this clear with an example:

Suppose a sender sends packets 1,2,3,4 and 5. At the recieving end
you get 1,2,4,5. What you do is you ack that you got packet 1 and two.
When you get 4 and 5 you ack that you got 2 again and again. When a
sender gets these it is supposed to conclude that packet 3 got lost
and try resending that.

If packet 3 arrives with a bad checksum, it should be treated the same
way. If a router intercepts a bad packet, it doesn't know wether or
not packet 2 got delivered to the destination correctly or not.

In short only the endpoint can determine the correct action to take
when a bad-checksum-packet arrives....

(maintaining a table of active connections through the router and
recording the state of all those is unfeasable: we have a linux-router
here that has thousands of active connections going through it.)

Read "TCP/IP illustrated volume 1" by W. Richard Stevens if you want
to know more about this......

Roger

-- 
 ** Q: What's the difference between MicroSoft Windows and a virus?       **
 ** A: Apart from the fact that virusses are supported by their authors,  **
 **  use optimized, small code and usually perform well, none.            **
 ** EMail: R.E.Wolff@et.tudelft.nl * Tel +31-15-2783643 or +31-15-2137459 **
 *** <a href="http://einstein.et.tudelft.nl/~wolff/">my own homepage</a> ***