From owner-freebsd-questions@FreeBSD.ORG Wed May 9 10:55:42 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EAA616A402 for ; Wed, 9 May 2007 10:55:42 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from mailout2.pacific.net.au (mailout2-6.pacific.net.au [61.8.2.229]) by mx1.freebsd.org (Postfix) with ESMTP id C870B13C458 for ; Wed, 9 May 2007 10:55:41 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 5A6A21098C6; Wed, 9 May 2007 20:55:33 +1000 (EST) Received: from [192.168.100.2] (ppp235F.dyn.pacific.net.au [61.8.35.95]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 24E9827411; Wed, 9 May 2007 20:55:38 +1000 (EST) In-Reply-To: <200705091231.18164.bramschoenmakers@xs4all.nl> References: <200705091231.18164.bramschoenmakers@xs4all.nl> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1A58CC26-5CAE-4834-9043-27040767CEF5@brooknet.com.au> Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Wed, 9 May 2007 20:55:37 +1000 To: Bram Schoenmakers X-Mailer: Apple Mail (2.752.3) Cc: freebsd-questions@freebsd.org Subject: Re: Network interface restart X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 10:55:42 -0000 On 09/05/2007, at 8:31 PM, Bram Schoenmakers wrote: > Hi, > > I tried to reduce the MTU of a network interface on a remote > FreeBSD 6.2 > machine. > > So that means changing this line in rc.conf: > > ifconfig_bge0="inet xxx.xxx.xxx.xxx netmask 255.255.255.128" > > to > > ifconfig_bge0="inet xxx.xxx.xxx.xxx netmask 255.255.255.128 mtu 1472" > > Of course, there's a real IP address set. > > Then, I tried to restart the network interface: > > /etc/rc.d/netif restart > > which went horribly wrong. I lost connection and wasn't able to > reconnect. I > tried to run this in some 'fallback' script, which automatically > should > restore the old configuration and restarting the network interface > again > after 5 minutes. Even if that failed, it should reboot the machine. > But > somehow the script was aborted, although I ran it in a 'screen' > session over > SSH. So the last resort was a manual reboot, which started the > interface > with MTU 1472 just fine. > > Could someone please point out where I made the mistake? When your network interface went down, you lost the connection, your shell lost the terminal and your script was terminated before it could finish doing what it was supposed to. Possibly you need to use something like "nohup" or "screen" (from ports), or have some other form of terminal available.