From owner-freebsd-questions@FreeBSD.ORG Wed Jun 29 16:34:48 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B421F106564A for ; Wed, 29 Jun 2011 16:34:48 +0000 (UTC) (envelope-from korvus@comcast.net) Received: from qmta07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 9EAF38FC15 for ; Wed, 29 Jun 2011 16:34:48 +0000 (UTC) Received: from omta17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by qmta07.emeryville.ca.mail.comcast.net with comcast id 1sTi1h00A1afHeLA7samdn; Wed, 29 Jun 2011 16:34:46 +0000 Received: from [192.168.2.164] ([206.210.89.202]) by omta17.emeryville.ca.mail.comcast.net with comcast id 1sev1h00d4Mx3R28dsey3i; Wed, 29 Jun 2011 16:39:09 +0000 Message-ID: <4E0B540B.3090400@comcast.net> Date: Wed, 29 Jun 2011 12:34:19 -0400 From: Steve Polyack User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: User Questions , freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Question about NIC link state initialization X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2011 16:34:48 -0000 I have a handful of systems running FreeBSD 8.1-RELEASE. An occaisional fat-finger in /etc/fstab may cause one to end up in single-user mode from time to time. This would normally not be a problem, but some of these systems have a LOM (lights-out management) controller which shares the system's on-board NICs. This works great 99% of the time, but when the system drops out of init(8) and into single-user mode, the links on the interfaces never come up, and therefore the LOM becomes inaccessible. Cue remote-hands at the facility to help us remedy the problem. I've been playing around with this configuration on a local system, and I've noticed that once at a single-user shell, all one has to do is run ifconfig to cause the NIC's links to come up. You don't even have to specify the interface, nor do you have to specify "up". As soon as I hit enter, ifconfig prints the typical interface summary - intermingled in with this are the bold kernel log messages stating "bce0: link state changed to UP" and "bce1: link state changed to UP". So, my question is - why do we have to run ifconfig(8) to bring the links up on the attached interfaces? Shouldn't they come up after the driver discovers and initializes the devices? Keep in mind that I don't even have to pass any arguments (such as "up") to ifconfig. Furthermore, the behavior is exactly the same for bce(4) and em(4). Short of patching init(8) (or perhaps the NIC drivers?), I don't see another way for me to ensure the links come up even when the system drops into single-user mode on boot. - Steve