diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 20:37:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 20:37:50 +0000 |
commit | c1f743ab2e4a7046d5500875a47d1f62c8624603 (patch) | |
tree | 709946d52f5f3bbaeb38be9e3f1d56d11f058237 /daemon/bindings/net_dns_tweaks.rst | |
parent | Initial commit. (diff) | |
download | knot-resolver-913a96f00351e791fb56b1cd60642cb5fc7f7683.tar.xz knot-resolver-913a96f00351e791fb56b1cd60642cb5fc7f7683.zip |
Adding upstream version 5.7.1.upstream/5.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/bindings/net_dns_tweaks.rst')
-rw-r--r-- | daemon/bindings/net_dns_tweaks.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/daemon/bindings/net_dns_tweaks.rst b/daemon/bindings/net_dns_tweaks.rst new file mode 100644 index 0000000..4cfeba6 --- /dev/null +++ b/daemon/bindings/net_dns_tweaks.rst @@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: GPL-3.0-or-later + +DNS protocol tweaks +------------------- + +Following settings change low-level details of DNS protocol implementation. +Default values should not be changed except for very special cases. + +.. function:: net.bufsize([udp_downstream_bufsize][, udp_upstream_bufsize]) + + Get/set maximum EDNS payload size advertised in DNS packets. Different values can be configured for communication downstream (towards clients) and upstream (towards other DNS servers). Set and also get operations use values in this order. + + Default is 1232 bytes which was chosen to minimize risk of `issues caused by IP fragmentation <https://blog.apnic.net/2019/07/12/its-time-to-consider-avoiding-ip-fragmentation-in-the-dns/>`_. Further details can be found at `DNS Flag Day 2020 <https://www.dnsflagday.net/2020/>`_ web site. + + Minimal value allowed by standard :rfc:`6891` is 512 bytes, which is equal to DNS packet size without Extension Mechanisms for DNS. Value 1220 bytes is minimum size required by DNSSEC standard :rfc:`4035`. + + Example output: + + .. code-block:: lua + + -- set downstream and upstream bufsize to value 4096 + > net.bufsize(4096) + -- get configured downstream and upstream bufsizes, respectively + > net.bufsize() + 4096 -- result # 1 + 4096 -- result # 2 + + -- set downstream bufsize to 4096 and upstream bufsize to 1232 + > net.bufsize(4096, 1232) + -- get configured downstream and upstream bufsizes, respectively + > net.bufsize() + 4096 -- result # 1 + 1232 -- result # 2 + +.. include:: ../modules/workarounds/README.rst |