Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2007 20:55:37 +1000
From:      Sam Lawrance <boris@brooknet.com.au>
To:        Bram Schoenmakers <bramschoenmakers@xs4all.nl>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Network interface restart
Message-ID:  <1A58CC26-5CAE-4834-9043-27040767CEF5@brooknet.com.au>
In-Reply-To: <200705091231.18164.bramschoenmakers@xs4all.nl>
References:  <200705091231.18164.bramschoenmakers@xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1A58CC26-5CAE-4834-9043-27040767CEF5>