losing NFS connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Marc Powell wrote:
> 
>From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] On
>Behalf Of Angelo Machils

>>Which file do I have to edit in order to set the NIC into fixed state.

> It varies but mii-tool changes will be lost on reboot. There are several
> ways of getting around that from simplest to hardest --
> 
> - Add '/sbin/mii-tool -F 100baseTx-FD' to /etc/rc.local
> - Add '/sbin/mii-tool -F 100baseTx-FD ${DEVICE}' to
> /etc/sysconfig/network-scripts/ifup-post
> - research your card driver and add the appropriate arguments in
> /etc/modules.conf.
> 
> I almost always opt for the first option. As has been previously noted,
> you must make sure that the switch, hub or router that you are connected
> to is also forced to the same speed and duplex.

I'd place local changes to /sbin/ifup-local.  It is invoked at the end 
of ifup-post with interface name as argument.  This makes it ideal 
location to place all local modifications.

The file does not exist by default and will not be clobbered on upgrades 
(like many other files in /etc/sysconfig/network-scripts).  Don't forget 
to chmod it 755 after creating it.

Using /sbin/ifup-local makes sure interface gets into the forced mode as 
soon as it is configured, and before any network services are started. 
rc.local is executed after network services are already running and 
serving connections.  This makes rc.local not suitable for the job.  For 
example, if there is a service that takes long time to start, and it is 
started after web or mail service, you'r server might have significant 
traffic with interface still in wrong mode.

Placing something like this to ifup-local should do the trick:

# Make sure only eth0 is forced to 100FDX
if [ "$1" = "eth0" ]
then
    /sbin/mii-tool -F 100baseTx-FD "$1"
fi

Simillary, ifdown-post script invokes /sbin/ifdown-local with interface 
name as argument if the file exists on the disk.  This makes them ideal 
pair of scripts where you can do and undo changes to network interfaces 
as they are configured and unconfigured.

-- 
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux