我有两个域服务器:一个(172.25.250.254)是用于服务私有*.lab.example.com请求的私有服务器,另一个(在我的框中是192.168.1.1)用于服务像index.docker.io或google.com这样的公共请求。
我的配置
/etc/dnsmask.conf
# Include all files in /etc/dnsmasq.d except RPM backup files
conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig/etc/dnsmask.d/node-dnsmask.conf
server=/in-addr.arpa/127.0.0.1
server=/cluster.local/127.0.0.1/etc/dnsmask.d/原产地-dns.conf
no-resolv
domain-needed
no-negcache
max-cache-ttl=1
enable-dbus
dns-forward-max=5000
cache-size=5000
bind-dynamic
except-interface=lo
# End of config/etc/dnsmask.d/原产地-上游-dns.conf
server=172.25.250.254
server=192.168.1.1或者强制解决私名,但不公开,或者解决公共但不是私有:
dig index.docker.io -> answer 0
dig node1.lab.example.com -> answer 110分钟后
dig index.docker.io -> answer 3
dig node1.lab.example.com -> answer 0发布于 2018-01-16 15:16:20
我部分地回答了我自己的问题
在“所有服务器”选项中读取泼尼索克手册页
--all-servers
By default, when dnsmasq has more than one upstream server available,
it will send queries to just one server. Setting this flag forces dnsmasq to
send all queries to all available servers. The reply from the server which
answers first will be returned to the original requester.据说,查询将只发送到一台服务器,从而解释了这种情况。
如果我加上这个选项,问题就解决了。
然而,我不明白什么是“第一个答案”,第一个答案是赢家,第一个答案是非零答案是赢家?
如果前者是真的,这种行为可能会一直不稳定。
https://serverfault.com/questions/892417
复制相似问题