From owner-freebsd-net@FreeBSD.ORG Thu Jul 12 20:41:46 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 4AF991065752 for ; Thu, 12 Jul 2012 20:41:46 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 32E818FC08 for ; Thu, 12 Jul 2012 20:41:46 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q6CKfdgn037093 for ; Thu, 12 Jul 2012 13:41:39 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4FFF3683.7020107@rawbw.com> Date: Thu, 12 Jul 2012 13:41:39 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120702 Thunderbird/13.0.1 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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 20:41:46 -0000 I have the simplest possible DHCP setup: ifconfig_re0="DHCP" in /etc/rc.conf. When the system boots, it gets connected fine. Now, I disconnect my laptop and connect it to another network. When cable is disconnected, IP address of this interface stays the same, old one is not removed. When I plug it into another network, the same IP address stays. New IP doesn't get set. This is bad. So I have to manually do 'ifconfig re0 down && remove && ifconfig re0 up'. I believe, once interface is set as "DHCP", all those things should happen automatically. dhclient should drop the old IP when cable is unplugged, and should set it up anew when cable is plugged back. Is my system misconfigured in some way, or this is the way how it works in FreeBSD? Yuri