From owner-freebsd-current@freebsd.org Wed Aug 22 20:30:50 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C063510951AC for ; Wed, 22 Aug 2018 20:30:50 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 308F48A5AC for ; Wed, 22 Aug 2018 20:30:50 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-lf1-x12e.google.com with SMTP id c21-v6so2376779lfh.3 for ; Wed, 22 Aug 2018 13:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u8PuyQqOFtgt1prfnoFQ/sGkzz4a/vk3Xms0qo8Uceg=; b=tG/NvvmlzV+0eHa0Nuav0UkwBRQziecEhYOXfYudLFfEkHXbA7SdmqmThtzEgVStg5 VMfIclEQs/qsH7o9W2lf7h/tHy2ZKFvEuvjYzjg96ncJ/zG3Fos5drMU4zN1OaT+lfWq 6RqCyCCW8yHCT9eZFU2BrkWeNIeTSxTpQrob4LZvbxOjju8SUnVRoaqLgB23T68KMTMD zZ6bIAv2pkAl+Hz1Ic4Jscs3gKN13190kKmg9wqTOy5r8qZxHi9Ro102Tn+xGU7oV3vz w9bvn5LM8dfWKmtexjj23fpgfKKuRPC60k/58fzPbA4mGHmO34vkh+VE1Gu6uM0OdND/ L8Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u8PuyQqOFtgt1prfnoFQ/sGkzz4a/vk3Xms0qo8Uceg=; b=T8qgmiGzMV4nj1fJmLFDdL0WPsJrpGLZEkjpjL37HS7xuwr7HpoNi5unnsR+kFRtoP j9UGjGmSNskhKouykzKIlvIsUpqWYYiQANZ2dgLU68Q0x0wOaNEeeGRlydLXJQZlCcsb Fs4xrrnd3a0dqCYUWNRLs6cLlF3i8Q0QZdIjgHir2w2355mLd8infzPY5gaQgVj3Ev83 Ygr/aqWtTQdsVdu7FKYRS/tlo5Jzs/bJCCMfQqFhNBn0lEAyJpgLaNpuuYl2BRlahmsZ g0Y8E8Mvf8yYjz9mRvh9zI/lq62eGjtpODHBEV2WzLUoctMwCdwALdFA9S0eI3fBWis7 FvmA== X-Gm-Message-State: APzg51A1NzBNKiMJyw0PIMDdlgnyExjY8l2Pa8QfTR3X0senZ6BdT9CS hO518R80MLnvLpJ1TMGzaaFbE7pasKaddGLr1mM1vhU7 X-Google-Smtp-Source: ANB0Vda/T1sLd0AbWTJjswuApd64HxPkKt3C45xK7CEb99CiRGJ7c/R+haVETVY1e4QfiBTUirVvrRZ9lSWNwqZXMdg= X-Received: by 2002:a19:730d:: with SMTP id o13-v6mr5370827lfc.130.1534969848846; Wed, 22 Aug 2018 13:30:48 -0700 (PDT) MIME-Version: 1.0 References: <20180822132135.A9818@naund.org> In-Reply-To: <20180822132135.A9818@naund.org> From: Freddie Cash Date: Wed, 22 Aug 2018 13:30:37 -0700 Message-ID: Subject: Re: timing issue with ifconfig em(4) at rc.d start? To: andreas@naund.org Cc: FreeBSD-Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 20:30:51 -0000 On Wed, Aug 22, 2018 at 1:25 PM Andreas Ott wrote: > Yesterday I installed a server from scratch from image > FreeBSD-12.0-ALPHA2-amd64-20180816-r337934-memstick.img, > then I updated sources with svn and did make buildworld, buildkernel, > installkernel, installworld, mergemaster. Upon reboot I can no longer > talk to the server on IPv4 but it works on IPv6, ifconfig tells me > there is no 'inet' address configured. No IPv4 inet routes are in > place either. > > If I run '/etc/rc.d/netif restart' from root shell on KVM console, I can > observe that the interface is taken down, the link light goes dark, > and then comes back up. However the "UP" log notification appears in > time *after* ifconfig attempts to apply settings to an interface > that is still down as it prints out to screen (em1 is shown there > as 'status: no carrier' at the time). > > em1: link state changed to DOWN > > > > Link state changed to up > em1: link state changed to UP > > Is there a way to delay the 'ifconfig inet' until after the link light > comes up? Or how do I force configuring an interface that's down in rc? > Nothing changed on the configuration side or the network switch > side since the original install. I also see in em(4) that the driver > has been reworked for 12.0, so maybe this is due to a code change? > > > This is running on hardware Dell R610 with a 4-port Intel PCIe NIC card > > em0@pci0:6:0:0: class=0x020000 card=0x10bc8086 chip=0x10bc8086 rev=0x06 > hdr=0x00 > em1@pci0:6:0:1: class=0x020000 card=0x10bc8086 chip=0x10bc8086 rev=0x06 > hdr=0x00 > em2@pci0:7:0:0: class=0x020000 card=0x10bc8086 chip=0x10bc8086 rev=0x06 > hdr=0x00 > em3@pci0:7:0:1: class=0x020000 card=0x10bc8086 chip=0x10bc8086 rev=0x06 > hdr=0x00 > vendor = 'Intel Corporation' > device = '82571EB/82571GB Gigabit Ethernet Controller (Copper)' > class = network > subclass = ethernet > > > $ freebsd-version -ku > 12.0-ALPHA2 > 12.0-ALPHA2 > > $uname -a > FreeBSD f-current239.sjelab.net 12.0-ALPHA2 FreeBSD 12.0-ALPHA2 #0 > r338153: Tue Aug 21 21:02:41 UTC 2018 root@f-current239.sjelab.net: > /usr/obj/usr/src/amd64.amd64/sys/GENERIC > > Relevant network config bits from /etc/rc.conf > > ifconfig_em1="inet 100.79.136.239 netmask 255.255.255.0 up" > defaultrouter="100.79.136.1" > ifconfig_em1="inet6 2600:c02:b020:136::239 prefixlen 64" > ipv6_defaultrouter="2600:c02:b020:136::2" > There's nothing wrong with the timing. Your rc.conf is incorrect. The second ifconfig_em1 line overrides the former. These are variable declarations, not commands. The last setting for a variable is the only one that takes place. Either look through /etc/defaults/rc.conf for the ipv6-related entries, or switch to using an alias entry for ipv6: ifconfig_em1="inet 100.79.136.239 netmask 255.255.255.0 up" ifconfig_em1_alias0="inet6 2600:c02:b020:136::239 prefixlen 64" -- Freddie Cash fjwcash@gmail.com