[Dnsmasq-discuss] multiple upstream servers

S Irlapati irlapati at gmail.com
Thu Jul 30 20:41:34 BST 2020


Hey folks,

Thank you all for the replies. Initially  I expected that dhcp-option 
would work dynamically or take effect every time the IP of an upstream 
server was changed. This was a misunderstanding. If understood right 
from all the replies, dhcp-option plays a role only when a dhcp request 
is made.

Sam

On 7/29/2020 6:25 PM, S Irlapati wrote:
> Here are a few experiments that have been done.
>
> Config file:
>
> port=53
> bogus-priv
> no-resolv
> local=/localnet/
> user=dnsmasq
> group=dnsmasq
> interface=enp5s0
> listen-address=127.0.0.1,192.168.13.1
> expand-hosts
> domain=irlanet.org
> dhcp-range=192.168.13.224,192.168.13.255,2h
> dhcp-authoritative
> cache-size=0
> cname=win-sji,MOEDW1CKH5
> log-queries
> log-dhcp
>
> dhcp-host=40:16:7e:63:60:d1,Salem,set:red,192.168.13.102
>
> dhcp-option=tag:red,option:dns-server,10.88.13.3
> dhcp-option=tag:green,option:dns-server,10.88.13.4
> dhcp-option=option:dns-server,10.88.13.4
> server=10.88.13.4#53
>
> From the host Salem when forcing a quiery:
>
> @salem 558]>curl ident.me
> 154.21.57.55
>
> From dnsmasq server log files
>
> Jul 29 18:17:56 xroads dnsmasq[3822653]: query[A] ident.me from 
> 192.168.13.102
> Jul 29 18:17:56 xroads dnsmasq[3822653]: forwarded ident.me to 10.88.13.4
> Jul 29 18:17:56 xroads dnsmasq[3822653]: query[AAAA] ident.me from 
> 192.168.13.102
> Jul 29 18:17:56 xroads dnsmasq[3822653]: forwarded ident.me to 10.88.13.4
> Jul 29 18:17:56 xroads dnsmasq[3822653]: reply ident.me is 176.58.123.25
> Jul 29 18:17:56 xroads dnsmasq[3822653]: reply ident.me is 
> 2a01:7e00::f03c:91ff:fe70:2b9d
>
> The goal is to make queries from Salem to be forwared to 10.88.13.4
>
> From here only the serveer lines will be changed.
>
> dhcp-option=tag:red,option:dns-server,10.88.13.3
> dhcp-option=tag:green,option:dns-server,10.88.13.4
> dhcp-option=option:dns-server,10.88.13.4
> # server=10.88.13.4#53
>
> Query from Salem results:
>
> @salem 558]>curl ident.me
> curl: (6) Could not resolve host: ident.me
>
> Dnsmasq log file output:
>
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[A] ident.me from 
> 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[AAAA] ident.me from 
> 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[A] ident.me from 
> 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[AAAA] ident.me from 
> 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[A] ident.me.irlanet.org 
> from 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[AAAA] 
> ident.me.irlanet.org from 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[A] ident.me.irlanet.org 
> from 192.168.13.102
> Jul 29 18:20:57 xroads dnsmasq[4042096]: query[AAAA] 
> ident.me.irlanet.org from 192.168.13.102
>
> It looks like dnsmasq does not know where to forward the requests.
>
> Changing the servers again:
>
> dhcp-option=tag:red,option:dns-server,10.88.13.3
> dhcp-option=tag:green,option:dns-server,10.88.13.4
> dhcp-option=option:dns-server,10.88.13.4
> server=10.88.13.3#53
>
> Querying from Salem:
>
> @salem 558]>curl ident.me
> 154.21.57.55
>
> Dnsmasq log file:
>
> Jul 29 18:23:36 xroads dnsmasq[4105784]: query[A] ident.me from 
> 192.168.13.102
> Jul 29 18:23:36 xroads dnsmasq[4105784]: forwarded ident.me to 10.88.13.3
> Jul 29 18:23:36 xroads dnsmasq[4105784]: query[AAAA] ident.me from 
> 192.168.13.102
> Jul 29 18:23:36 xroads dnsmasq[4105784]: forwarded ident.me to 10.88.13.3
> Jul 29 18:23:36 xroads dnsmasq[4105784]: reply ident.me is 176.58.123.25
> Jul 29 18:23:36 xroads dnsmasq[4105784]: reply ident.me is 
> 2a01:7e00::f03c:91ff:fe70:2b9d
>
> From the above experiments it looks like dhcp-option is completely 
> ignored.
>
> Does anyone see a problem with the config?
>
>



More information about the Dnsmasq-discuss mailing list