[Samba] Failover DC did not work when Main DC failed

Paul Littlefield info at paully.co.uk
Wed Feb 12 12:26:02 UTC 2020


On 12/02/2020 10:06, L.P.H. van Belle via samba wrote:
> What do you see/get when you run:
> 
> dig NS $(hostname -d)
> With 2 dc's you should see 2 records.
> 
> In the past this was a bug at samba joins so only 1 NS record existed.
> Worth to have a look at.
> 
> And adding this to /etc/resolv.conf:
> options timeout:2
> options attempts:3
> options rotate
> 
> Also might help.
> 
> Greetz,
> 
> Louis


Hello Louis,

Thanks for your reply.

For that dig command I get...


root at dc3.mydomain.com ~ $ (screen) dig NS $(hostname -d)

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> NS mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63144
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com.               IN      NS

;; ANSWER SECTION:
mydomain.com.        900     IN      NS      dc3.mydomain.com.
mydomain.com.        900     IN      NS      dc4.mydomain.com.

;; AUTHORITY SECTION:
mydomain.com.        3600    IN      SOA     dc3.mydomain.com. hostmaster.mydomain.com. 620 900 600 86400 0

;; Query time: 0 msec
;; SERVER: 192.168.0.218#53(192.168.0.218)
;; WHEN: Wed Feb 12 12:18:10 GMT 2020
;; MSG SIZE  rcvd: 116



...so both records are correct, in both forward and reverse DNS zones!


root at dc3.mydomain.com ~ $ (screen) host 192.168.0.218
218.0.168.192.in-addr.arpa domain name pointer DC3.

root at dc3.mydomain.com ~ $ (screen) host 192.168.0.219
219.0.168.192.in-addr.arpa domain name pointer DC4.


Is there any point in putting those extra lines in /etc/resolv.conf when I have been told by this mailing list to only put the 1 nameserver entry in it?!

e.g.   my current resolver file...

root at dc3.mydomain.com ~ $ (screen) cat /etc/resolv.conf
search mydomain.com
nameserver 192.168.0.218


...should I have THIS instead?


root at dc3.mydomain.com ~ $ (screen) cat /etc/resolv.conf
search mydomain.com
nameserver 192.168.0.218
nameserver 192.168.0.219
options timeout:2
options attempts:3
options rotate



Regards,

Paully



More information about the samba mailing list