Permanently configure the speed and duplex of my Ethernet card
In previous articles we talked a little like changing the speed of the network interface card (NIC), the duplex or auto negotiated the value in Linux, using the ethtool.
However, these values are not permanent, since the reinicar the machine will be lost. If you want to read about how to change the port speed of Windows 2000/2003 server, see this article.
Making changes of speed, duplex standing in Red Hat Linux
For the values of speed, duplex or auto negotiations will be activated from the boot or boot Linux, you need to edit the file / etc/sysconfig/network-scripts/ifcfg-eth0 indicates where eth0 interfaces. This file is used by Red Hat Enterprise Linux, Fedora Core, Cent Os etc.
Open the file / etc/sysconfig/network-scripts/ifcfg-eth0 and add the following line:
ETHTOOL_OPTS = "speed 100 full duplex autoneg off"
Observe and restarting the system. During boot the device eth0 will be configured to 100Mbs, full duplex, with the autonegociacion off. If it is not possible to completely turn off the system, we can just type the command to restart the network;
[root @ deathbian ~] # / etc / init.d / network restart Depending on the system load can take a couple of minutes so that the port speed ethernet switch. But if we want to change the configuration of the network card or 1000Mbps Gigabit to, change in a single file line earlier this:
ETHTOOL_OPTS = "1000 duplex full speed autoneg off"
If for some reason the command failed to try to adjust the speed to 1000Mbps, use the following command:
ETHTOOL_OPTS = "1000 duplex full speed on autoneg"
Settings standing in Debian or Ubuntu Linux
Under Debian or Ubuntu just have to create the following script as root:
| file: / etc/init.d/100Mbs |
#! / bin / sh |
Save and close the file, then give permission for execution:
deathbian root @: ~ # chmod + x / etc/init.d/100MbsOR $ sudo chmod + x / etc/init.d/100Mbs For our script is run to start auto Debian or Ubuntu use the command update-rc.d, which installs the links for init in the scripts;
deathbian root @: ~ # update-rc.d 100Mbs defaultsOR # sudo update-rc.d 100Mbs defaultsOutput: Adding system startup for / etc/init.d/100Mbs ... / etc/rc0.d/K20100Mbs -> ../init.d/100Mbs / etc/rc1.d/K20100Mbs -> ../init.d/100Mbs / etc/rc6.d/K20100Mbs -> ../init.d/100Mbs / etc/rc2.d/S20100Mbs -> ../init.d/100Mbs / etc/rc3.d/S20100Mbs -> ../init.d/100Mbs / etc/rc4.d/S20100Mbs -> ../init.d/100Mbs / etc/rc5.d/S20100Mbs -> ../init.d/100Mbs
Shut down or reboot your system for the changes to take effect, or just run the script by hand;
deathbian root @: ~ # / etc/init.d/100Mbs start Popularity: 1% [?]
Trackback URI | Comments RSS






