1 2 3 Upgrading to dnsmasq V2 4 ----------------------- 5 6Version 1.x of dnsmasq includes a facility for reading the dhcp.leases 7file written by ISC dhcpd. This allows the names of machines which 8have addresses allocated by DHCP to be included in the DNS. 9 10Version 2.x of dnsmasq replaces the ISC dhcpd integration with a DHCP 11server integrated into dnsmasq. Versions 2.0-2.5 removed the ISC 12integration completely, but in version 2.6 it was re-enabled for 13backwards compatibility purposes. The change to an integrated DHCP 14server has the following advantages: 15 16* Small. ISC dhcpd is a large and comprehensive DHCP solution. The 17 dnsmasq DHCP server adds about 15k to DNS-only dnsmasq and provides 18 all the facilities likely to be needed in the sort of networks 19 which are targeted by dnsmasq. 20 21* Easy to configure. All configuration is in one file and there are 22 sensible defaults for common settings. Many applications will need 23 just one extra line in /etc/dnsmasq.conf which tells it the range of 24 addresses to allocate to DHCP. 25 26* Support for static leases. When static leases are used with ISC DHCP 27 they don't appear in the dhcp.leases file (since that file is used 28 for storage of dynamic leases which aren't pre-configured.) Hence 29 static leases cannot be used with dnsmasq unless each machine with a 30 static lease is also inserted into /etc/hosts. This is not required 31 with the dnsmasq DHCP server. 32 33 34 DHCP configuration 35 ------------------ 36 37To convert an installation which is currently using ISC dhcpd, remove 38the ISC DHCP daemon. Unless you want dnsmasq to use the same file 39to store its leases it is necessary to remove the configuration line in 40/etc/dnsmasq.conf which specifies the dhcp.leases file. 41 42To enable DHCP, simply add a line like this to /etc/dnsmasq.conf 43 44dhcp-range=192.168.0.100,192.168.0.200,12h 45 46which tells dnsmasq to us the addresses 192.168.0.100 to 192.168.0.200 47for dynamic IP addresses, and to issue twelve hour leases. 48 49Each host will have its default route and DNS server set to be the 50address of the host running dnsmasq, and its netmask and broadcast 51address set correctly, so nothing else at all is required for a 52minimal system. Hosts which include a hostname in their DHCP request 53will have that name and their allocated address inserted into the DNS, 54in the same way as before. 55 56Having started dnsmasq, tell any hosts on the network to renew their 57DHCP lease, so that dnsmasq's DHCP server becomes aware of them. For 58Linux, this is best done by killing-and-restarting the DHCP client 59daemon or taking the network interface down and then back up. For 60Windows 9x/Me, use the graphical tool "winipcfg". For Windows 61NT/2000/XP, use the command-line "ipconfig /renew" 62 63For more complex DHCP configuration, refer to the doc/setup.html, the 64dnsmasq manpage and the annotated example configuration file. Also 65note that for some ISC dhcpd to dnsmasq DHCP upgrades there may be 66firewall issues: see the FAQ for details of this. 67 68 69