Network interface restart

Steve Bertrand iaccounts at ibctech.ca
Wed May 9 14:00:00 UTC 2007


>> 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


More information about the freebsd-questions mailing list