[Dnsmasq-discuss] problems with serving multiple networks, static assignments and default routes
tim at theallinghams.com
Sun Aug 8 14:00:26 BST 2010
I've currently got an issue with a dnsmasq config. the basic outline of
the setup is
1) the server has 3 interfaces on separate networks, 192.168.22.0/24,
2) The server is configured with 3 dhcp-range declarations - one per
network above, serving addresses in the 100-150 range of the subnets.
3) each subnet is assigned a tag - printers, async, sync.
4) based on the tag, a different gateway is being passed to the clients
(not the interface of the dnsmasq server)
5) PC's all have a static assignment configured for them, along with the
applicable network tag
Basically the problem I'm running into is that the PC's aren't reliably
assigned an address from their range, and almost never their static.
One issue is potentially the fact that the 3 networks span the same
hardware (ie common switchgear) but had expected the static assignments
to alleviate potential problems from this.
one config I have considered is setting up multple addresses on the one
interface (ie eth0, eth0:0, eth0:1) and serving DHCP/DNS only from
these, with the other 2 becoming solely upstream interfaces.
I've attached the config, I'm hoping someone can shed some light on
A) this is possible with dnsmasq (as far as I can see it shouldn't be an
issue, I've done a similar thing across 2 networks previously)
B) the physical layout is likely the issue
C) where I'm going wrong in implementing this
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
# Configuration file for dnsmasq.
# Add other name servers here, with domain specs if they are for
# non-public domains.
# Add domains which you want to force to an IP address here.
# The example below send any host in doubleclick.net to a local
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
# If you want dnsmasq to provide only DNS service on an interface,
# configure it as shown above, and then use the following line to
# disable DHCP on it.
# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
# as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# This is an example of a DHCP range with a network-id, so that
# some DHCP options may be set only for this network.
# Always allocate the host with ethernet address 11:22:33:44:55:66
# The IP address 192.168.0.60
# If this line is uncommented, dnsmasq will read /etc/ethers and act
# on the ethernet-address/IP pairs found there just as if they had
# been given as --dhcp-host options. Useful if you keep
# MAC-address/host mappings there for other purposes.
# Override the default route supplied by dnsmasq, which assumes the
# router is the same machine as the one running dnsmasq.
## Set additional routes for printers
# The following DHCP options set up dnsmasq in the same way as is specified
# for the ISC dhcpcd in
# adapted for a typical dnsmasq installation where the host running
# dnsmasq is also the host running samba.
# you may want to uncomment some or all of them if you use
# Windows clients and Samba.
#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
More information about the Dnsmasq-discuss