Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jul 2003 16:10:12 +0200
From:      Francesco Casadei <fcasadei@inwind.it>
To:        freebsd-questions mailing list <freebsd-questions@freebsd.org>
Subject:   PPTP link and MTU
Message-ID:  <20030716141012.GA1372@goku.kasby>

next in thread | raw e-mail | index | archive | help

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

    By default mpd sets an MTU of 1500 bytes, but for a PPTP link type
this value is too high, because as stated in the manual:

=2E..
  However, mpd does not account for overhead that occurs ``outside'' of
  the PPP frame. For example, when using link types such as PPTP that
  encapsulate PPP frames within IP packets, a large outgoing ``inner'' IP
  packet can result in a fragmented ``outer'' IP packet, resulting in
  suboptimal performance. In this situation it may be useful to set the
  link MTU to a lower value to avoid fragmentation.
=2E..
=20
    Actually, if I leave the default value for MTU in mpd.conf I'm able
to ping, query the DNS and view only very small web pages. Thus, I need
to set the MTU to a lower value. But, what's the 'best' choice for this
value?

    I've read that (FAQ 14.26) "It should be a string with a value
``1436'', as some ADSL routers are reported to be unable to deal with
packets larger than this". But, PPTP encapsulate PPP frames whithin IP
packets:

------------------------------------------------------------------
| PPP header | IP header | PPP header | IP header | ...    ...   |
------------------------------------------------------------------
             ^                        ^                          ^
             |                        |- payload of 2nd frame -- |
             |                                                   |
             |------------- payload of the 1st frame ------------|


    First payload goes through ed0 interface which has an MTU of 1500
bytes, so the payload size of first frame must by 1500 bytes. This means
that the size of second payload must be 1500 minus 60 (i.e. max ip header
length) minus max length of PPP header. If we consider ALL fields of PPP
frame except the payload, the result of previous expression is 1430
(1432 with a 2 byte checksum).

    I've also considered subtracting only the IP header size, i.e. an
MTU of 1440 bytes and with this value the connecion seems to work
properly.

    Now the question is: which is the largest value for the MTU of a
PPTP link such that it does not cause IP fragmentation?

		Francesco Casadei
--=20
You can download my public key from http://digilander.libero.it/fcasadei/
or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...)

Key fingerprint is: 1671 9A23 ACB4 520A E7EE  00B0 7EC3 375F 164E B17B


--Nq2Wo0NMKNjxTN9z
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/FVzEfsM3XxZOsXsRAnJ6AKC1Sfs3qx3VakqL6qHK245mY4dU5QCePn0R
434GveoZ470o+DWo8Q3HcTs=
=e8sv
-----END PGP SIGNATURE-----

--Nq2Wo0NMKNjxTN9z--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030716141012.GA1372>