Hi All, 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, 192.168.24.0/24, 192.168.25.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 whether 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 Cheers Tim
# Configuration file for dnsmasq. # # Add other name servers here, with domain specs if they are for # non-public domains. #server=/localnet/192.168.0.1 server=/masked.dom/192.168.20.6 # Add domains which you want to force to an IP address here. # The example below send any host in doubleclick.net to a local # webserver. #address=/doubleclick.net/127.0.0.1 address=/pthsvr1/192.168.22.2 address=/pthsvr1.masked.dom/192.168.22.2 address=/proxy2.masked.dom/192.168.22.2 # 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. interface=eth0 interface=eth1 interface=eth2 interface=eth3 # 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. no-dhcp-interface=eth0 # Set this (and domain: see below) if you want to have a domain # automatically added to simple names in a hosts-file. expand-hosts # 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" domain=masked.dom # 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 # service. dhcp-range=set:printer,192.168.22.101,192.168.22.129,5m dhcp-range=set:async,192.168.24.100,192.168.24.150,5m dhcp-range=set:sync,192.168.25.100,192.168.25.150,5m # This is an example of a DHCP range with a network-id, so that # some DHCP options may be set only for this network. #dhcp-range=red,192.168.0.50,192.168.0.150 # Always allocate the host with ethernet address 11:22:33:44:55:66 # The IP address 192.168.0.60 #dhcp-host=11:22:33:44:55:66,192.168.0.60 dhcp-host=00:0f:ea:43:d5:2f,192.168.25.101,5m,net:sync dhcp-host=00:14:85:fd:c3:e9,192.168.25.102,5m,net:sync dhcp-host=00:14:85:ff:61:55,192.168.24.103,5m,net:async dhcp-host=00:0f:ea:42:92:aa,192.168.24.104,5m,net:async dhcp-host=00:0f:ea:43:d4:bf,192.168.24.105,5m,net:async dhcp-host=00:14:85:fd:ca:85,192.168.24.106,5m,net:async dhcp-host=00:14:85:fd:d5:08,192.168.24.107,5m,net:async dhcp-host=00:1d:7d:78:f7:b9,192.168.24.108,5m,net:async dhcp-host=00:24:be:c6:8d:fc,192.168.24.109,5m,net:async # 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. #read-ethers # Override the default route supplied by dnsmasq, which assumes the # router is the same machine as the one running dnsmasq. #dhcp-option=3,1.2.3.4 dhcp-option=sync,3,192.168.25.1 dhcp-option=6,192.168.20.6 dhcp-option=async,3,192.168.24.1 ## Set additional routes for printers dhcp-option=sync,33,192.168.22.0/24,192.168.25.2 dhcp-option=async,33,192.168.22.0/24,192.168.24.2 # The following DHCP options set up dnsmasq in the same way as is specified # for the ISC dhcpcd in # http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt # 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 dhcp-option=44,192.168.20.6
