From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa751,9eacd4f8141cdf02 X-Google-Attributes: gidfa751,public X-Google-Thread: 100159,9eacd4f8141cdf02 X-Google-Attributes: gid100159,public X-Google-Thread: 10d52b,9eacd4f8141cdf02 X-Google-Attributes: gid10d52b,public X-Google-Thread: 10d752,9eacd4f8141cdf02 X-Google-Attributes: gid10d752,public X-Google-Thread: 10996c,9eacd4f8141cdf02 X-Google-Attributes: gid10996c,public X-Google-Thread: 1164f8,9eacd4f8141cdf02 X-Google-Attributes: gid1164f8,public X-Google-Thread: f9325,9eacd4f8141cdf02 X-Google-Attributes: gidf9325,public X-Google-Thread: fa970,9eacd4f8141cdf02 X-Google-Attributes: gidfa970,public From: pete@stl.nexen.com (Pete Flugstad) Subject: Re: High Speed TCP/IP Data Needed Date: 1996/05/03 Message-ID: #1/1 X-Deja-AN: 152794914 references: <31865FBD.16F1@auc.trw.com> <4mbvb1$5un@duck.inetnebr.com> organization: Ascom Nexion, Inc. newsgroups: comp.dcom.cell-relay,comp.protocols.tcp-ip,comp.sys.sgi.hardware,comp.sys.sgi.misc,comp.sys.convex,comp.sys.dec,comp.sys.hp.hardware,comp.sys.hp.misc,comp.sys.sun.hardware,comp.sys.sun.misc From: sparc@inetnebr.com (Justin Hannah) > It is much faster because it is not a "guarnteed" packet delivery > system. That means, if packets get out of order (usually via the > internet or by using routers) they come in out of order. Also, there > is no real checksum or any other types of error correction done. > > I think the headers on UDP packets are something like 12 bytes. It is > the simplest IP protocol and therefore the fastest. Since it wasn't > meant for routing, such things as a TTL counter aren't bothered with > and don't take CPU speed or bandwidth away. Actually, it's 8 bytes, from rfc768: 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | Source | Destination | | Port | Port | +--------+--------+--------+--------+ | | | | Length | Checksum | +--------+--------+--------+--------+ | | data octets ... +---------------- ... The checksum is on the (pseudo IP) /UDP header only, so there is no protection for the data. > My tech descriptions might be a little off, but generally what I am > tring to say is that UDP is better for high speed point to point > connections and it is implemented in just about every IP system out > there. Have fun! The strength/weaknes with UDP is that it is very simple, and is very "best effort". My experience is that on a lightly loaded network, it's perfectly fine, and can often be pretty reliable, and as noted above, very light-weight. The problems start to occur when you try to run a "UDP stream" through a router, or onto a moderately loaded machine. I belive that routers discard UDP traffic preferentially to TCP packets, so that you're much more likely to see significant loss. Also, I believe the same is true of most IP stacks, such that if the machine is receiving a good number of IP packets, UDP packets will be discarded first. But, if UDP is run over pt-pt links with low loss, and sufficiently fast machines, it probably would be a better choice than TCP. I *think* it will also allow you to have larger packets than TCP. I seem to recall TCP will generally segment the data into max 512 byte "segments" (is this tuneable?). UDP doesn't segment at all (IP does), so if you send large packets, you generally get the benefit of them. Finally, a note. It's very easy to completely saturate a network with UDP packets, so be careful. If one machine is sending a high speed stream of UDP packets to another machine that is not ready for it, this will easily saturate the network, and pretty much make the receiving machine unusable (interesting denial of service attack) as it spends all it's time receiving the UDP packets and discarding them. I did this accidentially (:-) between a couple of Suns, and it is likely dependant on how good a particular OS's IP stack is. Pete -- Peter J. Flugstad Ascom Nexion pete@stl.nexen.com 1807 Park 270 Drive, Suite 350 +1 314 579 6520 St. Louis, MO 63146 USA #include #include