From owner-freebsd-questions@FreeBSD.ORG Sat Feb 8 05:23:31 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 60BFF3FB for ; Sat, 8 Feb 2014 05:23:31 +0000 (UTC) Received: from luigi.brtsvcs.net (luigi.brtsvcs.net [204.109.60.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D48A196D for ; Sat, 8 Feb 2014 05:23:30 +0000 (UTC) Received: from chombo.houseloki.net (unknown [IPv6:2601:7:880:bd0:21c:c0ff:fe7f:96ee]) by luigi.brtsvcs.net (Postfix) with ESMTPSA id 688FB2D4FAE; Fri, 7 Feb 2014 21:23:18 -0800 (PST) Received: from [IPv6:2601:7:880:bd0:604d:cd62:f943:4d46] (unknown [IPv6:2601:7:880:bd0:604d:cd62:f943:4d46]) by chombo.houseloki.net (Postfix) with ESMTPSA id 698515BB; Fri, 7 Feb 2014 21:23:16 -0800 (PST) Message-ID: <52F5BF3A.2030500@bluerosetech.com> Date: Fri, 07 Feb 2014 21:23:06 -0800 From: Darren Pilgrim User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Vladislav Prodan , Erich Dollansky Subject: Re: Restart network without reboot ? References: <1391822758.499117562.qad9aups@frv35.fwdcdn.com> <20140208102029.04d2eb10@X220.alogt.com> <1391827303.738906888.k9hzy6eo@frv35.fwdcdn.com> In-Reply-To: <1391827303.738906888.k9hzy6eo@frv35.fwdcdn.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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 05:23:31 -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.