SRX acting as DHCP server. How to prioritise DNS server when using multiple DNS servers?
Customer wants to prefer internal DNS servers over external DNS server when using SRX as DHCP server and trying to push multiple DNS server entries
The expected behaviour is to add DNS Servers by order of preference.
set access address-assignment pool testpool family inet dhcp-attributes name-server 8.8.8.8 set access address-assignment pool testpool family inet dhcp-attributes name-server 10.10.10.10
The client will get 8.8.8.8 as the primary
if we change the sequence
set access address-assignment pool testpool family inet dhcp-attributes name-server 10.10.10.10 set access address-assignment pool testpool family inet dhcp-attributes name-server 8.8.8.8
New Clients will get 10.10.10.10 as the primary DNS server, Clients with the old lease will not reflect this change
We can either use ipconfig /renew && ipconfig /release on the hosts to see this change or it will change automatically after the lease time
We tested with a lease time of 60 secs in lab and it also works
set access address-assignment pool testpool family inet dhcp-attributes maximum-lease-time 60