From owner-freebsd-net@FreeBSD.ORG Thu Jul 12 20:52:01 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBF24106564A for ; Thu, 12 Jul 2012 20:52:01 +0000 (UTC) (envelope-from chris.benesch@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 930EA8FC0C for ; Thu, 12 Jul 2012 20:52:01 +0000 (UTC) Received: by ggnm2 with SMTP id m2so3354060ggn.13 for ; Thu, 12 Jul 2012 13:52:01 -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=IaI1AuvUQuy4YgF5oCrWZ4nMp5u0xQcYEUgAPocUBSQ=; b=ud0MsZCSJ4fYe/v1l3cw6/Vx/wvNiyTkNiTYZrx9e34//BcVPLv3/gG8IHAcAESPQl gsO1M5smd44B2TKHlshf9qfIXuoLo46RDsIcTFyXXWg0BI5C1BW9Ruzj74br1avC5gGE WvDdp2pVSPY9g0Ixx5BPcEuDAwPwT2gX5qRsdU7+xSlP6AcRZQFfsd/sHVv7lw+6Vtst zW9QuXkXHAHHpMKyyuuPS0qiUVc6M/P1S+yk8ZvrOAux3vem+oa2xDme53XBgPwpM36c Oc5WfgWk0XJsWQuO7MGgUTbWDhHcic0oLqmM09pehOxUBkEGGdeCs2b/7MY2Q6+Jg+gt nd0Q== MIME-Version: 1.0 Received: by 10.50.220.129 with SMTP id pw1mr18899345igc.29.1342126320987; Thu, 12 Jul 2012 13:52:00 -0700 (PDT) Received: by 10.231.26.150 with HTTP; Thu, 12 Jul 2012 13:52:00 -0700 (PDT) In-Reply-To: <4FFF3683.7020107@rawbw.com> References: <4FFF3683.7020107@rawbw.com> Date: Thu, 12 Jul 2012 13:52:00 -0700 Message-ID: From: Chris Benesch To: Yuri Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 20:52:01 -0000 Thats pretty standard for BSD and most Unixes. DHCP hands out leases for a specified period of time, so unless there is a reason to reset it, it wont. Windows does that, but it is designed more as a client / user facing OS whereas BSD is designed to run in the background silently serving you content and directing traffic. I can save you some steps though, ps -ax | grep dhclient You will get a list, on the one that is dhclient or /sbin/dhclient, take the number at the far left, thats the process ID kill dhclient re0 That will force it to acquire a new address. On Thu, Jul 12, 2012 at 1:41 PM, Yuri wrote: > 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 > ______________________________**_________________ > 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 > " >