What's new

hosts / dnsmasq / Android coordination

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

David Cavalli

Regular Contributor
On my Asus/Merlin router, I have both a hosts.add and dnsmasq.conf.add file configured. In them I have the two respective lines to define a local server:
192.168.1.15 Bard
dhcp-host=AA:AA:AA:AA:AA:AA,Bard,192.168.1.15,1440

The server Bard is well configured as per the router. It shows up in the GUI correctly and I can ping Bard when I use it in telnet.

On all my local Windows computers, I have a hosts file which has the Bard entry same as the Asus file. I can NOT create a Bard entry on my Android phone / tablet or Android TV boxes, because the hosts file is in the root partition. (I don't want to root my devices.)

Someone told me that the router should be able to use the Bard definition on the router on these devices, but I'm not really sure where to look or how to get started (or even if this is well trod ground before me -- no search found it, but probably wrong terms.)

Any advice would be greatly appreciated. Thanks!
 
Why are you using hosts.add and dnsmasq.conf.add files for Bard rather than just using the router's GUI?

If your clients are using the router's dnsmasq for DNS then there's no need for you to create static host files on the clients.
 
My Asus model is the RT=AC68U and I have many earlier threads where the answer was "put it in the .add files" to conserve NVRAM. Mission accomplished and it's been working fine this way for years. I have 80 machines in the hosts (Bard is just my media server) file and I think the .add files didn't overwhelm the NVRAM, from what I remember. From what I understand, the .add files achieve the same result?

It's the second sentence that is probably along what I need, but above my pay grade in expertise. It sounds smart but I don't know how exactly how to do that on my android tablet, for example. Googling to learn what I can about what this implies.

Thanks! :D
 
Aha!!! I think Google and your sentence have gotten my 95% of the way there!

https://www.gadgets360.com/mobiles/features/how-to-change-dns-server-on-android-1672117

I've manually set my IP address on my tablet to the one DHCP assigns it locally in the router (192.168.1.41). I've set the Gateway to the Asus (192.168.1.1). I see that it is currently DNS configured to Google (8.8.8.8 and 8.8.4.4).

My guess is that if I make DNS1 the Asus (192.168.1.1) and the second one stays the same, does this do what I was hoping for? Never even saw these configuration options until I found the above web page.

Thanks for anything to get me over the goal line! <3
 
My Asus model is the RT=AC68U and I have many earlier threads where the answer was "put it in the .add files" to conserve NVRAM. Mission accomplished and it's been working fine this way for years. I have 80 machines in the hosts (Bard is just my media server) file and I think the .add files didn't overwhelm the NVRAM, from what I remember. From what I understand, the .add files achieve the same result?
386.11 increased the amount of available NVRAM on the RT-AC68U to address this problem. I can't remember whether you're still limited to 64 DHCP entries in the GUI though.

It's the second sentence that is probably along what I need, but above my pay grade in expertise. It sounds smart but I don't know how exactly how to do that on my android tablet, for example. Googling to learn what I can about what this implies.
Are your client's network interfaces configured to use DHCP? What have you got setup on your router's LAN - DHCP Server page?
 
I've manually set my IP address on my tablet to the one DHCP assigns it locally in the router (192.168.1.41). I've set the Gateway to the Asus (192.168.1.1). I see that it is currently DNS configured to Google (8.8.8.8 and 8.8.4.4).
Don't use static settings on your clients. Use DHCP only.

My guess is that if I make DNS1 the Asus (192.168.1.1) and the second one stays the same, does this do what I was hoping for? Never even saw these configuration options until I found the above web page.
No.
 
Are your client's network interfaces configured to use DHCP? What have you got setup on your router's LAN - DHCP Server page?
I undid all changes from my Google suggestion page. Back to DHCP, not static. FYI, here's the NVRAM results from the last two versions of firmware. Looks smaller, but 386.10 was a virgin reinstall and 386.11 was an upgrade.
(latest: 386.11_0) size: 59949 bytes (5587 left)
(latest: 386.10_0) size: 59452 bytes (6084 left)

Here's a snapshot of my LAN - DHCP Server page. Hope that's the right thing you requested. Thanks! :)
 

Attachments

  • LAN-DNS.png
    LAN-DNS.png
    53.1 KB · Views: 43
Also, in case it matters, here's a minor section of my Network Map, which shows Bard in the list.
 

Attachments

  • NetworkMap.png
    NetworkMap.png
    71.4 KB · Views: 39
I undid all changes from my Google suggestion page. Back to DHCP, not static. FYI, here's the NVRAM results from the last two versions of firmware. Looks smaller, but 386.10 was a virgin reinstall and 386.11 was an upgrade.
(latest: 386.11_0) size: 59949 bytes (5587 left)
(latest: 386.10_0) size: 59452 bytes (6084 left)
You might be able to free up even more space by running this command on your router, as RMerlin explained in the 386.11 release notes.
Code:
clear_vpnclients.sh

Here's a snapshot of my LAN - DHCP Server page. Hope that's the right thing you requested. Thanks! :)
This is wrong. Leave DNS Server 1 and 2 blank. If you want to use Google's DNS instead of your ISP's then put the Google addresses in your WAN DNS settings.
 
You might be able to free up even more space by running this command on your router, as RMerlin explained in the 386.11 release notes.
Code:
clear_vpnclients.sh
I originally read the 386.11 note, but was on the "ain't broke, don't fix" plan at the time. Ran it with confidence and happiness! I think it will even gain back more memory if/when I do a clean firmware upgrade, but happy for the free gain. :D
(latest: 386.11_0) size: 57986 bytes (7550 left)
(latest: 386.10_0) size: 59452 bytes (6084 left)

This is wrong. Leave DNS Server 1 and 2 blank. If you want to use Google's DNS instead of your ISP's then put the Google addresses in your WAN DNS settings.
Wiped LAN DNS settings. Installed WAN DNS settings, Google. Wow! Everything works and Bard chrome links now live on my tablet with no configuration! Hooray!

Thanks for the patience and taking the time to educate me. This Merlin board is exactly why I'll be buying a future Asus (RT-AX86U?) to replace the current one if/when it dies. <3
 
The RT-AX86U is not a good buy today. While it's an excellent router, the fact that it will not receive 3.0.0.6.xxx firmware is enough reason to not consider it today.

The GT-AX6000 is superior, will be supported, and on sale, may even be cheaper too.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top