Local DNS questions

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions
Author Message
drsprite
DD-WRT Novice


Joined: 05 Jul 2013
Posts: 1

PostPosted: Fri Jul 05, 2013 18:50    Post subject: Local DNS questions Reply with quote
I can't quite figure out the local DNS, even after reading a few rtfm's on how to do it.

I have defined my LAN Domain, and have turned on DNSMasq for local DNS.

If I give a device a static lease, or DHCP, then DNS is working fine.

However, I have a few devices which are statically defined. If I define them in the "Additional DNSMasq Options" section as below, then I cannot nslookup/ping nor access them either by hostname or fqdn.

Code:
address=/printer/192.168.0.51


Any thoughts?
Sponsor
Max Hopper
DD-WRT Novice


Joined: 28 Jun 2013
Posts: 11

PostPosted: Mon Apr 14, 2014 14:35    Post subject: Not quite the syntax expected by dnsmasq Reply with quote
Quote:
address=/printer/192.168.0.51


Perhaps it is dhcp-host=printer,192.168.0.51, which according to conflicting information here - http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html, is in error.

Quote:
-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]


dhcp-host=192.168.0.51,printer

Quote:
--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the machine lap the IP address 192.168.0.199.


Regardless of the syntax, the purpose of the dhcp-host directive is to assign a predetermined IP address when the device issues a DHCP DISCOVER request. Should a device ('printer') not request a DHCP DISCOVER request, e.g., the device has not the capability, dnsmasq will never add the hostname to it's DNS resolver. Also, if the IP address is assigned by a 'competing' DHCP server. e.g., in the WAN modem/router, the DNS resolver of dnsmasq will never know.

Now, if the IP address of 'printer' is manually configured in the device then the directive host-record is required to create the DNS A and PTR records in the dnsmasq DNS resolver.

Quote:
--host-record=<name>[,<name>....][<IPv4-address>],[<IPv6-address>]
Add A, AAAA and PTR records to the DNS. This adds one or more names to the DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may appear in more than one host-record and therefore be assigned more than one address. Only the first address creates a PTR record linking the address to the name. This is the same rule as is used reading hosts-files. host-record options are considered to be read before host-files, so a name appearing there inhibits PTR-record creation if it appears in hosts-file also. Unlike hosts-files, names are not expanded, even when expand-hosts is in effect. Short and long names may appear in the same host-record, eg. --host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100


N.B. use of the host-record directive in r23598 crashes dnsmasq (I shall report this)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum