Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
Hallo, Simon, Du meintest am 29.07.12: My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. Is this somehow configurable? Yes. Put the hostname-IP address mapping in /etc/hosts and the mac_address-hostname mappings in /etc/dnsmasq.conf in dhcp-host lines. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp=host=00:11:22:33:44:55,myhost Perhaps a nasty typo: dhcp-host=00:11:22:33:44:55,myhost Viele Gruesse! Helmut ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
Hallo, /dev/rob0, Du meintest am 31.07.12: My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp-host=00:11:22:33:44:55,myhost So this means that I can't maintain my hosts in a single file with only one statement? Single statement, not that I know of. Single file, sure. See -A, --address in the man page. in /etc/dnsmasq.conf : dhcp-host=00:11:22:33:44:55,myhost address=/myhost/1.2.3.4 What about the addresses (not the dhcp-host definition(s)) in a separate file: addn-hosts=/path/to/hosts.LAN and a file /path/to/hosts.LAN like # IP-addressHostname 192.168.0.100 Host100 # etc Viele Gruesse! Helmut ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp-host=00:11:22:33:44:55,myhost So this means that I can't maintain my hosts in a single file with only one statement? Single statement, not that I know of. Single file, sure. See -A, --address in the man page. in /etc/dnsmasq.conf : dhcp-host=00:11:22:33:44:55,myhost address=/myhost/1.2.3.4 What about the addresses (not the dhcp-host definition(s)) in a separate file: addn-hosts=/path/to/hosts.LAN and a file /path/to/hosts.LAN like # IP-addressHostname 192.168.0.100 Host100 # etc Currently my setup is that way. A seperate hosts file addn-hosts=/etc/dnsmasq.d/hosts.dynamic and my host definitions in dnsmasq.conf.d via dhcp-host. But to avoid them to get out of sync I've written a dhcp-script dhcp-script=/var/netboot/config/dnsmasq.sh to update /etc/dnsmasq.d/hosts.dynamic automatically for dns entries to be static. This appears a little bit cumbersome to me but I don't want to manage two entries for a single host. cheers. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
On Sun, Jul 29, 2012 at 11:25:49PM +0200, gabriel wrote: On 07/29/2012 06:39 PM, Simon Kelley wrote: On 26/07/12 13:31, gabriel wrote: My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. Is this somehow configurable? Yes. Put the hostname-IP address mapping in /etc/hosts and the mac_address-hostname mappings in /etc/dnsmasq.conf in dhcp-host lines. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp=host=00:11:22:33:44:55,myhost So this means that I can't maintain my hosts in a single file with only one statement? Single statement, not that I know of. Single file, sure. See -A, --address in the man page. in /etc/dnsmasq.conf : dhcp=host=00:11:22:33:44:55,myhost address=/myhost/1.2.3.4 -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if /dev/rob0 is in the Subject: ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
On 26/07/12 13:31, gabriel wrote: Hello. I've just subscribed to this list and have a question to a previous post. But I don't know how to reply on that thread now. The thread in concern started on Fri Jul 20 11:30:02 BST 2012 same subject. My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. Is this somehow configurable? Yes. Put the hostname-IP address mapping in /etc/hosts and the mac_address-hostname mappings in /etc/dnsmasq.conf in dhcp-host lines. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp=host=00:11:22:33:44:55,myhost Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
On 07/29/2012 06:39 PM, Simon Kelley wrote: On 26/07/12 13:31, gabriel wrote: Hello. I've just subscribed to this list and have a question to a previous post. But I don't know how to reply on that thread now. The thread in concern started on Fri Jul 20 11:30:02 BST 2012 same subject. My question is whether it would be possible to have a single line config statement for mac-ip-hostname mapping. But I want to have the DNS entries permanently preserved resp. dns mappings without prior dhcp ip negotiation. Actually this means I don't want DNS to be dynamic. Is this somehow configurable? Yes. Put the hostname-IP address mapping in /etc/hosts and the mac_address-hostname mappings in /etc/dnsmasq.conf in dhcp-host lines. so: in /etc/hosts 1.2.3.4 myhost in /etc/dnsmasq.conf dhcp=host=00:11:22:33:44:55,myhost Thanks for your reply. So this means that I can't maintain my hosts in a single file with only one statement? Gabriel ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
Hi all! I'm just recently starting to use dnsmasq and I'm facing a problem, maybe it's trivial but I haven't found the answer. I've configured dnsmasq to set specific IP addresses to some hosts, like this: domain = ea4rct.org dhcp-host=00:e0:4c:a4:13:ac,foxtrot,192.168.0.6,1w I'd like the name, foxtrot, to be visible from the LAN, so I added: address=/foxtrot.ea4rct.org/192.168.0.6 This way, local computers can just use foxtrot or foxtrot.ea4rct.org as the name for this computer. But this is repetitive and error-prone. Is it possible to avoid the _address_ line, which is redundant? Thanks a lot! -- Álvaro Gámez Machado ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
On 20/07/12 11:30, Alvaro Gamez wrote: Hi all! I'm just recently starting to use dnsmasq and I'm facing a problem, maybe it's trivial but I haven't found the answer. I've configured dnsmasq to set specific IP addresses to some hosts, like this: domain = ea4rct.org http://ea4rct.org dhcp-host=00:e0:4c:a4:13:ac,foxtrot,192.168.0.6,1w I'd like the name, foxtrot, to be visible from the LAN, so I added: address=/foxtrot.ea4rct.org/192.168.0.6 http://foxtrot.ea4rct.org/192.168.0.6 This way, local computers can just use foxtrot or foxtrot.ea4rct.org http://foxtrot.ea4rct.org as the name for this computer. But this is repetitive and error-prone. Is it possible to avoid the _address_ line, which is redundant? Yes, just delete those lines. It will all Just Work. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
Uh, I was asking because that didn't work :) Without the address line: root@alfa:/etc/dnsmasq.d# grep zulu radio #address=/zulu.ea4rct.org/192.168.0.254 dhcp-host=00:18:84:12:7e:10,zulu,192.168.0.254,1w root@alfa:/etc/dnsmasq.d# !hos host zulu.ea4rct.org Host zulu.ea4rct.org not found: 3(NXDOMAIN) With it: root@alfa:/etc/dnsmasq.d# grep zulu radio address=/zulu.ea4rct.org/192.168.0.254 dhcp-host=00:18:84:12:7e:10,zulu,192.168.0.254,1w root@alfa:/etc/dnsmasq.d# host zulu.ea4rct.org zulu.ea4rct.org has address 192.168.0.254 Thanks! 2012/7/20 Simon Kelley si...@thekelleys.org.uk On 20/07/12 11:30, Alvaro Gamez wrote: Hi all! I'm just recently starting to use dnsmasq and I'm facing a problem, maybe it's trivial but I haven't found the answer. I've configured dnsmasq to set specific IP addresses to some hosts, like this: domain = ea4rct.org http://ea4rct.org dhcp-host=00:e0:4c:a4:13:ac,foxtrot,192.168.0.6,1w I'd like the name, foxtrot, to be visible from the LAN, so I added: address=/foxtrot.ea4rct.org/192.168.0.6 http://foxtrot.ea4rct.org/192.168.0.6 This way, local computers can just use foxtrot or foxtrot.ea4rct.org http://foxtrot.ea4rct.org as the name for this computer. But this is repetitive and error-prone. Is it possible to avoid the _address_ line, which is redundant? Yes, just delete those lines. It will all Just Work. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss -- Álvaro Gámez Machado ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
On 20/07/12 11:56, Alvaro Gamez wrote: Uh, I was asking because that didn't work :) Without the address line: root@alfa:/etc/dnsmasq.d# grep zulu radio #address=/zulu.ea4rct.org/192.168.0.254 http://zulu.ea4rct.org/192.168.0.254 dhcp-host=00:18:84:12:7e:10,zulu,192.168.0.254,1w root@alfa:/etc/dnsmasq.d# !hos host zulu.ea4rct.org http://zulu.ea4rct.org Host zulu.ea4rct.org http://zulu.ea4rct.org not found: 3(NXDOMAIN) With it: root@alfa:/etc/dnsmasq.d# grep zulu radio address=/zulu.ea4rct.org/192.168.0.254 http://zulu.ea4rct.org/192.168.0.254 dhcp-host=00:18:84:12:7e:10,zulu,192.168.0.254,1w root@alfa:/etc/dnsmasq.d# host zulu.ea4rct.org http://zulu.ea4rct.org zulu.ea4rct.org http://zulu.ea4rct.org has address 192.168.0.254 Thanks! Do the host actually have DHCP leases? If there exists a current DHCP lease for a host called zulu, and you've configured --domain=ea4rct.org then an A record for zulu.ea4rct.org will exist. Try looking in /var/lib/misc/dnsmasq.leases for the IP address and name. Cheers, Simon. 2012/7/20 Simon Kelley si...@thekelleys.org.uk mailto:si...@thekelleys.org.uk On 20/07/12 11:30, Alvaro Gamez wrote: Hi all! I'm just recently starting to use dnsmasq and I'm facing a problem, maybe it's trivial but I haven't found the answer. I've configured dnsmasq to set specific IP addresses to some hosts, like this: domain = ea4rct.org http://ea4rct.org http://ea4rct.org dhcp-host=00:e0:4c:a4:13:ac,foxtrot,192.168.0.6,1w I'd like the name, foxtrot, to be visible from the LAN, so I added: address=/foxtrot.ea4rct.org/192.168.0.6 http://foxtrot.ea4rct.org/192.168.0.6 http://foxtrot.ea4rct.org/192.168.0.6 This way, local computers can just use foxtrot or foxtrot.ea4rct.org http://foxtrot.ea4rct.org http://foxtrot.ea4rct.org as the name for this computer. But this is repetitive and error-prone. Is it possible to avoid the _address_ line, which is redundant? Yes, just delete those lines. It will all Just Work. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk mailto:Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss -- Álvaro Gámez Machado ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Using dhcp-host hostname as address for DNS
2012/7/20 Simon Kelley si...@thekelleys.org.uk Indeed. Looking at your orignal post, change 1w to 7d. Days is the biggest time unit dnsmasq knows about, and the 1w string may confuse the heuristic argument parsing. Well spotted! It never occured to me, I though 'w' would work fine, but indeed that was the problem. dnsmasq now resolves zulu and other hosts on the network without the need for an additional address directive. Thanks a lot, you've just saved me days of headaches! That might be enough to fix things, if not set --log-dhcp and take a look in system logs. That should give you information about what's happening. Cheers, Simon. -- Álvaro Gámez Machado ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss