From owner-freebsd-stable@FreeBSD.ORG Mon Dec 3 17:13:51 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80E587E0 for ; Mon, 3 Dec 2012 17:13:51 +0000 (UTC) (envelope-from chris#@1command.com) Received: from udns.ultimateDNS.NET (24-113-70-254.wavecable.com [24.113.70.254]) by mx1.freebsd.org (Postfix) with ESMTP id 3094F8FC12 for ; Mon, 3 Dec 2012 17:13:50 +0000 (UTC) Received: from udns.ultimateDNS.NET (localhost [127.0.0.1]) by udns.ultimateDNS.NET (8.14.5/8.14.5) with ESMTP id qB3HDgt1003674; Mon, 3 Dec 2012 09:13:48 -0800 (PST) (envelope-from chris#@1command.com) Received: (from www@localhost) by udns.ultimateDNS.NET (8.14.5/8.14.5/Submit) id qB3HDb00003670; Mon, 3 Dec 2012 09:13:37 -0800 (PST) (envelope-from chris#@1command.com) Received: from udns.ultimatedns.net ([24.113.70.254]) (UDNSMS authenticated user chrish) by ultimatedns.net with HTTP; Mon, 3 Dec 2012 09:13:37 -0800 (PST) Message-ID: <67d0d746cf42af843250e392150ea927.authenticated@ultimatedns.net> In-Reply-To: <1354552919.1140.34.camel@revolution.hippie.lan> References: <05c3f8ca28401a255bd3b5150d0f7ad7.authenticated@ultimatedns.net> <1354552919.1140.34.camel@revolution.hippie.lan> Date: Mon, 3 Dec 2012 09:13:37 -0800 (PST) Subject: Re: What's the most effective way to restart net && children? From: "Chris H" To: "Ian Lepore" User-Agent: UDNSMS/2.0.3 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2012 17:13:51 -0000 > On Mon, 2012-12-03 at 08:05 -0800, Chris H wrote: >> Greetings, >> I've always maintained at least a /24 since the early 80's. >> I'm now evaluating a new ISP, and am not ready to commit. Until then I'll be >> forced to use DHCP. My problem is that they are really mercenary about their >> lease(s) -- ~24hrs! So, given that I am treating the assigned IP(s) as pseudo-static, >> I would prefer not to bounce the box(es). >> I currently bounce them alternating rc & hosts, etc. I can easily switch configs >> "on the fly" by restarting network & related services, but am looking for a Greetings IAn, and thank you for your reply... >> _graceful_ way to re-start the network. I see /etc/netstart, but it looks a little >> more /brutal/ than I was hoping for. Any and all suggestions _greatly_ appreciated. >> >> Thank you for all your time, and consideration. >> >> --Chris >> > > You can use "service netif restart" to restart / re-dhcp all the > interfaces. Doing it that way will do ALL interfaces, including > loopback, which can break running programs that are using it. You can > name one or more interfaces to be restarted instead of letting it do all > of them. > > Do you have any reason to think the short leases time will somehow lead > to changing IPs? My provider gives me 12 hour leases, and my IP hasn't > changed in like 7 years. > > -- Ian Yes, that was always the way I used to experience it (other ISP's). The IP never changed after leases renewed. But now not only the IP, but the netmask changes, anywhere from 255.2455.254.0 to 255.255.252.0, no even 255.255.255.255! I'd blow them off because of this. But thus far, I really like everything else, and as a result, will likely simply lease a /24 from them. But until (of if) I make that decision, it's really a PITA. Great advice. I'll look into your suggestion(s). I currently boot into an rc.conf(5) with the ifconfig(8) line as DHCP, to obtain the new lease. Then bounce the box(es) with the ifconfig(8) line(s) setup as they would be when used with static address(es). Given your advice, it looks like I can cobble up a script to use service(8) to shutdown all the services that depend in network, and then use service(8) to restart the network interfaces to garner the new IP(s) and then restart the network, and utilize it as static, bringing up the services that depend on it. Thanks again for your reply. --Chris > > >