Dnsmasq
Dnsmasq (thekelleys.org.uk):
Dnsmasq Notes
The set of option-names known by dnsmasq can be discovered by running
dnsmasq --help dhcp
The special address 0.0.0.0 is taken to mean "the address of the machine
running dnsmasq".
Option data which consists solely of periods and digits will be interpreted
by dnsmasq as an IP address, and inserted into an option as such. To force a
literal string, use quotes. For instance when using option 66 to send a
literal IP address as TFTP server name, it is necessary to do
--dhcp-option=66,"1.2.3.4"
Dnsmasq options in /etc/dnsmasq.conf must always be the long-form format:
-b # invalid (getopt)
--bogus-priv # valid (getopt-long)
Dnsmasq Hostname Lookup Failure (!FQDN)
If nslookups of hostnames resolve but ping command fails to resolve, your XP
machine may be trying WINS. Try to ping the hostname using a dot after the
hostname (eg ping hostname.). For Unix, make sure your resolve.conf has the
"domain" configuration (and your DHCP server sets a domain). An additional
consideration is to have the domains included with each host in /etc/hosts
and/or to use the --expand-hosts and --domain options in dnsmasq.conf.
Dnsmasq Firewall Configuration
For the dnsmasq daemon to operate it's vital that UDP packets to and from ports
67 and 68 and broadcast packets with source address 0.0.0.0 and destination
address 255.255.255.255 are not dropped by iptables/ipchains.
To disable the ICMP Pinging of addresses before issuing via DCHP, use the config
option: --no-ping.
--------------------------------------------------------------------------------
DNSMasq Configurations
#/etc/dnsmasq.conf
#http://thekelleys.org.uk/dnsmasq/docs/
#http://thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
#pxe-tftp-root (next-server)
dhcp-boot=/pxe/pxelinux.0,ltsp,192.168.4.40
#root-path
dhcp-option=17,192.168.4.40:/opt/ltsp-4.2/i386
dhcp-option=17,192.168.4.40:/nfsroot-x86
#/etc/dnsmasq.conf
dhcp-boot={pxeboot file}, {hostname of tftp server}, {ip address of tftpserver}
dhcp-option=15,ltsp
dhcp-option=17,"/opt/ltsp/ubuntu_6.10_i386/"
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=eth,Etherboot
dhcp-option=vendor:PXEClient,1,0.0.0.0
dhcp-boot=net:pxe,/ltsp/ubuntu_6.10_i386/pxelinux.0,jupter, 192.168.57.252
dhcp-boot=net:eth,/ltsp/ubuntu_6.10_i386/pxelinux.0,jupter,192.168.57.252
#/etc/dnsmasq.conf
dhcp-boot=/boot/pxelinux.0
# enable dnsmasq built-in tftp server
enable-tftp
tftp-root=/opt/ltsp/i386
#/etc/dnsmasq.conf
# send the etherboot magic flag and then etherboot options (a string).
dhcp-option=128,e4:45:74:68:00:00
dhcp-option=129,NIC=eepro100
# set the boot file name only when the "red" tag is set.
dhcp-boot=net:red,pxelinux.red-net
--------------------------------------------------------------------------------
#/etc/dnsmasq.conf
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=eth,Etherboot
dhcp-option=vendor:PXEClient,1,0.0.0.0
dhcp-boot=net:pxe,/ltsp/ubuntu_6.10_i386/pxelinux.0,jupter,192.168.57.252
dhcp-boot=net:eth,/ltsp/ubuntu_6.10_i386/pxelinux.0,jupter,192.168.57.252
dhcp-option=17,"/opt/ltsp/ubuntu_6.10_i386/"
--------------------------------------------------------------------------------
Selected FAQ Q/A From: http://thekelleys.org.uk/dnsmasq/docs/FAQ
Q: I'm network booting my machines, and trying to give them static
DHCP-assigned addresses. The machine gets its correct address
whilst booting, but then the OS starts and it seems to get
allocated a different address.
A: What is happening is this: The boot process sends a DHCP
request and gets allocated the static address corresponding to its
MAC address. The boot loader does not send a client-id. Then the OS
starts and repeats the DHCP process, but it it does send a
client-id. Dnsmasq cannot assume that the two requests are from the
same machine (since the client ID's don't match) and even though
the MAC address has a static allocation, that address is still in
use by the first incarnation of the machine (the one from the boot,
without a client ID.) dnsmasq therefore has to give the machine a
dynamic address from its pool. There are three ways to solve this:
(1) persuade your DHCP client not to send a client ID, or (2) set up
the static assignment to the client ID, not the MAC address. The
default client-id will be 01:, so change the dhcp-host
line from "dhcp-host=11:22:33:44:55:66,1.2.3.4" to
"dhcp-host=id:01:11:22:33:44:55:66,1.2.3.4" or (3) tell dnsmasq to
ignore client IDs for a particular MAC address, like this:
dhcp-host=11:22:33:44:55:66,id:*
Q: My laptop has two network interfaces, a wired one and a wireless
one. I never use both interfaces at the same time, and I'd like the
same IP and configuration to be used irrespective of which
interface is in use. How can I do that?
A: By default, the identity of a machine is determined by using the
MAC address, which is associated with interface hardware. Once an
IP is bound to the MAC address of one interface, it cannot be
associated with another MAC address until after the DHCP lease
expires. The solution to this is to use a client-id as the machine
identity rather than the MAC address. If you arrange for the same
client-id to sent when either interface is in use, the DHCP server
will recognise the same machine, and use the same address. The
method for setting the client-id varies with DHCP client software,
dhcpcd uses the "-I" flag. Windows uses a registry setting,
see http://www.jsiinc.com/SUBF/TIP2800/rh2845.htm
Q: Dnsmasq fails to start up with a message about capabilities.
Why did that happen and what can do to fix it?
A: Change your kernel configuration: either deselect CONFIG_SECURITY
_or_ select CONFIG_SECURITY_CAPABILITIES. Alternatively, you can
remove the need to set capabilities by running dnsmasq as root.