Date: Thu, 12 Jul 2012 13:52:00 -0700 From: Chris Benesch <chris.benesch@gmail.com> To: Yuri <yuri@rawbw.com> Cc: freebsd-net@freebsd.org Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP Message-ID: <CAPKwmM1MLm5nYX6LT480iX2R9gKAQBskUghwVj6Q8KF8oMyL=w@mail.gmail.com> In-Reply-To: <4FFF3683.7020107@rawbw.com> References: <4FFF3683.7020107@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <process id> dhclient re0 That will force it to acquire a new address. On Thu, Jul 12, 2012 at 1:41 PM, Yuri <yuri@rawbw.com> 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 <OLD-IP> && 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<http://lists.freebsd.org/mailman/listinfo/freebsd-net> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@**freebsd.org<freebsd-net-unsubscribe@freebsd.org> > " >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPKwmM1MLm5nYX6LT480iX2R9gKAQBskUghwVj6Q8KF8oMyL=w>