From 44f6dbd1d5c67635bb64ee23eaa83f99e989e6c2 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 24 Jul 2017 10:45:01 +0200 Subject: [PATCH] dnsdist: Add a few words on source address selection in the new docs --- pdns/dnsdistdist/docs/guides/downstreams.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pdns/dnsdistdist/docs/guides/downstreams.rst b/pdns/dnsdistdist/docs/guides/downstreams.rst index 4a69a693c..699fea268 100644 --- a/pdns/dnsdistdist/docs/guides/downstreams.rst +++ b/pdns/dnsdistdist/docs/guides/downstreams.rst @@ -36,3 +36,20 @@ The CD flag can be set on the query by setting ``setCD`` to true. e.g.:: newServer({address="192.0.2.1", checkType="AAAA", checkName="a.root-servers.net.", mustResolve=true}) + +Source address selection +------------------------ + +In multi-homed setups, it can be useful to be able to select the source address or the outgoing +interface used by dnsdist to contact a downstream server. This can be done by using the `source` parameter:: + + newServer({address="192.0.2.1", source="192.0.2.127"}) + newServer({address="192.0.2.1", source="eth1"}) + newServer({address="192.0.2.1", source="192.0.2.127@eth1"}) + +The supported values for source are: +- an IPv4 or IPv6 address, which must exist on the system +- an interface name +- an IPv4 or IPv6 address followed by '@' then an interface name + +Please note that specifying the interface name is only supported on system having `IP_PKTINFO`. -- 2.40.0