faq.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. What is a good MTU on the mesh-vpn
  15. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  16. Setting the MTU on the transport interface requires careful consideration, as
  17. setting it too low will cause excessive fragmentation and setting it too high
  18. may leave peers with a broken tunnel due to packet loss.
  19. Consider these key values:
  20. - Payload: Allow for the transport of IPv6 packets, by adhering to the minimum MTU
  21. of 1280 Byte specified in RFC 2460
  22. - and configure `MSS clamping`_ accordingly,
  23. - and announce your link MTU via Router Advertisments and DHCP
  24. .. MSS clamping: http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.cookbook.mtu-mss.html
  25. - Encapsulation: Account for the overhead created by the configured mesh protocol
  26. encapsulating the payload, which is
  27. - up to 32 Byte (14 Byte Ethernet + 18 Byte batadv) for batman-adv compat v15 (v2014.0 and later)
  28. - up to 28 Byte (14 Byte Ethernet + 14 Byte batadv) for batman-adv compat v14 (v2011.3.0 until and including v2013.4.0)
  29. - PMTU: What MTU does the path between your gateway and each of its peers support?
  30. For reference, the complete MTU stack looks like this:
  31. .. image:: https://cloud.hamburg.freifunk.net/thumbnail/de738ee3ac/1024/MTU%20within%20a%20batman-adv%20network%20v5.png
  32. Minimum MTU
  33. -----------
  34. Calculcate the minimum transport MTU by adding the encapsulation overhead to the
  35. minimum payload MTU required. This is the lowest recommended value, since going
  36. lower would cause unnecessary fragmentation for clients which respect the announced
  37. link MTU.
  38. Example: Our network currently uses batman-adv v15, it therefore requires up
  39. to 32 Bytes of encapsulation overhead on top of the minimal link MTU required for
  40. transporting IPv6.::
  41. \ 1312 1294 1280 0
  42. \---------+-----------------+-------------+----------------------------------+
  43. \TAP | batadv v15 | Ethernet | Payload |
  44. \-------+-----------------+-------------+----------------------------------+
  45. \ ^
  46. |
  47. MTU_LOW = 1280 Byte + 14 Byte + 18 Byte = 1312 Byte
  48. Maximum MTU
  49. -----------
  50. Calculating the maximum transport MTU is interesting, because it increases the
  51. throughput, by allowing larger payloads to be transported, but also more difficult
  52. as you have to take into account the tunneling overhead and each peers PMTU, which
  53. varies between providers.
  54. The underlying reasons are mostly PPPoE, Tunneling and IPv6 transition technologies
  55. like DS-Lite.
  56. Example: The peer with the smallest MTU on your network is behind DS-Lite and can
  57. transport IPv4 packets up to 1436 Bytes in size. Your tunnel uses IPv4 (20 Byte),
  58. UDP (8 Byte), Fastd (24 byte) and you require TAP (14 Byte) for Layer 2 (Ethernet)
  59. Tunneling.::
  60. 1436 1416 1408 1384 1370 \
  61. +-------------------+--------+-----------------------+-------------+------\
  62. | IP | UDP | Fastd | TAP | bat\
  63. +-------------------+--------+-----------------------+-------------+--------\
  64. ^ \
  65. |
  66. MTU_HIGH = 1436 Byte - 20 Byte - 8 Byte - 24 Byte - 14 Byte = 1370 Byte
  67. Conclusion
  68. ----------
  69. Determining the maximum MTU can be a tedious process, especially since the PMTU
  70. of peers could change at any time. The general recommendation for maximized
  71. compatibility is therefore the minimum MTU of 1312 Byte, which works well with
  72. all combinations of IPv4, IPv6, batman-adv compat v14 and v15.