DHCPv4 server and relay at the same time

Francis Dupont fdupont at isc.org
Wed Mar 21 11:01:53 UTC 2012


We have some issues with the CPE setup for the next Sunday demo:
the same box runs at the same time but on different interfaces
a relay (it is a CRA but for this issue there is unfortunately no
differences) and a server, the kernel is a Linux 3.3, and the server
dnsmasq which provides both a DNS proxy and a DHCPv4 server.

The issue is both try to bind a socket to *:67. It is possible
to force a SO_REUSEADDR (-z or --bind-interfaces, also in the conf file)
for dnsmasq but if the second socket can bind without the
"Address already in use" error this is far to mean packets will be
delivered to both sockets.

I added for the dhccra an option to bind to local_address but the
address to use is the address the system tries to acquire so it is
both hairy and not great. BTW dhcrelay doesn't provide the same
option for IPv4 so the generic issue is not solved on the relay side.

Of course the obvious solution is to use our DHCPv4 server in place
of dnsmasq but we don't know if it will be acceptable on not
technical point of view...

Regards

Francis Dupont <fdupont at isc.org>

PS: for the sdcpe list:
 - there is no way to force dnsmasq to use an address (vs. the wilcard)
  for its DHCPv4 service socket (UDP port 67).
 - with -z or --bind-interfaces or bind-interfaces in the conf file
  dnsmasq sets the SO_REUSEADDR flag before calling bind()
 - the simplest way to disable the DHCPv4 server function is to not
  define a dhcp-range
 - the current work around is to run a CRA servicing the whole link
  on the laptop based SD-B4. So we'll have to configure a DHCP4 DHCPv4
  server on ida and save the conf at the usual place for the demo.
  I'll do it (not a problem, because of the CRA the whole DHCP4 is
  already available on ida)
io = test SD-AFTR, ida = test SD-B4, cruithne = test client
(which seems to be currently off but it worked well yesterday
so I'll need only someone to check it before Saturday).



More information about the sdcpe-devel mailing list