[MUD-Dev] Transport layer (UDP vs TCP)
Jon Leonard
jleonard at divcom.umop-ap.com
Wed Mar 18 09:43:42 CET 1998
On Tue, Mar 17, 1998 at 09:24:34PM +0000, Ben Greear wrote:
> On Tue, 17 Mar 1998, Jon Leonard wrote:
> > On Tue, Mar 17, 1998 at 10:58:58AM +0000, Niklas Elmqvist wrote:
> > > > The question is, what is the packet size (max) that UDP can handle?
[snip]
> > It's likely more complicated than that. The maximum size of a UDP packet
> > is about the maximum size of an IP datagram (quite large). Realisticly,
> > though, you want largest packet that won't get broken up into fragments.
> >
> > The largest non-fragmenting packet (MTU = Maximum Transfer Unit) depends
> > on the networks involved. For Ethernet, it's about 1500 bytes. Most high
> > speed networks have larger maxima, but you could see almost anything.
>
> I'm definately looking for the MTU. The whole point would be to ensure
> that each packet arrived all at once, and was complete by itself. I
> think I can fit them into 512 bytes easily. If I need to send larger
> packets I can always chunk them over the tcp connection.
That'd work fine. I still think it's not that much more work to track
the largest packets that made it, though.
> > A search for "MTU discovery" should probably find something on how some
> > TCP implementations figure out what the optimal packet size is. Anyone
> > seriously considering a UDP tranport protocol should write something similar.
> > The basic idea is set the "don't fragment" bit, and play with packet size
> > until you find out what works.
>
> I was mostly hoping that someone had a good 'working maximum' that they
> had used with success. However, most MUD's would deal wrather poorly
> with a lossy protocol, so there may not be much experience with UDP
> in the mud community....
In many ways, an easier question. Most of the networks you need to worry
about are ethernet or can handle ethernet-sized packets. So your maximum
packet size should be 1500 minus a margin for IP headers. If you can fit
into 512 bytes, that'd be fine.
You'll lose more clients due to firewalls that block UDP than you will to
strange networks. Be prepared for re-assembled packets, though -- the
last hop may be a noisy PPP session that fragments, for example.
Jon Leonard
More information about the mud-dev-archive
mailing list