ports/136461: dhcpd not working without static route for 255.255.255.255

Gavin Chappell g-a-c at teh-intar.net
Wed Jul 8 13:10:08 UTC 2009


>Number:         136461
>Category:       ports
>Synopsis:       dhcpd not working without static route for 255.255.255.255
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 08 13:10:07 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Gavin Chappell
>Release:        7.2-RELEASE-p2
>Organization:
n/a
>Environment:
FreeBSD bsddhcp.domain 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0: Wed Jun 24 00:57:44 UTC 2009     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
I installed net/isc-dhcp30-server from ports and copied over my dhcpd.conf from a properly functioning Linux machine. I configured it to start on reboot etc, which it did correctly. However, my Ubuntu laptop wouldn't pick up an IP address and ISC dhclient (V3.1.1) just showed various timeouts due to not receiving a response.

I ran tcpdump on the Linux DHCP server and my new FreeBSD one to see what was different, and found that Linux with dhcpd V3.0.1rc14 seems to send DHCPOFFERs to a unicast address like so:

13:17:57.013813 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1c:7e:b0:24:b4, length: 310
13:17:57.014096 IP linuxdhcp.domain.bootps > clientaddress.domain.bootpc: BOOTP/DHCP, Reply, length: 323

Whereas the FreeBSD server with dhcpd V3.0.7 sends DHCPOFFERs to 255.255.255.255 like so:

13:45:37.014402 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1c:7e:b0:24:b4 (oui Unknown), length 304
13:45:37.015076 IP bsddhcp.domain.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 323

I found the following webpage (http://tldp.org/HOWTO/DHCP/x369.html) and I found that to fix this I needed to add a static route to 255.255.255.255 as follows, once I'd done this, clients were seeing the DHCPOFFERs correctly. Please note that this isn't exactly the same as the linked page as that page suggests that only MS clients have this problem, I was seeing the problem on a Ubuntu 9.04 machine with ISC dhclient V3.1.1.
>How-To-Repeat:
Install dhcpd from ports, and set it up to serve IP addresses on a network.
>Fix:
"route add -host 255.255.255.255 -iface fxp0" fixed the problem in my case. Without this static route in place, dhcpd would run correctly but systems were unable to see the DHCPOFFERs that were sent out

Could be automated on bootup with (in /etc/rc.conf):

static_routes="broadcast"
route_broadcast="-host 255.255.255.255 -iface fxp0"

I don't know how this would work with a box with multiple network cards for multiple DHCP-served subnets.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list