I am currently trying to set up a router on an Ubuntu desktop machine. For the most part, I want it to behave much like my existing DD-WRT router.
Although most computers connect as expected, I have one laptop (Ubuntu) that stubbornly refuses to get a DNS server from the router. When I connect normally (to the DD-WRT router), /etc/resolve.conf contains:
Strictly speaking, this is not what it should be doing. When I look at the DHCP ACK sent from the router to the client, it contains (among other things) these two options:
search [prefix removed].comcast.net
So really, it should be getting the router (192.168.210.1) as the DNS server, not Comcast. This, however, is not the problem I want to address. I am not particularly concerned with my laptop's behavior, what I really want is for any computer to connect without extra configuration, regardless of whether it handles the DNS as I would expect or not.
Option: (t=6,l=4) Domain Name Server = 192.168.210.1
Option: (6) Domain Name Server
Option: (t=15,l=19) Domain Name = "[prefix removed].comcast.net"
Option: (15) Domain Name
When I connect to the router I am building, no Domain Name is specified in the DHCP ACK. When connecting with the "problem laptop", resolve.conf contains only the line:
I am using dnsmasq for the DNS and DHCP, which is the same program DD-WRT uses. I used ssh to access the DD-WRT router and discovered that its dnsmasq configuration file is stored in /tmp/dnsmasq.conf and contains:
So it seems that on the router, dnsmasq is somehow being configured to send that exact, literal domain name rather than dnsmasq determining what it should be. The resolv.conf on the router seems to be the same as it is when the "problem laptop" connects:
[dhcp-host statements removed]
How can I configure dnsmasq to get the appropriate domain such that my "problem laptop" will connect properly? Do I want to make a script that runs at boot time that generates a dnsmasq.conf file in /tmp/ as it seems that maybe DD-WRT does? I would rather not just specify the literal domain name, causing me to have to change it when I connect the router to a different network.
search [prefix removed].comcast.net.