Re: [Dnsmasq-discuss] Announce: dnsmasq-2.67rc1
- Original Message - Dnsmasq 2.67rc1 is now available at: http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.67rc1.tar.gz Hi. Great news Simon. I noticed there is already rc2. Do you have any estimation when could be a stable version released if everything goes smoothly? I have been rebasing dnsmasq in Fedora regularly to get it tested. So fare there were no complains. I also scanned the 2.67rc2 with Coverity and there were no bugs worth of fixing added since 2.66. Thanks. Regards, Tomas ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about Adding IPv6 External DNS Servers to dnsmasq
On 02/10/13 23:07, Patrick Dickey wrote: Hello Simon, Thanks for your quick response. Here's my issue, if you will. When I go to www.test-ipv6.com and run their tests, the last one fails, because if I ever shut off IPv4 on my network, I don't have IPv6 DNS Servers listed. Which is what I'm trying to accomplish here. I tried adding them to my router, but the IOS is old enough that it doesn't support propagating them to my computers. Since Amahi moved to dnsmasq from BIND, I want to add them to dnsmasq. Is the test which is failing Test if your ISP's DNS server uses IPv6? Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about Adding IPv6 External DNS Servers to dnsmasq
Hi, if the failing test is only the last one: Your DNS server (possibly run by your ISP) appears to have no access to the IPv6 internet, or it is not configured to use it, then you are perfectly fine! The message is a little bit misleading, but if you understand what's happening its quite clear: This test checks, if the *last* nameserver in the chain uses IPv6 to connect the nameserver responsible for the requested domain (the trick they use is to return a different IP address for requests coming in with IPv4 and IPv6). As dnsmasq does not do recursive lookups and just delegates to another nameserver at your ISP (or OpenDNS,as you configured it), your ISP's caching nameserver does this request to the final destination. If this connection (ISP nameserver - responsible nameserver) is done by IPv4, the test fails. It does not matter if your own nameserver uses IPv6 or if your own nameserver connects via IPv6 to the ISP's nameserver. Here is only tests if the connection to the responsible final nameserver is done via IPv6. As you have no access to your ISP's nameserver, there is nothing you can do. And it does not matter at all. If your ISP switches to IPv6 completely, they have to fix this, too - but it is out of your control. Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de -Original Message- From: dnsmasq-discuss-boun...@lists.thekelleys.org.uk [mailto:dnsmasq- discuss-boun...@lists.thekelleys.org.uk] On Behalf Of Patrick Dickey Sent: Thursday, October 03, 2013 12:07 AM To: dnsmasq-discuss@lists.thekelleys.org.uk Subject: Re: [Dnsmasq-discuss] Questions about Adding IPv6 External DNS Servers to dnsmasq Message: 4 Date: Tue, 01 Oct 2013 21:14:04 +0100 From: Simon Kelley si...@thekelleys.org.uk To: dnsmasq-discuss@lists.thekelleys.org.uk Subject: Re: [Dnsmasq-discuss] Questions about adding IPv6 external DNS servers to dnsmasq Message-ID: 524b2d0c.2030...@thekelleys.org.uk Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 01/10/13 19:26, Patrick Dickey wrote: Hello there, I'm running a dual-stack IPv4/IPv6 network, where my IPv6 address is handled through a tunnel service (TunnelBroker). My router handles the IPv6 DHCP, but doesn't hand out the DNS server information. I have an Amahi Server running dnsmasq that handles my IPv4 DHCP and all DNS information. Currently it's only using the IPv4 DNS Servers, as it has never been configured with IPv6 entries. What I need to do is set dnsmasq up so that it can handle both IPv4 and IPv6 resolution. In the /etc/dnsmasq.conf file, I see the following lines # Send DHCPv6 option. Note [] around IPv6 addresses. #dhcp-option=option6:dns-server,[1234::77],[1234::88] # Send DHCPv6 option for namservers as the machine running # dnsmasq and another. #dhcp-option=option6:dns-server,[::],[1234::88] My questions are these: 1. If I uncomment these lines, and include the IPv6 addresses that I want to use (OpenDNS addresses), will this get sent out to the networked computers? No, because dnsmasq is not doing DHCPv6 for your network. 2. If I uncomment these lines, and include the IPv6 addresses, will dnsmasq use those addresses to resolve IPv6? No, that's not what they do. You can put IPv6 addresses in /etc/resolv.conf or server= lines in /etc/dnsmasq.conf to do that. 3. Do I need to include my IPv6 address for the dnsmasq (Amahi) server somewhere in either dnsmasq.conf or resolv.conf, in order to tell all networked computers to ask it for IPv6 addresses? (I ask this, because currently my networked computers are told to ask only the Amahi server for IPv4 DNS resolution, so I need that to happen with IPv6 also). You can do. but see above and below. 4. What exactly do these two sets of configurations do, as the comment really doesn't explain it (only tells you what you're configuring)? 5. If editing these lines won't work, will adding the entries at the bottom of the dnsmasq.conf file do what I need? I'm mainly asking #4 because I can't find anything online that really explains what this option does, or how to actually *configure* your network for IPv6 DNS resolution. A final question is this: Will this work as I intend, or do I need to have dnsmasq handle my IPv6 DHCP also? I can either turn off the DHCP on my router (Cisco 2514 series), or if worse comes to worse, have the server handle updating my tunnel also. But, I'd prefer not to do this, in case the server is down (then at least I'll have IPv6 connectivity). Thank you for any information, and have a great day.:) Patrick. So, the rules are that you can only hand out IPv6 DNS server addresses via DHCPv6 and IPv4 nameserver addresses via DHCPv4. But, you probably don't need to worry about this because a nameserver
Re: [Dnsmasq-discuss] Reg: Info related to leases file
Yes. I just added contrib/mactable/macscript to the git repo, which is your previous script slightly less elegantly modified by me for this circumstance. I also put back the make new file then atomically rename behaviour since that means anything using this file doesn't risk a race condition leading to a half-written file. I gave a try to the --dhcp-script option of dnsmasq. Following are the findings: Script used: (a little modified version of http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob_plain;f=contrib/mactable/macscript;hb=HEAD): #!/bin/bash STATUS_FILE=/var/lib/libvirt/ dnsmasq/dnsmasq-ip-mac.status # Script for dnsmasq lease-change hook. # Maintains the above file with a IP address/MAC address pairs, # one lease per line. Works with IPv4 and IPv6 leases, file is # atomically updated, so no races for users of the data. action=$1 mac=$2 # IPv4 ip=$3 expirytime=$DNSMASQ_LEASE_EXPIRES hostname=$DNSMASQ_SUPPLIED_HOSTNAME clientid=$DNSMASQ_CLIENT_ID # ensure it always exists. if [ ! -f $STATUS_FILE ]; then touch $STATUS_FILE fi if [ -n $DNSMASQ_IAID ]; then mac=$DNSMASQ_MAC # IPv6 clientid=$2 fi # worry about an add or old action when the MAC address is not known: # leave any old one in place in that case. if [ $action = add -o $action = old -o $action = del ]; then if [ -n $mac -o $action = del ]; then sed /^${ip//./\.} / d $STATUS_FILE $STATUS_FILE.new if [ $action = add -o $action = old ]; then echo $expirytime $mac $ip $hostname $clientid $STATUS_FILE.new fi mv $STATUS_FILE.new $STATUS_FILE # atomic update. fi fi Changes made to libvirt code: diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 8787bdb..7f9a74f 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1058,6 +1058,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkObjPtr network, cmd = virCommandNew(dnsmasqCapsGetBinaryPath(caps)); virCommandAddArgFormat(cmd, --conf-file=%s, configfile); +virCommandAddArgFormat(cmd, --dhcp-script=%s, /var/lib/libvirt/dnsmasq/macscript.sh); *cmdout = cmd; ret = 0; cleanup: In dnsmasq version 2.65 (latest on f18 repos), useful variables that were set: In the case of ipv4: $1=add $2=52:54:00:95:41:5d $3=192.168.100.128 DNSMASQ_INTERFACE=virbr0 DNSMASQ_TAGS=virbr0 DNSMASQ_TIME_REMAINING=3600 DNSMASQ_LEASE_EXPIRES=1380745674 In the case of ipv6: $1=add $2=00:01:00:01:19:df:2e:19:52:54:00:24:13:15 $3=2001:db8:ca2:2:1::45 DNSMASQ_INTERFACE=virbr3 DNSMASQ_TAGS=dhcpv6 virbr3 DNSMASQ_SERVER_DUID=00:01:00:01:19:df:29:7e:f0:4d:a2:8c:14:51 DNSMASQ_IAID=2364181 DNSMASQ_TIME_REMAINING=3600 DNSMASQ_LEASE_EXPIRES=1380745131 In the latest dnsmasq version 2.67rc2-3-g889d8a1 (built after cloning from git://thekelleys.org.uk/dnsmasq.git), useful variables that were set: In the case of ipv4: add 52:54:00:1a:a1:55 192.168.100.204 DNSMASQ_INTERFACE=virbr0 DNSMASQ_LEASE_EXPIRES=1380749702 DNSMASQ_TAGS=virbr0 DNSMASQ_TIME_REMAINING=3600 In the case of ipv6: add 00:01:00:01:19:df:3a:8e:52:54:00:7d:49:25 2001:db8:ca2:2:1::f5 DNSMASQ_IAID=8210725 DNSMASQ_INTERFACE=virbr3 DNSMASQ_LEASE_EXPIRES=1380748320 DNSMASQ_MAC=52:54:00:7d:49:25 DNSMASQ_SERVER_DUID= DNSMASQ_TAGS=dhcpv6 virbr3 DNSMASQ_TIME_REMAINING=3600 So, in case of latest dnsmasq code, output in dnsmasq-ip-mac.status: 1380747917 52:54:00:82:5e:09 2001:db8:ca2:2:1::79 1380747943 52:54:00:61:bd:d8 2001:db8:ca2:2:1::88 1380748110 52:54:00:15:1e:05 192.168.100.180 1380748320 52:54:00:7d:49:25 2001:db8:ca2:2:1::f5 00:01:00:01:19:df:3a:8e:52:54:00:7d:49:25 1380749702 52:54:00:1a:a1:55 192.168.100.204 1380749877 52:54:00:73:0a:27 192.168.100.190 1380749879 52:54:00:b7:87:3e 2001:db8:ca2:2:1::3e 00:01:00:01:19:df:40:a6:52:54:00:b7:87:3e 1380749880 52:54:00:bc:55:df 2001:db8:ca2:2:1::8f 00:01:00:01:19:df:40:a6:52:54:00:bc:55:df 1380749880 52:54:00:b7:87:3e 2001:db8:ca2:2:1::3e 00:01:00:01:19:df:40:a6:52:54:00:b7:87:3e Apologies for the long message. Queries: (i) Why is DNSMASQ_SERVER_DUID blank in case of ipv6 (dnsmasq 2.67rc2-3-g889d8a1) ? Is it an issue with libvirt code or dnsmasq? (ii) When will be dnsmasq version 2.67rc2-3-g889d8a1 be out as tarball and when will it be available in the fedora repositories? (I don't know who maintains the package buildings, but a tentative date would be fine) -- Nehal J Wani ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] How to see how addresses are resolved - i.e. a sort of DNS traceroute?
I want to check how addresses are resolved on my LAN, is there an easy[ish] way of finding where DNS requests are sent and where they are finally resolved (or at least where they leave my LAN)? With the latest fashion of using dnsmasq on all machines to provide local caching of DNS it's quite difficult to check if things are going the way one expects. I run my own dnsmasq (as opposed to the local caching one installed by Ubuntu etc.) on a server machine on the LAN. So I have (along with a lot of other bits and pieces):- ADSL router 192.168.1.1 Server running dnsmasq 192.168.1.2 My desktop machine 192.168.1.4 ... ... The router has two connections to the internet which it load balances so DNS might go out direct from it to one ISP's DNS servers or it might go out on its WAN/ethernet port to another ADSL modem which uses a different ISP. I just want to check how various things are looked up to make sure that DNS is resolved through the right route. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Problem when system has both hardwired and wireless connections
I have just noticed that my system running dnsmasq keeps repeating this sequence in syslog:- Oct 3 14:33:47 revo dhclient: DHCPREQUEST of 192.168.1.148 on wlan0 to 192.168.1.2 port 67 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 available DHCP range: 192.168.1.80 -- 192.168.1.150 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 client provides name: revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPREQUEST(lo) 192.168.1.148 00:25:56:1f:ba:69 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 tags: lo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPACK(lo) 192.168.1.148 00:25:56:1f:ba:69 revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 15:domain-name, 6:dns-server, 119:domain-search, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 121:classless-static-route, 249, 252, 42:ntp-server Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 next server: 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 1 option: 53 message-type 5 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 54 server-identifier 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 51 lease-time 1h Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 58 T1 27m30s Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 59 T2 50m Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 1 netmask 255.255.255.0 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 28 broadcast 192.168.1.255 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 6 dns-server 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 7 option: 15 domain-name zbmc.eu Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 12 hostname revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 3 router 192.168.1.1 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo.zbmc.eu to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Is there any simple way to stop it doing this - apart from turning the wireless off? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Reg: Info related to leases file
On 03/10/13 14:05, Nehal J Wani wrote: Yes. I just added contrib/mactable/macscript to the git repo, which is your previous script slightly less elegantly modified by me for this circumstance. I also put back the make new file then atomically rename behaviour since that means anything using this file doesn't risk a race condition leading to a half-written file. I gave a try to the --dhcp-script option of dnsmasq. Following are the findings: Script used: (a little modified version of http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob_plain;f=contrib/mactable/macscript;hb=HEAD): #!/bin/bash STATUS_FILE=/var/lib/libvirt/ dnsmasq/dnsmasq-ip-mac.status # Script for dnsmasq lease-change hook. # Maintains the above file with a IP address/MAC address pairs, # one lease per line. Works with IPv4 and IPv6 leases, file is # atomically updated, so no races for users of the data. action=$1 mac=$2 # IPv4 ip=$3 expirytime=$DNSMASQ_LEASE_EXPIRES hostname=$DNSMASQ_SUPPLIED_HOSTNAME clientid=$DNSMASQ_CLIENT_ID # ensure it always exists. if [ ! -f $STATUS_FILE ]; then touch $STATUS_FILE fi if [ -n $DNSMASQ_IAID ]; then mac=$DNSMASQ_MAC # IPv6 clientid=$2 fi # worry about an add or old action when the MAC address is not known: # leave any old one in place in that case. if [ $action = add -o $action = old -o $action = del ]; then if [ -n $mac -o $action = del ]; then sed /^${ip//./\.} / d $STATUS_FILE $STATUS_FILE.new if [ $action = add -o $action = old ]; then echo $expirytime $mac $ip $hostname $clientid $STATUS_FILE.new fi mv $STATUS_FILE.new $STATUS_FILE # atomic update. fi fi Changes made to libvirt code: diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 8787bdb..7f9a74f 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1058,6 +1058,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkObjPtr network, cmd = virCommandNew(dnsmasqCapsGetBinaryPath(caps)); virCommandAddArgFormat(cmd, --conf-file=%s, configfile); +virCommandAddArgFormat(cmd, --dhcp-script=%s, /var/lib/libvirt/dnsmasq/macscript.sh); *cmdout = cmd; ret = 0; cleanup: In dnsmasq version 2.65 (latest on f18 repos), useful variables that were set: In the case of ipv4: $1=add $2=52:54:00:95:41:5d $3=192.168.100.128 DNSMASQ_INTERFACE=virbr0 DNSMASQ_TAGS=virbr0 DNSMASQ_TIME_REMAINING=3600 DNSMASQ_LEASE_EXPIRES=1380745674 In the case of ipv6: $1=add $2=00:01:00:01:19:df:2e:19:52:54:00:24:13:15 $3=2001:db8:ca2:2:1::45 DNSMASQ_INTERFACE=virbr3 DNSMASQ_TAGS=dhcpv6 virbr3 DNSMASQ_SERVER_DUID=00:01:00:01:19:df:29:7e:f0:4d:a2:8c:14:51 DNSMASQ_IAID=2364181 DNSMASQ_TIME_REMAINING=3600 DNSMASQ_LEASE_EXPIRES=1380745131 In the latest dnsmasq version 2.67rc2-3-g889d8a1 (built after cloning from git://thekelleys.org.uk/dnsmasq.git), useful variables that were set: In the case of ipv4: add 52:54:00:1a:a1:55 192.168.100.204 DNSMASQ_INTERFACE=virbr0 DNSMASQ_LEASE_EXPIRES=1380749702 DNSMASQ_TAGS=virbr0 DNSMASQ_TIME_REMAINING=3600 In the case of ipv6: add 00:01:00:01:19:df:3a:8e:52:54:00:7d:49:25 2001:db8:ca2:2:1::f5 DNSMASQ_IAID=8210725 DNSMASQ_INTERFACE=virbr3 DNSMASQ_LEASE_EXPIRES=1380748320 DNSMASQ_MAC=52:54:00:7d:49:25 DNSMASQ_SERVER_DUID= DNSMASQ_TAGS=dhcpv6 virbr3 DNSMASQ_TIME_REMAINING=3600 So, in case of latest dnsmasq code, output in dnsmasq-ip-mac.status: 1380747917 52:54:00:82:5e:09 2001:db8:ca2:2:1::79 1380747943 52:54:00:61:bd:d8 2001:db8:ca2:2:1::88 1380748110 52:54:00:15:1e:05 192.168.100.180 1380748320 52:54:00:7d:49:25 2001:db8:ca2:2:1::f5 00:01:00:01:19:df:3a:8e:52:54:00:7d:49:25 1380749702 52:54:00:1a:a1:55 192.168.100.204 1380749877 52:54:00:73:0a:27 192.168.100.190 1380749879 52:54:00:b7:87:3e 2001:db8:ca2:2:1::3e 00:01:00:01:19:df:40:a6:52:54:00:b7:87:3e 1380749880 52:54:00:bc:55:df 2001:db8:ca2:2:1::8f 00:01:00:01:19:df:40:a6:52:54:00:bc:55:df 1380749880 52:54:00:b7:87:3e 2001:db8:ca2:2:1::3e 00:01:00:01:19:df:40:a6:52:54:00:b7:87:3e Apologies for the long message. Queries: (i) Why is DNSMASQ_SERVER_DUID blank in case of ipv6 (dnsmasq 2.67rc2-3-g889d8a1) ? Is it an issue with libvirt code or dnsmasq? I don't know. It's working fine for me in a fairly standard dnsmasq installation, which is some evidence that it's a libvirt thing, but not strong evidence. On the other hand, the code that deals with that has been touched, so the difference between 2.65 and the latest code is suspicious. I'd be interested in any clues you can find about what's going on. (ii) When will be dnsmasq version 2.67rc2-3-g889d8a1 be out as tarball and when will it be available in the fedora repositories? (I don't know who maintains the package buildings, but a tentative date would be fine) You can get a tarball of any state of the git repository, including the latest, from http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=summary The snapshot links on the right allow you to download tarballs.
Re: [Dnsmasq-discuss] How to see how addresses are resolved - i.e. a sort of DNS traceroute?
On 03/10/13 14:25, Chris Green wrote: I want to check how addresses are resolved on my LAN, is there an easy[ish] way of finding where DNS requests are sent and where they are finally resolved (or at least where they leave my LAN)? --log-queries With the latest fashion of using dnsmasq on all machines to provide local caching of DNS it's quite difficult to check if things are going the way one expects. I run my own dnsmasq (as opposed to the local caching one installed by Ubuntu etc.) on a server machine on the LAN. So I have (along with a lot of other bits and pieces):- ADSL router 192.168.1.1 Server running dnsmasq 192.168.1.2 My desktop machine 192.168.1.4 ... ... The router has two connections to the internet which it load balances so DNS might go out direct from it to one ISP's DNS servers or it might go out on its WAN/ethernet port to another ADSL modem which uses a different ISP. I just want to check how various things are looked up to make sure that DNS is resolved through the right route. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Problem when system has both hardwired and wireless connections
On 03/10/13 14:38, Chris Green wrote: I have just noticed that my system running dnsmasq keeps repeating this sequence in syslog:- Oct 3 14:33:47 revo dhclient: DHCPREQUEST of 192.168.1.148 on wlan0 to 192.168.1.2 port 67 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 available DHCP range: 192.168.1.80 -- 192.168.1.150 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 client provides name: revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPREQUEST(lo) 192.168.1.148 00:25:56:1f:ba:69 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 tags: lo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPACK(lo) 192.168.1.148 00:25:56:1f:ba:69 revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 15:domain-name, 6:dns-server, 119:domain-search, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 121:classless-static-route, 249, 252, 42:ntp-server Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 next server: 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 1 option: 53 message-type 5 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 54 server-identifier 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 51 lease-time 1h Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 58 T1 27m30s Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 59 T2 50m Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 1 netmask 255.255.255.0 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 28 broadcast 192.168.1.255 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 6 dns-server 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 7 option: 15 domain-name zbmc.eu Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 12 hostname revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 3 router 192.168.1.1 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo.zbmc.eu to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Is there any simple way to stop it doing this - apart from turning the wireless off? What do you want to achieve? having revo.zbmc.eu resolve to both wired and wireless addresses, or just suppressing the warnings? Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Problem when system has both hardwired and wireless connections
On Thu, Oct 03, 2013 at 02:58:23PM +0100, Simon Kelley wrote: On 03/10/13 14:38, Chris Green wrote: I have just noticed that my system running dnsmasq keeps repeating this sequence in syslog:- Oct 3 14:33:47 revo dhclient: DHCPREQUEST of 192.168.1.148 on wlan0 to 192.168.1.2 port 67 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 available DHCP range: 192.168.1.80 -- 192.168.1.150 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 client provides name: revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPREQUEST(lo) 192.168.1.148 00:25:56:1f:ba:69 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 tags: lo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPACK(lo) 192.168.1.148 00:25:56:1f:ba:69 revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 15:domain-name, 6:dns-server, 119:domain-search, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 121:classless-static-route, 249, 252, 42:ntp-server Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 next server: 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 1 option: 53 message-type 5 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 54 server-identifier 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 51 lease-time 1h Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 58 T1 27m30s Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 59 T2 50m Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 1 netmask 255.255.255.0 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 28 broadcast 192.168.1.255 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 6 dns-server 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 7 option: 15 domain-name zbmc.eu Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 12 hostname revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 3 router 192.168.1.1 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo.zbmc.eu to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Is there any simple way to stop it doing this - apart from turning the wireless off? What do you want to achieve? having revo.zbmc.eu resolve to both wired and wireless addresses, or just suppressing the warnings? Hmm, that's a good question! :-) revo.zbmc.eu is the server machine on my network which runs dnsmasq and has the following in its /etc/hosts file:- 192.168.1.1 vigor 2820n 192.168.1.2 revo dns 192.168.1.4 chris zbmc.eu 192.168.1.5 maxinexp 192.168.1.6 ben 192.168.13.254 2wire BT2700HGV gateway.2wire.net The ideal would be that if the hardwired connection to 192.168.1.2 fails then revo.zbmc.eu would still be available as DNS server via its wireless connection. Can it be set up to provide two DNS addresses to DHCP clients with one being the existing hardwired one and the other being the wireless one? The wireless connection can obviously have a different name like revowifi but I'm not quite clear how to do the rest. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How to see how addresses are resolved - i.e. a sort of DNS traceroute?
On Thu, Oct 03, 2013 at 02:54:37PM +0100, Simon Kelley wrote: On 03/10/13 14:25, Chris Green wrote: I want to check how addresses are resolved on my LAN, is there an easy[ish] way of finding where DNS requests are sent and where they are finally resolved (or at least where they leave my LAN)? --log-queries OK, thanks, that was easy! :-) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Reg: Info related to leases file
On Oct 3, 2013, at 8:05 AM, Nehal J Wani wrote: Yes. I just added contrib/mactable/macscript to the git repo, which is your previous script slightly less elegantly modified by me for this circumstance. I also put back the make new file then atomically rename behaviour since that means anything using this file doesn't risk a race condition leading to a half-written file. I gave a try to the --dhcp-script option of dnsmasq. Following are the findings: Script used: (a little modified version of http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob_plain;f=contrib/mactable/macscript;hb=HEAD): #!/bin/bash STATUS_FILE=/var/lib/libvirt/ dnsmasq/dnsmasq-ip-mac.status # Script for dnsmasq lease-change hook. # Maintains the above file with a IP address/MAC address pairs, # one lease per line. Works with IPv4 and IPv6 leases, file is # atomically updated, so no races for users of the data. action=$1 mac=$2 # IPv4 ip=$3 expirytime=$DNSMASQ_LEASE_EXPIRES hostname=$DNSMASQ_SUPPLIED_HOSTNAME clientid=$DNSMASQ_CLIENT_ID # ensure it always exists. if [ ! -f $STATUS_FILE ]; then touch $STATUS_FILE fi if [ -n $DNSMASQ_IAID ]; then mac=$DNSMASQ_MAC # IPv6 clientid=$2 fi # worry about an add or old action when the MAC address is not known: # leave any old one in place in that case. if [ $action = add -o $action = old -o $action = del ]; then if [ -n $mac -o $action = del ]; then sed /^${ip//./\.} / d $STATUS_FILE $STATUS_FILE.new if [ $action = add -o $action = old ]; then echo $expirytime $mac $ip $hostname $clientid $STATUS_FILE.new fi mv $STATUS_FILE.new $STATUS_FILE # atomic update. fi fi -- snip -- -- Nehal J Wani Unrelated to your questions, you broke the script by not keeping the $ip as the first field in the status file. The $ip is used as a unique index of sorts. The simple fix would be to put $ip as the first output of your echo command, otherwise some regex work on the sed command is required to match $ip in the middle rather than at the beginning. Lonnie ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Why is dnsmasq reading /var/run/dnsmasq/resolv.conf twice when it starts up?
When I start dnsmasq I see the following in syslog:- Oct 3 16:09:03 revo dnsmasq[2819]: started, version 2.63rc6 cachesize 150 Oct 3 16:09:03 revo dnsmasq[2819]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: DHCP, IP range 192.168.1.80 -- 192.168.1.150, lease time 1h Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: read /etc/hosts - 12 addresses Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo.zbmc.eu to the DHCP lease of 192.168. Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo to the DHCP lease of 192.168.1.148 be Oct 3 16:09:05 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Why is it doing everything twice? While I'm about it, what creates/populates /var/run/dnsmasq/resolv.conf? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Problem when system has both hardwired and wireless connections
On 03/10/13 15:11, Chris Green wrote: On Thu, Oct 03, 2013 at 02:58:23PM +0100, Simon Kelley wrote: On 03/10/13 14:38, Chris Green wrote: I have just noticed that my system running dnsmasq keeps repeating this sequence in syslog:- Oct 3 14:33:47 revo dhclient: DHCPREQUEST of 192.168.1.148 on wlan0 to 192.168.1.2 port 67 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 available DHCP range: 192.168.1.80 -- 192.168.1.150 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 client provides name: revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPREQUEST(lo) 192.168.1.148 00:25:56:1f:ba:69 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 tags: lo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 DHCPACK(lo) 192.168.1.148 00:25:56:1f:ba:69 revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 15:domain-name, 6:dns-server, 119:domain-search, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 requested options: 121:classless-static-route, 249, 252, 42:ntp-server Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 next server: 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 1 option: 53 message-type 5 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 54 server-identifier 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 51 lease-time 1h Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 58 T1 27m30s Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 59 T2 50m Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 1 netmask 255.255.255.0 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 28 broadcast 192.168.1.255 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 6 dns-server 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 7 option: 15 domain-name zbmc.eu Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 12 hostname revo Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: 1192620333 sent size: 4 option: 3 router 192.168.1.1 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo.zbmc.eu to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Oct 3 14:33:47 revo dnsmasq-dhcp[3989]: not giving name revo to the DHCP lease of 192.168.1.148 because the name exists in /etc/hosts with address 192.168.1.2 Is there any simple way to stop it doing this - apart from turning the wireless off? What do you want to achieve? having revo.zbmc.eu resolve to both wired and wireless addresses, or just suppressing the warnings? Hmm, that's a good question! :-) revo.zbmc.eu is the server machine on my network which runs dnsmasq and has the following in its /etc/hosts file:- 192.168.1.1 vigor 2820n 192.168.1.2 revo dns 192.168.1.4 chris zbmc.eu 192.168.1.5 maxinexp 192.168.1.6 ben 192.168.13.254 2wire BT2700HGV gateway.2wire.net The ideal would be that if the hardwired connection to 192.168.1.2 fails then revo.zbmc.eu would still be available as DNS server via its wireless connection. Can it be set up to provide two DNS addresses to DHCP clients with one being the existing hardwired one and the other being the wireless one? The wireless connection can obviously have a different name like revowifi but I'm not quite clear how to do the rest. Hmm, I'm assuming that DHCP requests on your wireless network somehow get back to the wired network on revo? OK, avoid the warning, the easiest thing to do is to fix the config of dhclient on revo to not send a hostname. Actually, scratch that: the easiest thing to do is give the wlan interface on revo a static IP address, in the same way you've done with the wired interface, then configure dnsmasq to send both addresses dhcp-option=6, ip address of revo-wired,ip address of revo-wireless Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Why is dnsmasq reading /var/run/dnsmasq/resolv.conf twice when it starts up?
On 03/10/13 16:29, Chris Green wrote: When I start dnsmasq I see the following in syslog:- Oct 3 16:09:03 revo dnsmasq[2819]: started, version 2.63rc6 cachesize 150 Oct 3 16:09:03 revo dnsmasq[2819]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: DHCP, IP range 192.168.1.80 -- 192.168.1.150, lease time 1h Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: read /etc/hosts - 12 addresses Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo.zbmc.eu to the DHCP lease of 192.168. Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo to the DHCP lease of 192.168.1.148 be Oct 3 16:09:05 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Why is it doing everything twice? Probably because whatever populates /var/run/dnsmasq/resolv.conf alters the modification time just after it starts dnsmasq. While I'm about it, what creates/populates /var/run/dnsmasq/resolv.conf? We need more context to have a hope of answering that. Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Why is dnsmasq reading /var/run/dnsmasq/resolv.conf twice when it starts up?
On Thu, Oct 03, 2013 at 04:42:59PM +0100, Simon Kelley wrote: On 03/10/13 16:29, Chris Green wrote: When I start dnsmasq I see the following in syslog:- Oct 3 16:09:03 revo dnsmasq[2819]: started, version 2.63rc6 cachesize 150 Oct 3 16:09:03 revo dnsmasq[2819]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: DHCP, IP range 192.168.1.80 -- 192.168.1.150, lease time 1h Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: read /etc/hosts - 12 addresses Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo.zbmc.eu to the DHCP lease of 192.168. Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo to the DHCP lease of 192.168.1.148 be Oct 3 16:09:05 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Why is it doing everything twice? Probably because whatever populates /var/run/dnsmasq/resolv.conf alters the modification time just after it starts dnsmasq. That makes sense I guess! While I'm about it, what creates/populates /var/run/dnsmasq/resolv.conf? We need more context to have a hope of answering that. OK. As you may gather I'm playing about a bit with my dnsmasq configuration on the server machine at 192.168.1.2. It's a small Acer Revo machine running Ubuntu 12.10. I recently changed ISP and thus needed to change the DNS servers that dnsmasq uses upstream of itself. That was my first problem because I couldn't find where these are set. I *think* I have found it now, they're in the files in /etc/NetworkManager/system-connections. I have in Wired connection 1:- [802-3-ethernet] duplex=full mac-address=00:01:6C:6C:C7:9B [connection] id=Wired connection 1 uuid=2262541a-2106-4e4d-b2b7-ab631dddcbf1 type=802-3-ethernet timestamp=1361810287 [ipv6] method=ignore [ipv4] method=manual dns=127.0.0.1;212.159.6.9;212.159.13.49; dns-search=zbmc.eu; addresses1=192.168.1.2;24;192.168.1.1; may-fail=false Presumably (relating to the other thread) I can add a 'manual' ipv4 section like the one above to the file in the same directory that relates to the wireless interface. The doing things twice was just something I noticed, probably NetworkManager is doing things at boot time and happens, as you said, to change the file just after dnsmasq reads it. Not a big issue really, it only happens at boot time I think. Hopefully all these things are resolved now and I can leave the list in peace. However I did have one issue where, after rebooting the dnsmasq server machine nothing worked at all (i.e. no DNS or DHCP) until I manually restarted dnsmasq itself. I'll try it all again, carefully, and see if the same happens again. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] question about dns behavior
What does dnsmasq do in the event that it has a cached DNS entry that may be expired but the upstream DNS host isn't reachable? Does it give up and return the cached but expired entry? (That's how I'm hoping it behaves). Thanks, -Craig ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Why is dnsmasq reading /var/run/dnsmasq/resolv.conf twice when it starts up?
On Thu, 2013-10-03 at 17:05 +0100, Chris Green wrote: On Thu, Oct 03, 2013 at 04:42:59PM +0100, Simon Kelley wrote: On 03/10/13 16:29, Chris Green wrote: When I start dnsmasq I see the following in syslog:- Oct 3 16:09:03 revo dnsmasq[2819]: started, version 2.63rc6 cachesize 150 Oct 3 16:09:03 revo dnsmasq[2819]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: DHCP, IP range 192.168.1.80 -- 192.168.1.150, lease time 1h Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:03 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:03 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:03 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Oct 3 16:09:03 revo dnsmasq[2819]: read /etc/hosts - 12 addresses Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo.zbmc.eu to the DHCP lease of 192.168. Oct 3 16:09:03 revo dnsmasq-dhcp[2819]: not giving name revo to the DHCP lease of 192.168.1.148 be Oct 3 16:09:05 revo dnsmasq[2819]: reading /var/run/dnsmasq/resolv.conf Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 192.168.1.2 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 194.72.0.114#53 Oct 3 16:09:05 revo dnsmasq[2819]: using nameserver 212.159.6.10#53 Oct 3 16:09:05 revo dnsmasq[2819]: ignoring nameserver 127.0.0.1 - local interface Oct 3 16:09:05 revo dnsmasq[2819]: using local addresses only for domain zbmc.eu Why is it doing everything twice? Probably because whatever populates /var/run/dnsmasq/resolv.conf alters the modification time just after it starts dnsmasq. That makes sense I guess! While I don't know how Ubuntu has configured it, NetworkManager spawns a private instance of dnsmasq to handle local caching nameserver if you've configured that in /etc/NetworkManager/NetworkManager.conf. Otherwise, it might be some interaction between resolvconf (a resolv.conf manager that Debian-based systems use) and dnsmasq that's set up outside NetworkManager. Dan While I'm about it, what creates/populates /var/run/dnsmasq/resolv.conf? We need more context to have a hope of answering that. OK. As you may gather I'm playing about a bit with my dnsmasq configuration on the server machine at 192.168.1.2. It's a small Acer Revo machine running Ubuntu 12.10. I recently changed ISP and thus needed to change the DNS servers that dnsmasq uses upstream of itself. That was my first problem because I couldn't find where these are set. I *think* I have found it now, they're in the files in /etc/NetworkManager/system-connections. I have in Wired connection 1:- [802-3-ethernet] duplex=full mac-address=00:01:6C:6C:C7:9B [connection] id=Wired connection 1 uuid=2262541a-2106-4e4d-b2b7-ab631dddcbf1 type=802-3-ethernet timestamp=1361810287 [ipv6] method=ignore [ipv4] method=manual dns=127.0.0.1;212.159.6.9;212.159.13.49; dns-search=zbmc.eu; addresses1=192.168.1.2;24;192.168.1.1; may-fail=false Presumably (relating to the other thread) I can add a 'manual' ipv4 section like the one above to the file in the same directory that relates to the wireless interface. The doing things twice was just something I noticed, probably NetworkManager is doing things at boot time and happens, as you said, to change the file just after dnsmasq reads it. Not a big issue really, it only happens at boot time I think. Hopefully all these things are resolved now and I can leave the list in peace. However I did have one issue where, after rebooting the dnsmasq server machine nothing worked at all (i.e. no DNS or DHCP) until I manually restarted dnsmasq itself. I'll try it all again, carefully, and see if the same happens again. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about Adding IPv6 External DNS Servers to dnsmasq
Is the test which is failing Test if your ISP's DNS server uses IPv6? Cheers, Simon. Hi Simon, Yes, that's the test that is failing. Supposedly (since my external DNS is provided by OpenDNS), it should pass. But it's still failing. So, I'm trying to find a way of getting it to look at their IPv6 DNS Servers when necessary. Part of the problem is that the Amahi Server system generates its own config files, which dnsmasq uses. There's a line at the end of dnsmasq.conf, which says confdir= /etc/dnsmasq.d/ (which contains three amahi- generated files). While the files in that config directory claim that you should put any customizations in the dnsmasq.conf file, their control script doesn't read that file (apparently). So, I'm thinking that I'll either have to manually edit their generated configuration files, or add the servers to their script. Message: 2 Date: Thu, 3 Oct 2013 13:27:56 +0200 From: Uwe Schindler u...@thetaphi.de To: pdickeyb...@gmail.com, dnsmasq-discuss@lists.thekelleys.org.uk Subject: Re: [Dnsmasq-discuss] Questions about Adding IPv6 External DNS Servers to dnsmasq Message-ID: 02ec01cec02b$9bbb4070$d331c150$@thetaphi.de Content-Type: text/plain; charset=utf-8 Hi, if the failing test is only the last one: Your DNS server (possibly run by your ISP) appears to have no access to the IPv6 internet, or it is not configured to use it, then you are perfectly fine! The message is a little bit misleading, but if you understand what's happening its quite clear: This test checks, if the *last* nameserver in the chain uses IPv6 to connect the nameserver responsible for the requested domain (the trick they use is to return a different IP address for requests coming in with IPv4 and IPv6). As dnsmasq does not do recursive lookups and just delegates to another nameserver at your ISP (or OpenDNS,as you configured it), your ISP's caching nameserver does this request to the final destination. If this connection (ISP nameserver - responsible nameserver) is done by IPv4, the test fails. It does not matter if your own nameserver uses IPv6 or if your own nameserver connects via IPv6 to the ISP's nameserver. Here is only tests if the connection to the responsible final nameserver is done via IPv6. As you have no access to your ISP's nameserver, there is nothing you can do. And it does not matter at all. If your ISP switches to IPv6 completely, they have to fix this, too - but it is out of your control. Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de So, from what you're saying, it doesn't matter if I give dnsmasq both IPv4 and IPv6 DNS Servers to check? It will check the IPv4 one regardless of whether both are available to use? Everything in my setup is configured to use OpenDNS's servers, and they offer both IPv4 and IPv6 ones to choose from. If this is the case, then until IPv4 dies off, I won't even need to worry about this (as when that time comes, the Amahi script will have to be updated with IPv6 DNS Servers instead of the IPv4 ones they're using now). Thanks both of you for your help with this. Have a great day.:) Patrick. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss