# This entry assigns the given IP address to the MAC address for static IP addresses # This entry is simply a static DNS address, great for mapping print servers, etc to names (edit by ZC): An alternate method of static leases is to use the "dhcp-host" method for addresses above, but add MAC addresses for those that need it, e.g.: The thing I don't like about this method is:ġ) If you do NOT want to tie MAC addresses with IPs then you have to use a fake MAC address on this form, because the info doesn't save without a MAC addressĢ) If you need to enter many of these, it gets tedious You need to "save" settings at the bottom of the page (Duh). Static leases from Administration->Services->DHCP Server comment - for v24sp1, the above syntax is incorrect. It was removed, the errors seen when re-starting dnsmasq (in ssh) went away and the service comment- for v23, the trailing slash, as seen in the examples, caused it not to work. The official DNSMasq documentation is at. (edit by ZC): If you use the "dhcp-host" method with "expand-hosts", the domain will be appended To achieve reverse DNS lookups, use "ptr-record":Īddress=/zirconium.your_/192.168.1.31 When using "expand-hosts", DNS lookups for "hostname.your_" will fail unless "your_" is included as part of the domain in the "address" option.Īddress=/zirconium.your_/zr.your_/192.168.1.31 To have DNSMasq automatically append the domain name when a request is served, add the "expand-hosts" option and ensure the domain name is set either in the additional options or in the DD-WRT web interface. # or if you want it to read another file, as well as /etc/hosts, use this. # If you don't want dnsmasq to read /etc/hosts, uncomment the following line. (edit by ZC): An additional option is to have DNSMasq read an ADDITIONAL hosts file (for those who use the hosts method of ad blocking) using this option from the DNSMasq documentation: Multiple hostnames can be used with one IP address by adding extra sections.Īddress=/zinc.your_/192.168.1.30 You can enter DNS info about machines in this format: Before v23 SP1 Final it was in Administration->Services->DNSMasq. Before v24 it was in Administration > Management.Lastly, if you want the router to append your domain on DNS request, put "expand-hosts" into the DNSMasq other options I didn't need to but I also include that sample. Previous comments also showed setting the path. If you have older software the alternate solution is to kill then start dnsmasq. The current web page says that it does reload hosts on SIGHUP, and testing shows it works. NOTE: Previous comments suggested that SIGHUP does not cause dnsmasq to re-read the hosts file. Since the startup script will run after dnsmasq starts, you also need to notify dnsmasq to reload.įor example, if you populate your /etc/hosts with the startup_rc script like:Įcho '192.168.1.50 somename' > /etc/hostsĮcho '192.168.1.51 othername otheralias' > /etc/hosts To make this fix persistent, write a startup script to add the new records in /tmp/hosts. It does work here with a caveat after editing /etc/hosts, restart DNSMasq. This is probably the first place one attempts getting this to work if you have a *nix background. I had unpredictable results when I just tried to renew the lease and flushdns.Īfterwards, simply ping the newly added hostname to make sure it is mapped with the right ip address. On Windows, get to the network connections page and right-click on your adapter and choose Disable, then re-Enable it. Warning : Whatever method you use, you might not "see" the expected results on your computer until you reboot the computer or restart the network interfaces. I don't claim to know which way is preferred by the developer(s) of the DD-WRT. So far I've learned of 3 ways to configure the DD-WRT, so that it will perform DNS for your local network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |