[Dnsmasq-discuss] how to track changes for a given hostname

Simon Kelley simon at thekelleys.org.uk
Sun Jun 1 20:14:23 UTC 2014


On 30/05/14 11:05, Olaf Hering wrote:
> 
> My dnsmasq sometimes forgets the hostname of one of my boxes. I wonder
> how to track that without tweaking the source?
> 
> My reconnect script reports:
> ...
> ssh: connect to host optiplex port 22: Connection refused
> rc '255'. root at optiplex @ Fr 30. Mai 11:27:43 CEST 2014
> ssh: connect to host optiplex port 22: Connection refused
> rc '255'. root at optiplex @ Fr 30. Mai 11:29:01 CEST 2014
> ssh: Could not resolve hostname optiplex: Name or service not known
> rc '255'. root at optiplex @ Fr 30. Mai 11:30:20 CEST 2014
> ssh: Could not resolve hostname optiplex: Name or service not known
> rc '255'. root at optiplex @ Fr 30. Mai 11:31:40 CEST 2014
> ...
> 
> 
> My setup is like this:
> 
>  * A FritzBox 7360, which acts as DHCP and DNS server.
>  * My Workststation running openSUSE 11.4, with dnsmasq-2.70, it acts as DNS
>    for localhost and as DHCP proxy to provide TFTP to other hosts.
>    Compile time options: IPv6 GNU-getopt no-DBus i18n IDN DHCP DHCPv6
>    no-Lua TFTP no-conntrack ipset auth no-DNSSEC
> 
>  * A Testhost named optiplex. It is reachable with IPv4 and IPv6.
> 
> When the failure above happens, my workstation fails to resolve
> optiplex. Restarting dnsmasq helps.
> 
> olaf at probook:~ $ host optiplex
> olaf at probook:~ $ host optiplex fritz.box
> Using domain server:
> Name: fritz.box
> Address: fd00::a96:d7ff:feb1:1e3d#53
> Aliases: 
> 
> optiplex.fritz.box has address 192.168.2.102
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:baac:6fff:fea3:7d0a
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::baac:6fff:fea3:7d0a
> olaf at probook:~ $ host optiplex 192.168.2.1
> Using domain server:
> Name: 192.168.2.1
> Address: 192.168.2.1#53
> Aliases: 
> 
> optiplex.fritz.box has address 192.168.2.102
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:baac:6fff:fea3:7d0a
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::baac:6fff:fea3:7d0a
> olaf at probook:~ $ 
> 
> olaf at probook:~ $ sudo su -
> root's password:
> root at probook:~ # rcdnsmasq restart
> Shutting name service masq caching server done
> Starting name service masq caching server done
> root at probook:~ # logout
> olaf at probook:~ $ host optiplex
> optiplex.fritz.box has address 192.168.2.102
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:baac:6fff:fea3:7d0a
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::baac:6fff:fea3:7d0a
> olaf at probook:~ $ host optiplex fritz.box
> Using domain server:
> Name: fritz.box
> Address: fd00::a96:d7ff:feb1:1e3d#53
> Aliases: 
> 
> optiplex.fritz.box has address 192.168.2.102
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:baac:6fff:fea3:7d0a
> optiplex.fritz.box has IPv6 address 2001:a60:1011:601:30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::30e6:8090:5088:397
> optiplex.fritz.box has IPv6 address fd00::baac:6fff:fea3:7d0a
> olaf at probook:~ $ 
> 
> 
> How can I find out why optiplex fails to resolve?
> 
> 
> Olaf
> 

Look at --dhcp-script in the man page. A very simple script which logs
argv and the environment to a file should provide you with information
about the comings and going of DHCP leases.



Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list