From owner-freebsd-net@FreeBSD.ORG Thu Jul 12 22:31:29 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DDDF106566C for ; Thu, 12 Jul 2012 22:31:29 +0000 (UTC) (envelope-from pprocacci@datapipe.com) Received: from EXFESMQ03.datapipe-corp.net (exfesmq03.datapipe.com [64.27.120.67]) by mx1.freebsd.org (Postfix) with ESMTP id 37F4C8FC0C for ; Thu, 12 Jul 2012 22:31:27 +0000 (UTC) Received: from nat.myhome (192.168.128.103) by EXFESMQ03.datapipe-corp.net (192.168.128.28) with Microsoft SMTP Server (TLS) id 14.2.298.4; Thu, 12 Jul 2012 18:30:17 -0400 Date: Thu, 12 Jul 2012 17:30:37 -0500 From: "Paul A. Procacci" To: Chris Benesch Message-ID: <20120712223037.GD1907@nat.myhome> References: <4FFF3683.7020107@rawbw.com> <20120712211959.GG20201@numachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [192.168.128.103] Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 22:31:29 -0000 On Thu, Jul 12, 2012 at 03:25:07PM -0700, Chris Benesch wrote: > Maybe another option to dhclient to have it poll the interface every 2-3 > seconds to see if it has lost a link and if so, set the lease timer to be > expired, and wait for it to come back and once it does, it will acquire a > new address. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" The Operating system should generate a devd event. Something like the following in /usr/local/etc/devd.conf should do the tric= k, though I haven't tested the below with anything other than carp interfaces. I suspect it works just the same. ###################################################### notify 30 { match "system" "IFNET"; match "subsystem" "em0_or_whatever"; match "type" "LINK_UP"; action "/usr/local/sbin/script_to_do_something.sh up"; }; notify 30 { match "system" "IFNET"; match "subsystem" "em0_or_whatever"; match "type" "LINK_DOWN"; action "/usr/local/sbin/script_to_do_something.sh down"; }; ###################################################### ~Paul ________________________________ This message may contain confidential or privileged information. If you are= not the intended recipient, please advise us immediately and delete this m= essage. See http://www.datapipe.com/legal/email_disclaimer/ for further inf= ormation on confidentiality and the risks of non-secure electronic communic= ation. If you cannot access these links, please notify us by reply message = and we will send the contents to you.