From owner-freebsd-questions@FreeBSD.ORG Wed May 9 14:00:00 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 B755C16A403 for ; Wed, 9 May 2007 14:00:00 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: from pearl.ibctech.ca (pearl.ibctech.ca [208.70.104.210]) by mx1.freebsd.org (Postfix) with ESMTP id 184B613C4AE for ; Wed, 9 May 2007 13:59:58 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: (qmail 67027 invoked by uid 1002); 9 May 2007 13:59:58 -0000 Received: from iaccounts@ibctech.ca by pearl.ibctech.ca by uid 89 with qmail-scanner-1.22 (spamassassin: 2.64. Clear:RC:1(208.70.107.100):. Processed in 15.926008 secs); 09 May 2007 13:59:58 -0000 Received: from unknown (HELO ?192.168.1.210?) (steve@ibctech.ca@208.70.107.100) by pearl.ibctech.ca with (DHE-RSA-AES256-SHA encrypted) SMTP; 9 May 2007 13:59:42 -0000 Message-ID: <4641D3CD.2090405@ibctech.ca> Date: Wed, 09 May 2007 09:59:41 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Bram Schoenmakers References: <200705091231.18164.bramschoenmakers@xs4all.nl> <1A58CC26-5CAE-4834-9043-27040767CEF5@brooknet.com.au> <200705091331.56038.bramschoenmakers@xs4all.nl> <20070509121211.78770@gmx.net> In-Reply-To: <20070509121211.78770@gmx.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 14:00:00 -0000 >> But as I said, I ran the script from a screen session, so that makes me >> wonder >> why the execution was aborted. >> >> But is running '/etc/rc.d/netif restart'' known to cause problems? I think >> I >> shouldn't have to use scripts like these just to change a setting on the >> network interface. >> >> Kind regards, >> >> -- >> Bram Schoenmakers >> > > Hi Bram > > You're exactly right. You don't need to run scripts like this. "ifconfig" will do what you want. As far as I can see, > > "ifconfig bge0 mtu 1472" > > should suffice. I like the ifconfig idea better, as per the routing. I don't know but does netif also drop firewall state rules? This should work well 'just in case' while running in a screen. If you get no response after running it, it'll put it back the way it was before. If you do get a response, you can send the process a ^C during sleep(): #!/bin/sh ifconfig bge0 mtu 1472 sleep 5 ifconfig bge0 mtu 1500 Steve