Networking Forums

Networking Forums > Computer Networking > Linux Networking > Questions about UDP datagram loss

Reply
Thread Tools Display Modes

Questions about UDP datagram loss

 
 
Mike
Guest
Posts: n/a

 
      03-07-2005, 01:01 PM
Hi,

I have a question about the loss of UDP datagrams.


System setup like below. No other network connections, only the
crossover between the two systems. The two systems have the same
hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).

/-------------\ Crossover /-------------\
| System A | <------------> | System B |
| 192.168.0.1 | Cable | 192.168.0.2 |
\-------------/ 100MB/s \-------------/

If I have a test program to send UPD datagrams across this connection,
assuming I am not overloading the link, should I expect any datagram
loss?

Thanks,
Mike

 
Reply With Quote
 
 
 
 
Phil Frisbie, Jr.
Guest
Posts: n/a

 
      03-07-2005, 04:36 PM
Mike wrote:

> Hi,
>
> I have a question about the loss of UDP datagrams.
>
>
> System setup like below. No other network connections, only the
> crossover between the two systems. The two systems have the same
> hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).
>
> /-------------\ Crossover /-------------\
> | System A | <------------> | System B |
> | 192.168.0.1 | Cable | 192.168.0.2 |
> \-------------/ 100MB/s \-------------/
>
> If I have a test program to send UPD datagrams across this connection,
> assuming I am not overloading the link, should I expect any datagram
> loss?


Yes, with UDP you MUST expect lost packets and provide code to deal with them.

Not overloading the link has nothing to do with lost packets; timing is
everything. For example, if the sender sends a burst of packets faster than the
link layer can handle and the send buffer fills up then packets will be silently
dropped. Or if the receiving thread gets delayed due to a momentary spike in CPU
activity and cannot receive the packets fast enough and the receive buffer fills
up packets will be discarded.

> Thanks,
> Mike


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-07-2005, 04:39 PM
Mike wrote:
> Hi,
>
> I have a question about the loss of UDP datagrams.
>
>
> System setup like below. No other network connections, only the
> crossover between the two systems. The two systems have the same
> hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).
>
> /-------------\ Crossover /-------------\
> | System A | <------------> | System B |
> | 192.168.0.1 | Cable | 192.168.0.2 |
> \-------------/ 100MB/s \-------------/
>
> If I have a test program to send UPD datagrams across this connection,
> assuming I am not overloading the link, should I expect any datagram
> loss?
>


Hardly any, if the link is physically sound, and the receiving
thread/process is able to cope with the transmit rate.

But, please do not base your protocol on not missing
any datagrams.

The situation is pretty near with TFTP booting, and it
pretty often succeeds.

--

Tauno Voipio
tauno voipio (at) iki fi


 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      03-07-2005, 05:16 PM
Mike <(E-Mail Removed)> wrote:
> System setup like below. No other network connections, only the
> crossover between the two systems. The two systems have the same
> hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).


> /-------------\ Crossover /-------------\
> | System A | <------------> | System B |
> | 192.168.0.1 | Cable | 192.168.0.2 |
> \-------------/ 100MB/s \-------------/


> If I have a test program to send UPD datagrams across this connection,
> assuming I am not overloading the link, should I expect any datagram
> loss?


Yes. Not because you necessarily will see any, but because once you
ass-u-me you will not, you will.

Or, some time in the future, someone will want to use what you are
doing in some slightly different way and it will fall to peices. No
matter how unlikely it seems today.

Also, a link has a given bit error rate, which means that you need to
ass-u-me that on average that many bits _will_ be corrupted and
(hopefully I suppose) dropped by the FCS at the link-layer or the
checksum at UDP.

From time to time, the receving application, perhaps through no fault
of its own, will be context switched-out and not read for a bit. That
may be a problem, it may not.

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
 
Reply With Quote
 
Steve Horsley
Guest
Posts: n/a

 
      03-07-2005, 07:05 PM
Mike wrote:
> Hi,
>
> I have a question about the loss of UDP datagrams.
>
>
> System setup like below. No other network connections, only the
> crossover between the two systems. The two systems have the same
> hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).
>
> /-------------\ Crossover /-------------\
> | System A | <------------> | System B |
> | 192.168.0.1 | Cable | 192.168.0.2 |
> \-------------/ 100MB/s \-------------/
>
> If I have a test program to send UPD datagrams across this connection,
> assuming I am not overloading the link, should I expect any datagram
> loss?
>
> Thanks,
> Mike
>


I would suggest that your test program should be strict, and
expect very few lost packets. You could reasonably regard
one lost packet as a test failure.

Your actual application should be able to survive a moderate
rate of packet loss (maybe 10% would be a good target)
though, just because lost packets do occasionally happen,
due to light switches, distant lightning, cosmic rays,
malicious gremlins and even unexpected changes in wind
direction.

Steve
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      03-07-2005, 08:58 PM

"Mike" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> I have a question about the loss of UDP datagrams.


> System setup like below. No other network connections, only the
> crossover between the two systems. The two systems have the same
> hardware (memory, nics, SCSI controllers, etc) and OS (RHEL ES 4.0).
>
> /-------------\ Crossover /-------------\
> | System A | <------------> | System B |
> | 192.168.0.1 | Cable | 192.168.0.2 |
> \-------------/ 100MB/s \-------------/
>
> If I have a test program to send UPD datagrams across this connection,
> assuming I am not overloading the link, should I expect any datagram
> loss?


If and only if your test program can properly space out the packets to
ensure the link is never instantaneously overloaded, you should see very,
very little packet loss.

DS


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLOCK_MONOTONIC datagram timestamps by the kernel Spoon Linux Networking 0 02-24-2007 05:06 PM
datagram queue? Jonathan Ellis Linux Networking 0 08-04-2005 11:33 PM
Sending datagram in raw socket Vicky Linux Networking 0 10-25-2004 10:25 AM
Building and sending raw datagram Vicky Linux Networking 1 10-23-2004 02:38 AM
max udp datagram size Artem Baguinski Linux Networking 6 02-20-2004 05:14 PM



1 2 3 4 5 6 7 8 9 10 11