[Dnsmasq-discuss] failed to bind DHCP server socket: Address already in use

Simon Kelley simon at thekelleys.org.uk
Tue Oct 14 09:47:38 BST 2008


Michael Rack wrote:
> Hi Richard,
> 
> --- SNIP DHCP-FWD ---
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> udp        0      0 10.10.0.1:137           0.0.0.0:*
> udp        0      0 0.0.0.0:137             0.0.0.0:*
> udp        0      0 10.10.0.1:138           0.0.0.0:*
> udp        0      0 0.0.0.0:138             0.0.0.0:*
> udp        0      0 0.0.0.0:698             0.0.0.0:*
> udp        0      0 0.0.0.0:698             0.0.0.0:*
> udp        0      0 0.0.0.0:698             0.0.0.0:*
> udp        0      0 0.0.0.0:698             0.0.0.0:*
> udp        0      0 0.0.0.0:67              0.0.0.0:*
> udp        0      0 0.0.0.0:67              0.0.0.0:*
> udp   108324      0 0.0.0.0:68              0.0.0.0:*
> udp        0      0 0.0.0.0:68              0.0.0.0:*
> udp        0      0 91.65.152.228:45030     81.95.15.82:5000        
> ESTABLISHED
> --- SNAP DHCP-FWD ---
> 
> --- SNIP DNSMASQ ---
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> udp        0      0 10.10.0.1:137           0.0.0.0:*
> udp        0      0 0.0.0.0:137             0.0.0.0:*
> udp        0      0 10.10.0.1:138           0.0.0.0:*
> udp        0      0 0.0.0.0:138             0.0.0.0:*
> udp        0      0 10.10.0.1:53            0.0.0.0:*
> udp        0      0 192.168.178.1:53        0.0.0.0:*
> udp      600      0 0.0.0.0:698             0.0.0.0:*
> udp      300      0 0.0.0.0:698             0.0.0.0:*
> udp      300      0 0.0.0.0:698             0.0.0.0:*
> udp      300      0 0.0.0.0:698             0.0.0.0:*
> udp        0      0 0.0.0.0:67              0.0.0.0:*
> udp        0      0 0.0.0.0:68              0.0.0.0:*
> udp        0      0 91.65.152.228:45030     81.95.15.82:5000        
> ESTABLISHED
> udp        0      0 fe80::20e:cff:fe9c:5:53 :::*
> udp        0      0 fe80::280:c8ff:fecd::53 :::*
> --- SNAP DNSMASQ ---
> 
> Sorry but the output does not show the device where the sockets listen 
> on. But i think that DHCP-FWD is listen on two interfaces and DNSMASQ 
> only on one interface. But the interfaces can not be overlaped in my 
> configuration. eth0 and eth1 assigned to dnsmasq. eth2 and eth3 assigned 
> to dhcp-fwd.
> 
> Michael.
> 
> 

Which dhcp-forwarder are you using?

There's no portable way to listen on an _interface_ in Unix, one 
normally listens on the _address_ of an interface, but that breaks DHCP 
which has to receive packets sent to/from strange addresses during the 
configuration process. For that reason, a DHCP server has to listen on 
the wildcard address, 0.0.0.0

Dnsmasq partly solves this problem by setting the SO_REUSEADDR flag on 
DHCP sockets when --bind-interfaces is set. That allows the wildcard 
address to be bound multiple times, as long as every instance sets the 
flag. That allows multiple instances of dnsmasq to run, but it breaks 
when something else is binding the wildcard address and NOT setting 
SO_REUSEADDDR. I suspect that's the case here.

Cheers,

Simon.




Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list