# dnsmasq dhcp handing its self its own address

## 666threesixes666

im having problems getting dnsmasq to deal the dhcp server its own ip address.  it has 2 eth interfaces, eth0 is the master control, with a known static ip address.  eth1 is guest parking and should be handing its self its own ip address.  its also not handing specified ip addresses to dhcp clients from the config.  all settings are toward the top of the config paste.

http://pastie.org/6406223

even moving the dhcp range to 10.0.1.1 , and commenting the other statement it wont pull 10.0.1.2 and instead pulls a 169.x.x.x address.  i do have dhcpcd as a client on eth0 that might be interfering

----------

## Logicien

If you want to use a specific IP address for a MAC address, you need to use the static option for dhcp-range with only the subnet like 10.0.0.0. Than Dnsmasq know it have to give the IP address set in dhcp-host for the MAC address and not use any range.

You can have a look at my /etc/dnsmasq.conf prototype. In my wireless lan, each host receive the exact IP address I set for it MAC address in dnsmasq.conf.

```
bogus-priv

filterwin2k

resolv-file=/etc/resolv.conf

no-resolv

no-poll

interface=wlan0

expand-hosts

domain=host.name

dhcp-range=192.168.xxx.xxx,static

dhcp-option=6,xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx

dhcp-leasefile=/var/lib/misc/dnsmasq.leases

no-negcache

dhcp-host=host.name,XX:XX:XX:XX:XX:XX,192.168.xxx.xxx,infinite
```

----------

