Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 May 2007 09:59:41 -0400
From:      Steve Bertrand <iaccounts@ibctech.ca>
To:        Bram Schoenmakers <bramschoenmakers@xs4all.nl>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Network interface restart
Message-ID:  <4641D3CD.2090405@ibctech.ca>
In-Reply-To: <20070509121211.78770@gmx.net>
References:  <200705091231.18164.bramschoenmakers@xs4all.nl>	<1A58CC26-5CAE-4834-9043-27040767CEF5@brooknet.com.au>	<200705091331.56038.bramschoenmakers@xs4all.nl> <20070509121211.78770@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4641D3CD.2090405>