From owner-freebsd-stable@FreeBSD.ORG Mon Dec 3 16:42:02 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 AF6C7D6F for ; Mon, 3 Dec 2012 16:42:02 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4618FC0C for ; Mon, 3 Dec 2012 16:42:02 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qB3Gg1Yc068245 for ; Mon, 3 Dec 2012 09:42:01 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qB3Gfx2w045690; Mon, 3 Dec 2012 09:41:59 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: What's the most effective way to restart net && children? From: Ian Lepore To: Chris H In-Reply-To: <05c3f8ca28401a255bd3b5150d0f7ad7.authenticated@ultimatedns.net> References: <05c3f8ca28401a255bd3b5150d0f7ad7.authenticated@ultimatedns.net> Content-Type: text/plain; charset="us-ascii" Date: Mon, 03 Dec 2012 09:41:59 -0700 Message-ID: <1354552919.1140.34.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit 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 16:42:02 -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 > _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