From owner-freebsd-questions@FreeBSD.ORG Sat Feb 8 13:01:16 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78988ADC for ; Sat, 8 Feb 2014 13:01:16 +0000 (UTC) Received: from frv196.fwdcdn.com (frv196.fwdcdn.com [212.42.77.196]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2ED5D19FB for ; Sat, 8 Feb 2014 13:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=ffe; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Cc:To:Subject:From:Date; bh=7aj7cGUIt5iiGTElqtiyP9uxY9841xTHFzpDAqiwMs0=; b=UWPIS5TSu/DdY8M3lSmgCyrbC4ZIHv3Xoqy9hRhXcgN+chp2ejopbziy6zT/4IB7weCNrce93I2FmlK0+Ky1okl9v+2bhMVGfsebeu9ehZ7Pc65pFkEL1hbPZljV6EpmdqCb3gs1LLfGaqClxyVCBOQlKpMOUnfTVMtIuoW7Pps=; Received: from [10.10.10.35] (helo=frv35.fwdcdn.com) by frv196.fwdcdn.com with smtp ID 1WC7Wu-000LlR-NZ for questions@freebsd.org; Sat, 08 Feb 2014 15:01:08 +0200 Date: Sat, 08 Feb 2014 15:01:08 +0200 From: Vladislav Prodan Subject: Re[2]: Restart network without reboot ? To: Darren Pilgrim X-Mailer: mail.ukr.net 5.0 Message-Id: <1391864386.931739885.x8t44ikc@frv35.fwdcdn.com> In-Reply-To: <52F5BF3A.2030500@bluerosetech.com> References: <1391822758.499117562.qad9aups@frv35.fwdcdn.com> <20140208102029.04d2eb10@X220.alogt.com> <1391827303.738906888.k9hzy6eo@frv35.fwdcdn.com> <52F5BF3A.2030500@bluerosetech.com> MIME-Version: 1.0 Received: from universite@ukr.net by frv35.fwdcdn.com; Sat, 08 Feb 2014 15:01:08 +0200 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: binary Content-Disposition: inline Cc: Erich Dollansky , questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 13:01:16 -0000 > On 2/7/2014 6:43 PM, Vladislav Prodan wrote: > >> "Erich Dollansky" wrote: > >> On Sat, 08 Feb 2014 03:31:08 +0200 Vladislav Prodan > >> wrote: > >>> > >>> # service netif restart && service routing restart Stopping > >>> dhclient. Waiting for PIDS: 672. > >>> > >>> And disconnect via ssh :( > >> > >> as expected. > >> > >> What is your problem? > > > > What there are other ways to restart the network without breaking the > > current ssh session? > > You can't. The connection state is going to get reset. You can, > however, run the service commands in a screen or tmux session to prevent > the connection reset from disrupting the shell running the service commands. > > You should also add ";service sshd restart" to the end of the command to > make sure sshd comes back up if died when networking bounced. > Thank you all for your clever ideas and tips. help: service netif restart ; dhclient em0 ; dhclient em1 -- Vladislav V. Prodan System & Network Administrator http://support.od.ua +380 67 4584408, +380 99 4060508 VVP88-RIPE