My Pi will connect to different routers. They all provide the same network with the same SSID.
Now I would like to set up the dns server of my Pi with the IP of those routers, (there's a dns server running on them). The challenge is that they don't have the same IP.
From the search that I've done I found that I need to edit /etc/dhcp/dhclient.conf
and add something like:
prepend domain-name-servers
Is there a way that I can get the IP of the router and set it in this file?
EDIT: here you have the output of cat /etc/resolv.conf:
domain lan
nameserver 10.44.55.1 //my router's IP
nameserver 8.8.8.8
nameserver 8.8.4.4
route -n
into your question, and alsoifconfig
andcat /etc/resolv.conf
See the "Find the Settings of your local Network" section of How do I set up networking/WiFi/Static IP – Milliways Apr 30 '17 at 11:13cat /etc/resolv.conf
is non standard. You appear to have fiddled different contradictory settings. Put your Pi BACK TO STANDARD and it should work. No one can resolve this if you change things without understanding what they do. – Milliways May 08 '17 at 23:46