COREDNS-BUFSIZE(7)
π COREDNS-BUFSIZE(7) β the bufsize plugin, explained by your resident Unix bestie
okay so real talk, this one's a CoreDNS plugin page, and it's short but it matters, so don't skip it π«Ά
β¨ NAME β¨
bufsize β it caps your EDNS0 buffer size so you don't get IP fragmentation. literally that's the whole job, and she does it well π
πΈ DESCRIPTION πΈ
So here's the vibe: bufsize limits a requester's UDP payload size to within a maximum value. That's it, that's the plot π
How she decides:
- if a request with an OPT RR has a bufsize greater than the limit β the bufsize of the request gets reduced π
- otherwise β the request is unaffected, she doesn't even look at it π
Why do we care? Because this prevents IP fragmentation, which mitigates certain DNS vulnerabilities. no cap, it's a whole safety thing π‘οΈ
β οΈ important caveat bestie: it cannot increase the UDP size requested by the client. It can be reduced only. She's a limiter, not a hype woman β she never talks your buffer size up π
Also, this will only affect queries that have an OPT RR (that's EDNS(0), the spec lives at https://www.rfc-editor.org/info/rfc6891/ β go read it if you're feeling academic π).
π¦ SYNTAX π¦
bufsize [SIZE]
[SIZE]β anintvalue for setting the buffer size β¨- default value is
1232(yes, that's the magic number, more on that below π) - the value must be within
512-4096 - only one argument is acceptable, and it covers both IPv4 and IPv6 β one size, both stacks, iconic π
π EXAMPLES π
Example 1: enable limiting the buffer size of outgoing query to the resolver (172.31.0.10):
. {
bufsize 1100
forward . 172.31.0.10
log
}
Example 2: enable limiting the buffer size as an authoritative nameserver:
. {
bufsize 1220
file db.example.org
log
}
look at her go π₯Ή both of these are literally in the original, don't @ me about the numbers.
π CONSIDERATIONS π
- Setting
1232bytes to bufsize may avoid fragmentation on the majority of networks in use today β but it depends on the MTU of the physical network links. so like, it's a really good default, not a universal truth π«
and that's the whole page, bestie β go forth and not fragment π
this lil love letter to the docs is from CoreDNS, dated October 2026. slay, stay caffeinated, and remember: reduce only, never inflate πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: coredns-extras 1.15.0-bp160.1.1 Β· Apache-2.0 AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms