Re: Lost UPD Packets with no network



prabhu.pravin@xxxxxxxxx writes:
> I use an application which has one module in Windows and another
> in Unix. The windows and Unix machines are connected via a cross cable.
> The Windows and Unix modules communicate via UDP packet transfer.
> My problem is that , even though there is no network involved, i
> lose some udp packets during transfer, due to which one of my module
> hangs waiting for data.

Yes, there's a network. That's the wire between the two machines.
It's not a big network, nor an internetwork, but it's still a network
connection.

> Any suggestions on why this could be happening?

Sure. The primary reason is that UDP provides no flow control
whatsoever. If your application overruns either the local network
stack or (more likely) the capacity of the link, then there'll be
silent drops.

It's also possible to be hit by electrical noise that garbles the
packet in flight. Neither Ethernet, nor IP, nor UDP will retransmit a
packet that fails in this manner. It will just silently disappear.
Even if you could somehow "fix" the flow control problem described
above, this issue would make your application unreliable.

If your application uses UDP and doesn't accomodate occasional packet
loss, reordering, and duplication, then your application isn't coded
correctly to use UDP. Applications using UDP must do their own error
control.

If you don't want to do that, then your choices are TCP and (in
Solaris 10 and up) SCTP.

--
James Carlson, KISS Network <james.d.carlson@xxxxxxx>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
.



Relevant Pages

  • Re: recvfrom() strange operation
    ... no matter what your network looks ... discover packet loss, partially loss and joinde packet and octett ... And the most important sfrtp working fine over TCP or UDP ... "frames" (or whatever you are calling your higher layer protocol ...
    (comp.os.linux.development.system)
  • Re: NTP client basic
    ... NTP is transported in UDP packets but UDP isn't aware of that. ... There is no law which says UDP must not repeat ... has been received by the recipient of the packet. ... You *can* deduce that the network should never repeat since there is ...
    (comp.protocols.time.ntp)
  • Re: recvfrom() strange operation
    ... element) crossing UDP message boundaries. ... have to have escape characters to mark your frame boundaries. ... read packet as octett only as packet. ... network UDP has more disadvantege then advantage. ...
    (comp.os.linux.development.system)
  • Re: Lost UPD Packets with no network
    ... The windows and Unix machines are connected via a cross cable. ... >> The Windows and Unix modules communicate via UDP packet transfer. ... > Yes, there's a network. ...
    (comp.unix.solaris)
  • Re: Determining if it is "safe" to send UDP packets
    ... for receiving Udp data. ... I'm receiving from a camera lines of data at 55 Hz. ... the next packet hits the wire. ... Another problem with TCP is its assumption that a lost packet is due to ...
    (microsoft.public.win32.programmer.kernel)