Joined: 13 Mar 2014 Posts: 856 Location: Montreal, QC
Posted: Fri Aug 22, 2014 17:17 Post subject:
I see you now have the additional hosts file in your dnsmasq.conf and that it has been commented out. Did you make this entry in the dnsmasq options box on the services page?
Anyhow try adding this the dnsmasq options box on the services page.
Here's the DHCP info for the main network 192.168.1.0 from the Status>LAN tab(s) and static IP table from the Services>Services tab(s).
I am able to get IPs from this range just fine when I connect devices not included in the static IP table or when I remove the static IP address for the specific device I am connecting--all while "Use DNSMasq for DHCP" and "Authoritative-DHCP" unchecked.
It looks to me like there are two DHCP daemons or services that can possibly run: 1) DCHPd and 2) DNSMasq running as DHCP (for guest wifi for example).
What I don't understand is why DNSMasq kills my internet connectivity if it is enabled with static IPs. I think I may try to go back to 24500M before the IPv6 implementation and see if guest wifi works properly. I don't really need to be on 24800M.
The result is that I am able to get internet connectivity on both the wl0 and wl0.1.
James, do you know how to set static IPs via the DNSMasq options as the static routes are no longer working?
The part that I don't understand is that DHCPd, using DNSMasq for DHCP and DNS, and Authoritative-DHCP work just fine together until you set static IPs. I went through and completely reset and reconfigured my router, and that is how I was able to discover the issue. So what difference does setting static IPs make that cause the problems?? _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
Joined: 13 Mar 2014 Posts: 856 Location: Montreal, QC
Posted: Sat Aug 23, 2014 1:53 Post subject:
If you have the following settings it should use dnsmasq and not udhcpd
Setup
Dhcp type: server
Dhcp server : enabled
...
Use dnsmasq for dhcp
Use dnsmasq for dns
Authoritative
Services
Dnsmasq enabled
Clear everything from dnsmasq option box in case you have an error that is conflicting. That should set dnsmasq as the dhcp server on br0 and if you enabled multiple dhcp servers on networking page.
Reboot
For address reservations (what you are calling static) just use the webif section and it will populate the /tmp/dnsmasq.conf file with entries like this
It's working now. I updated to 24865M, so it appears there is an issue with 24800M and guest wifi. I initially tried to downgrade to 24500M, but it wouldn't let me. Once I got 24865M up it was immediately working really well. The webIF is a LOT quicker! Nice work BS, Kong, et al.
I was even able to create an additional firewall iptable entries for the guest wifi for use with OpenDNS:
Code:
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i wl0.1 -p udp --dport 53 -j DNAT --to $(nvram get wl0.1_ipaddr)
iptables -t nat -A PREROUTING -i wl0.1 -p tcp --dport 53 -j DNAT --to $(nvram get wl0.1_ipaddr)
Thanks for sticking in there with me, guys--James especially--and helping me figure it out! Man, it feels good getting my network setup the way I want it!!! _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
So this saga continues, actually... Here's additional information.
With wl0.1 enabled and with a second DHCP running:
DNSMasq for DHCP in conjunction with static IPs on br0 works great on 24865M.
DNSMasq for DHCP in conjunction with static IPs on br0 only works when I set the static IP on the devices as well with 24500M.
DNSMasq for DHCP in conjunction with static IPs on br0 doesn't work no matter what I do on 24800M.
The reason the saga continues is because my wife's laptop won't connect to the network at all (with or without wl0.1, and with or without DNSMasq for DHCP enabled) on 24865M.
Her laptop will connect to 24500M/24800M, but with the stipulations listed above (depending on DNSMasq for DHCP and wl0.1 enabled or not). It is an older laptop with an 802.11b/g wireless Intel card so I will be checking for newer drivers and if there is I will reload 24865M, to see if it can connect. Otherwise I can't leave her with a network to which she can't connect, so I am currently on 24500M which was so close to working with guest wifi and static IPs on br0 as it should, but not quite, unfortunately.
Any ideas, or are we fresh out after previous discussion?
It would be awesome if the same fix added in 24865M could be added to the older 24500M or 24800M in order to get br0, and wl0.1 to play nice with static IPs on br0.
I would then have the best of both worlds with a network my wife's laptop can connect to with the usability of a guest network, and the static IPs assigned on my br0 network (for APs, NAS, Printer and others that don't work well with DHCP). If I remove the static IPs from br0 on 24500M/24800M everything works as it should; however if I set any amount of static IPs, DNSMasq (I think) breaks. _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
Joined: 13 Mar 2014 Posts: 856 Location: Montreal, QC
Posted: Tue Aug 26, 2014 3:30 Post subject:
I actually rolled back to 24800 for some unrelated tests earlier today and guest networks were running perfectly. Also fairly certain 24500 worked perfectly well for me.
I have a mix of address reservations and regular dhcp clients. Pretty sure I'm not the only one or people would be making all kinds of posts.
Try commenting of the additional hosts file. I can't see what's in it so I can't see if there is an error
I'll try it again, but I'm pretty sure it wasn't working even before I added any additional DNSMasq options. _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
So 24500M is still giving me issues with static IPs. I removed everything from the additional DNSMasq options box and still did not have internet connectivity.
The second I run 1) "nvram set static_leases=""" and 2) "nvram set static_leasenum="0"" then DNSMasq works fine and I have internet connectivity. Alternatively I can set or remove the static leases via the webIF and get the same result. Once entered and saved/applied, no internet. Once removed and saved/applied, I have internet. I have also done these procedures followed by restarting the router as well as not rebooting--either way same results.
I also have settings scripts saved for 24500M, 24800M and now 24865M with both wl0.1 enabled and disabled. I have tried using the settings script for the respective build and also re-configuring from scratch after a factory reset. Still same behavior with static leases set/unset.
James, would you be willing to post or pm me screenshots of your Setup>Basic Setup tab(s), your Setup>Networking tab(s), Wireless/Basic Settings tab(s) and Services>Services tab(s)? _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
I'm a little closer, now. I found a post in the big 251 page R7000 thread where someone mentioned they always did the static leases in the "Additional DNSMasq Options" box. They gave these example entries:
Last night I decided to look into the "infinite" portion of that and put "infinite" in the "Client lease time" box for each static lease I had in the webIF table on the Services>Services tab(s).
So the good news is it's working on 24500M. But there's still something wrong.
"ps | grep [d]nsmasq" output:
Code:
1108 root 796 S dnsmasq --conf-file=/tmp/dnsmasq.conf
"cat /tmp/dnsmasq.conf" output. The "infinite" client lease time becomes "infinitem":
Does anyone know why it is working this way? I've tried 1440 (default), 60, 0, and blank. None have worked, but for some reason "infinite" does.
If I clear the static lease table (nvram set static_lease="", and nvram set static_leasenum="0") and put the host entries in the "Additional DNSMasq Options" without the 'm' like the following, it doesn't work again:
Also, when it is working with "infinitem" the Status>LAN or Status>Sys-Info tab(s) are not showing the lease unless the client is active, and the hostnames for at least one client shows "infinitem" (see screenshot attached). Any ideas as to why it is exhibiting this behavior?
I updated to 24800M and it is exhibiting the same behavior as 24500M. Even if I put a space or two in the Client Lease Time boxes it appends the 'm' (for minutes) in the /tmp/dnsmasq.conf file and the internet connectivity works just fine. The space works for both 24500M and 24800M.
I'm a little closer, now. I found a post in the big 251 page R7000 thread where someone mentioned they always did the static leases in the "Additional DNSMasq Options" box. They gave these example entries:
Last night I decided to look into the "infinite" portion of that and put "infinite" in the "Client lease time" box for each static lease I had in the webIF table on the Services>Services tab(s).
So the good news is it's working on 24500M. But there's still something wrong.
"ps | grep [d]nsmasq" output:
Code:
1108 root 796 S dnsmasq --conf-file=/tmp/dnsmasq.conf
"cat /tmp/dnsmasq.conf" output. The "infinite" client lease time becomes "infinitem":
Does anyone know why it is working this way? I've tried 1440 (default), 60, 0, and blank. None have worked, but for some reason "infinite" does.
If I clear the static lease table (nvram set static_lease="", and nvram set static_leasenum="0") and put the host entries in the "Additional DNSMasq Options" without the 'm' like the following, it doesn't work again:
Also, when it is working with "infinitem" the Status>LAN or Status>Sys-Info tab(s) are not showing the lease unless the client is active, and the hostnames for at least one client shows "infinitem" (see screenshot attached). Any ideas as to why it is exhibiting this behavior?
This got me thinking and I realized that I was using a '.' in one of my hostnames--"WRT54Gv8.2". Once I replaced the '.' everything has fired up perfectly. The hostnames display correctly in the Status>LAN and Status>Sys-Info tabs, and the lease shows static as it should, except for an iPod Touch which maxes out at 90 days. I'm chalking that up to Apple deciding they know better then their consumers.
I went through and installed 24345M NEWD, 24500M, 24800M, and 24865M and saved a setting script with the changes. 24865M was already working, but I changed the hostname there as well to keep the settings across the builds consistent.
I still am unable to get my wife's older laptop connect to 24865M, but I will post a new thread on that should I decide to pursue it. For now I am on 24800M.
Thanks again for the help along the way. I hope this thread helps the next person out! _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy