Re: detecting undelivered packets?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 12, 2002 at 11:35:39PM +0900, Jonathan Khoo wrote:
> Pardon me if this has been asked before, but how can I detect packets
> that failed to reach their destination (eg. loss of wireless coverage)?
> 
>  Host-A		Host-B
>    |
>    +-------> X 
> 
> I tried the DEST_UNREACH for icmp, but it doesn't seem to be the right
> place.

This is a difficult problem.

I'm going to assume you are talking about IPv4 as it is really the only
protocol suite I know with any familiarity; IPv6, IPX, Netatalk, Xerox,
X.25, whatever else you might be trying to deal with, you'll have to go
elsewhere. :)

The only _real_ way to know if a specific packet X did not reach its
destination B is if B knew the packet was coming, and eventually sends a
packet to A saying that the expected packet X hasn't yet arrived. This
packet might get lost. :)

IP does not provide this. The UDP protocol layered above IP does not
provide this. The TCP protocol layered about IP does not provide this,
but it does give some heuristic information that in practice seems to
work pretty well. Assume A sends packets X, Y and Z to B, in that order.
Also assume that the tcp session has been established.

If Y arrives before X, B will send to A the last known good sequence
number. A is supposed to take that as a hint that packet X has not yet
arrived. Similar happens if X and Z arrive fine, but Y does not. There
is no indication sent back if X and Y arrive fine and Z does not; B will
send nothing back, unless TCP keepalive is being used or the protocol
being used on top of TCP notices something funny going on and sending
back requests for more packets. Similar happens if none of X, Y, Z
arrive at B.

I don't think there is any error-recovery on ICMP packets.

In short -- I'm not sure if what you are trying to do is possible. But
I'd be willing to entertain conversation about what you are trying to
accomplish. :)

-- 
http://immunix.org/

Attachment: pgp00097.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux