# Newbie Question: dnsmasq: failed to bind DHCP server socket:

## marcion

I have been following the Gentoo Home Router Guide http://www.gentoo.org/doc/en/home-router-howto.xml

I have the following setup:

Cable Modem > Router PC > Switch > Client PC(s)

On the client PCs, I can do everything except DNS. If I go to http://66.249.93.99 then no problem, however if I go to www.google.com then I get "unknown host".

On the router PC, I get an error when I try to start dnsmasq:

 * Starting dnsmasq ...

dnsmasq: failed to bind DHCP server socket: Address already in use 

What I have I done wrong?

Here are my config files (minus comments):

```
/etc/conf.d/dhcp

IFACE="eth0 eth1"

DHCPD_OPTS="-q"

/etc/conf.d/dnsmasq

DNSMASQ_OPTS="-i eth1"
```

----------

## lumberjack

i think you have a dhcpd started before dnsmasq.

dnsmasq also have a build-in dhcp-server and it seems that you configured it to use it.

in this case dnsmasq cannot bind the port for dhcp and fails, since the port is already binded by your other dhcp daemon.

you have 2 solutions

a) disable the dhcp functions in dnsmasq in /etc/dnsmasq.conf

b) configure the dhcp in dnsmasq properly in /etc/dnsmasq.conf and disable the other dhcp-server

i recommend solution b) since only one process is running. this worked for me very well.

----------

## marcion

That did the trick. Thanks a lot mate!

----------

