diff options
author | 2022-04-28 10:06:15 -0400 | |
---|---|---|
committer | 2022-04-28 10:06:15 -0400 | |
commit | 5a4437bb23e383ebb7c8fce6c8fbce802831d986 (patch) | |
tree | f6ab5f27872354d9105b64b58390d9d7940178d5 /plugin | |
parent | 8c79a30aa946e071e6c578441bf6b96dde8f0584 (diff) | |
download | coredns-5a4437bb23e383ebb7c8fce6c8fbce802831d986.tar.gz coredns-5a4437bb23e383ebb7c8fce6c8fbce802831d986.tar.zst coredns-5a4437bb23e383ebb7c8fce6c8fbce802831d986.zip |
plugin/bind: Fix listener collision notes in readme (#5349)
* clarify listener collision notes in readme
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* formatting
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/bind/README.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/plugin/bind/README.md b/plugin/bind/README.md index 4eeab6c33..a911218f6 100644 --- a/plugin/bind/README.md +++ b/plugin/bind/README.md @@ -84,10 +84,17 @@ You can exclude some addresses by their IP or interface name (The following will ## Bugs -When defining more than one server block, take care not to bind more than one server to the same -address and port. Doing so will result in unpredictable behavior (requests may be randomly -served by either server). Keep in mind that *without* the *bind* plugin, a server will bind to all -interfaces, and this will collide with another server if it's using *bind* to listen to an interface +### Avoiding Listener Contention + +TL;DR, When adding the _bind_ plugin to a server block, it must also be added to all other server blocks that listen on the same port. + +When more than one server block is configured to listen to a common port, those server blocks must either +all use the _bind_ plugin, or all use default binding (no _bind_ plugin). Note that "port" here refers the TCP/UDP port that +a server block is configured to serve (default 53) - not a network interface. For two server blocks listening on the same port, +if one uses the bind plugin and the other does not, two separate listeners will be created that will contend for serving +packets destined to the same address. Doing so will result in unpredictable behavior (requests may be randomly +served by either server). This happens because *without* the *bind* plugin, a server will bind to all +interfaces, and this will collide with another server if it's using *bind* to listen to an address on the same port. For example, the following creates two servers that both listen on 127.0.0.1:53, which would result in unpredictable behavior for queries in `a.bad.example.com`: |