faq.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Frequently Asked Questions
  2. ==========================
  3. .. _faq-dns:
  4. DNS does not work on the nodes
  5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. Gluon nodes will ignore the DNS server on the WAN port for everything except
  7. the mesh VPN, which can lead to confusion.
  8. All normal services on the nodes exclusively use the DNS server on the mesh
  9. interface. This DNS server must be announced in router advertisements (using
  10. *radvd* or a similar software) from one or more central servers in meshes based
  11. on *batman-adv*. If your mesh does not have global IPv6 connectivity, you can setup
  12. your *radvd* not to announce a default route by setting the *default lifetime* to 0;
  13. in this case, the *radvd* is only used to announce the DNS server.
  14. .. _faq-mtu:
  15. What is a good MTU on the mesh-vpn
  16. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  17. Setting the MTU on the transport interface requires careful consideration, as
  18. setting it too low will cause excessive fragmentation and setting it too high
  19. may leave peers with a broken tunnel due to packet loss.
  20. Consider these key values:
  21. - Payload: Allow for the transport of IPv6 packets, by adhering to the minimum MTU
  22. of 1280 Byte specified in RFC 2460
  23. - and configure `MSS clamping`_ accordingly,
  24. - and announce your link MTU via Router Advertisments and DHCP
  25. .. _MSS clamping: http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.cookbook.mtu-mss.html
  26. - Encapsulation: Account for the overhead created by the configured mesh protocol
  27. encapsulating the payload, which is
  28. - up to 32 Byte (14 Byte Ethernet + 18 Byte batadv) for batman-adv compat v15 (v2014.0 and later)
  29. - up to 28 Byte (14 Byte Ethernet + 14 Byte batadv) for batman-adv compat v14 (v2011.3.0 until and including v2013.4.0)
  30. - PMTU: What MTU does the path between your gateway and each of its peers support?
  31. For reference, the complete MTU stack looks like this:
  32. .. image:: mtu-diagram_v5.png
  33. Minimum MTU
  34. -----------
  35. Calculcate the minimum transport MTU by adding the encapsulation overhead to the
  36. minimum payload MTU required. This is the lowest recommended value, since going
  37. lower would cause unnecessary fragmentation for clients which respect the announced
  38. link MTU.
  39. Example: Our network currently uses batman-adv v15, it therefore requires up
  40. to 32 Bytes of encapsulation overhead on top of the minimal link MTU required for
  41. transporting IPv6.::
  42. \ 1312 1294 1280 0
  43. \---------+-----------------+-------------+----------------------------------+
  44. \TAP | batadv v15 | Ethernet | Payload |
  45. \-------+-----------------+-------------+----------------------------------+
  46. \ ^
  47. |
  48. MTU_LOW = 1280 Byte + 14 Byte + 18 Byte = 1312 Byte
  49. Maximum MTU
  50. -----------
  51. Calculating the maximum transport MTU is interesting, because it increases the
  52. throughput, by allowing larger payloads to be transported, but also more difficult
  53. as you have to take into account the tunneling overhead and each peers PMTU, which
  54. varies between providers.
  55. The underlying reasons are mostly PPPoE, Tunneling and IPv6 transition technologies
  56. like DS-Lite.
  57. Example: The peer with the smallest MTU on your network is behind DS-Lite and can
  58. transport IPv4 packets up to 1436 Bytes in size. Your tunnel uses IPv4 (20 Byte),
  59. UDP (8 Byte), Fastd (24 byte) and you require TAP (14 Byte) for Layer 2 (Ethernet)
  60. Tunneling.::
  61. 1436 1416 1408 1384 1370 \
  62. +-------------------+--------+-----------------------+-------------+------\
  63. | IP | UDP | Fastd | TAP | bat\
  64. +-------------------+--------+-----------------------+-------------+--------\
  65. ^ \
  66. |
  67. MTU_HIGH = 1436 Byte - 20 Byte - 8 Byte - 24 Byte - 14 Byte = 1370 Byte
  68. Conclusion
  69. ----------
  70. Determining the maximum MTU can be a tedious process, especially since the PMTU
  71. of peers could change at any time. The general recommendation for maximized
  72. compatibility is therefore the minimum MTU of 1312 Byte, which works well with
  73. all combinations of IPv4, IPv6, batman-adv compat v14 and v15.