[e2e] MTU of a loopback interface?

David Borman dab at BSDI.COM
Thu May 3 12:57:57 PDT 2001


Jeffrey,

In the typical BSD networking stack, the upper layers need information
about how large of packet it is allowed to send to the interface.  The
loopback driver is just another interface, and so to avoid having to
special case it, you need to have an MTU.

Now, what value that MTU should be is undefined.  On many systems
it is 1500 bytes, to match the MTU on the ethernet interfaces.  But
there is no reason it has to be that value.  For example, on BSD/OS,
the MTU of the loopback interface defaults to 4352 (4K+256), but it
can be easily changed via "ifconfig lo0 mtu nnnn" where nnnn is the
new MTU value.

This question also applies to real interfaces that do not have an MTU
imposed by the hardware, HIPPI being one such example.

For IPv4, since the maximum packet size is 64K, you will effectivly
ignore the MTU by setting it to 64K or larger.

			-David Borman, dab at bsdi.com

> From: "Jeffrey A. Six" <six at mail.eecis.udel.edu>
> To: end2end-interest at postel.org
> Subject: [e2e] MTU of a loopback interface?
> Date: Thu, 3 May 2001 15:30:25 -0400
>
> e2e,
>
> Me and a colleague have been having a discussion about why loopback
> interfaces have an MTU.  Is this done for any particular reason?  If the
> data being send/received is never actually put on the wire (or other
> physical layer), why does the link layer provide a link layer MTU?  I fail
> to see a reason for this.  Also, if there is such a MTU, how is the value
> determined?  Is this just an implementation issue for those implementing the
> loopback interface code?  What design criteria would go into this
> determination?
>
> Thanks,
> -j6
>
> ---------------------------------------------------------------------
> Jeffrey A. Six
> University of Delaware                jeffsix at udel.edu
> Computer & Information Sciences       http://www.eecis.udel.edu/~six
> Electrical & Computer Engineering
>
> "I build circuits everyday.  I don't know how they work, but. . ."



More information about the end2end-interest mailing list