From owner-freebsd-questions@freebsd.org Sat Sep 12 14:45:14 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FF4AA027BB for ; Sat, 12 Sep 2015 14:45:14 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 241211D78 for ; Sat, 12 Sep 2015 14:45:14 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by wiclk2 with SMTP id lk2so86493509wic.1 for ; Sat, 12 Sep 2015 07:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9VXgWv/jGzFtObbIkfvL/PDDesL05vQjYJX3ilW8vL0=; b=B4PjRb/cUTCkiW2QkKWJzTdiR4BAFJqu1/1uD1oRJo1byK8qfl9l8ikNtiiBX/T2dD i8wQaNduvUAnMK7usMzjgg5kgNBdwmM5Wh7h65bbMtsFR217jnQAcbbD4GlpQ2644yg3 QFjBxOZnT4GhW/74Eq1k5kFoI7kCEl/X2KTMFtCBBeHJvKT83r73SkVlFNQI31w7/2Ag kx5MuPRB/aoYToTOEHAOWlkXnaddS+sM5Q2q8Qwh6FpEcnNL6LCV/guh1aDdB/PC/4F+ 95lc/QVPI/VQMdFLR50bATe1Gw7zyKIa/I0oF3iKunyh4m77P2yDhsZVmdsmN17Mf2lW 1DnA== MIME-Version: 1.0 X-Received: by 10.180.102.74 with SMTP id fm10mr7300055wib.25.1442069111450; Sat, 12 Sep 2015 07:45:11 -0700 (PDT) Received: by 10.194.16.231 with HTTP; Sat, 12 Sep 2015 07:45:11 -0700 (PDT) In-Reply-To: <55F398CA.7050308@flederma.us> References: <55F398CA.7050308@flederma.us> Date: Sat, 12 Sep 2015 09:45:11 -0500 Message-ID: Subject: Re: dhclient(8) sets wrong interface netmask on boot up From: Adam Vande More To: Cary Cc: freebsd-questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2015 14:45:14 -0000 On Fri, Sep 11, 2015 at 10:15 PM, Cary wrote: > 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`). > > ACTIONS TAKEN: > 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 255.255.255.255 port 67 > DHCPACK from 192.168.20.1 > bound to 192.168.20.166 -- renewal in 43200 seconds. > # ifconfig -a > ifconfig-1.out > # diff ifconfig-0.out ifconfig-1.out > 4c4 > < inet 192.168.20.166 netmask 0xffffffff broadcast 192.168.20.166 > --- > > inet 192.168.20.166 netmask 0xffffff00 broadcast 192.168.20.255 > > 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! > Nothing you've given us would lead me to believe this is an issue with dhclient. Why do you? It simply assigns whatever info it gets from DHCP. > [uname] FreeBSD public.fbsd.local 10.2-RELEASE FreeBSD 10.2-RELEASE #0 > r286666: Wed Aug 12 15:26:37 UTC 2015 > root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > [/etc/rc.conf] > hostname="public.fbsd.local" > ifconfig_em0="DHCP" > cloned_interfaces="${cloned_interfaces} lo1" > previous line doesn't make much sense. > sshd_enable="YES" > -- Adam