[Dnsmasq-discuss] trouble setting up dnsmasq as local dns + dhcp
server on ubuntu
Simon Kelley
simon at thekelleys.org.uk
Thu Mar 22 15:16:36 GMT 2007
Steve Romanow wrote:
> Hi guys,
>
> I have an install of dnsmasq 2.33-1 on ubuntu edgy. I have had this partially
> working for a couple of months, but it appears the wheels have come off.
>
> The server was multihomed for a short time as I was setting up a webserver
> bound to eth0 for external use and eth1 for internal use. Apache is no
> longer running, but what started out as one or two devices not playing well
> with dhcp has now moved into local dns caching not working at all.
>
> I really do not want to use static ip's. Right now what I have is a mix of
> static and dynamic ip's. the machines that _have_ to be resolved are static,
> and less important devices are still dynamic, with ip reservations based on
> MAC address.
>
> local dns is completely borked right now. Thank you for any advice you guys
> can give. I have made sure that I do not have bind running, competing with
> dnsmasq.
>
> Here are the pertinent files, with MAC addresses changed.
>
> /etc/hosts
> 127.0.0.1 localhost
> 192.168.0.2 cheryl-printer.slestak.homelinux.org cheryl-printer
> 192.168.0.11 steve-printer.slestak.homelinux.org steve-printer
> 192.168.0.21 cheryl-desktop.slestak.homelinux.org cheryl-desktop
> 192.168.0.23 e1505.slestak.homelinux.org e1505
> 192.168.0.24 lizzyloo.slestak.homelinux.org lizzyloo
> 192.168.0.25 roku.slestak.homelinux.org roku
> 192.168.0.100 webserver.slestak.homelinux.org webserver slestak.homelinux.org
> www.slestak.homelinux.org
> # The following lines are desirable for IPv6 capable hosts
> ::1 ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
>
> /etc/dnsmasq
> domain-needed
> bogus-priv
> filterwin2k
> strict-order
> local=/slestak.homelinux.org/
> domain=slestak.homelinux.org
> dhcp-range=192.168.0.50,192.168.0.80,12h
> dhcp-host=00:04:00:b9:xx:xx,cheryl-printer,192.168.0.2,infinite
> dhcp-host=00:0d:9d:5f:xx:xx,cheryl-work-laptop,192.168.0.3,infinite
> dhcp-host=00:11:d9:02:xx:xx,tivo-steve,192.168.0.4,infinite
> dhcp-host=00:11:d9:01:xx:xx,tivo-livingroom,192.168.0.5,infinite
> dhcp-host=00:13:20:84:xx:xx,shoebox,192.168.0.6,infinite
> dhcp-host=00:16:01:41:xx:xx,linkstation,192.168.0.9,infinite
> dhcp-host=00:04:00:79:xx:xx,steve-printer,192.168.0.11,infinite
> dhcp-option=3,192.168.0.1
> dhcp-option=19,0 # option ip-forwarding off
> dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS
> server(s)
> dhcp-option=45,0.0.0.0 # netbios datagram distribution server
> dhcp-option=46,8 # netbios node type
> dhcp-option=47 # empty netbios scope.
> log-queries
>
> steve at webserver:~$ cat /etc/resolv.conf
> nameserver 127.0.0.1
> nameserver 192.168.0.1
> nameserver 4.2.2.3
>
> steve at webserver:~$ sudo ifconfig
> Password:
> eth0 Link encap:Ethernet HWaddr 00:0F:1F:DC:40:66
> inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
> inet6 addr: fe80::20f:1fff:fedc:4066/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:1471357 errors:0 dropped:0 overruns:0 frame:0
> TX packets:890858 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:258406186 (246.4 MiB) TX bytes:146603696 (139.8 MiB)
> Interrupt:169
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:205910 errors:0 dropped:0 overruns:0 frame:0
> TX packets:205910 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:28546979 (27.2 MiB) TX bytes:28546979 (27.2 MiB)
>
>
>
You have log-queries set, so take a look in the log files and see where
your DNS queries are going, and if they are being replied to. One
observation, unless you have a good reason, delete "strict-order" from
the dnsmasq config. It's much more resilient against upstream nameserver
problems without that.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list