dhclient(8) sets wrong interface netmask on boot up

Cary lists at flederma.us
Sat Sep 12 03:20:44 UTC 2015

QUESTION: How do I get dhclient to correctly set the interface netmask
when the system boots?

Once the system is booted, I cannot SSH into the system until I have
logged in via the console and restarted dhclient(8) (`service dhclient
restart em0`).

I've installed 10.2-RELEASE[uname] from scratch.

My [/etc/rc.conf] specifies that the em0 interface should have dhclient
run on it.

Running ifconfig(8) prior (ifconfig-0.out) and post (ifconfig-1.out)
dhclient, I found that the netmask is set incorrectly after boot:

# ifconfig -a > ifconfig-0.out
# service dhclient restart em0
Stopping dhclient.
Starting dhclient.
DHCPREQUEST on em0 to port 67
bound to -- renewal in 43200 seconds.
# ifconfig -a > ifconfig-1.out
# diff ifconfig-0.out ifconfig-1.out
< 	inet netmask 0xffffffff broadcast
> 	inet netmask 0xffffff00 broadcast

My [/etc/dhclient.conf] file is unchanged from the system default.

The DHCP server is an residential wireless router. All other devices are
receiving DHCP configurations from the router without issue.

Thank you in advance for any assistance!

[uname] FreeBSD public.fbsd.local 10.2-RELEASE FreeBSD 10.2-RELEASE #0
r286666: Wed Aug 12 15:26:37 UTC 2015
root at releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

cloned_interfaces="${cloned_interfaces} lo1"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable

# enable ezjail
### EOF /etc/rc.conf ###

### empty file

Cary Mathews

More information about the freebsd-questions mailing list