Quantcast
Channel: Ubuntu – Computer Repair Services, Mobiles, WordPress, Tutorial, Security & Linux Tips
Viewing all articles
Browse latest Browse all 19

How to add ethtool duplex settings to a network card

$
0
0

image9
Changing your Network Interface Speed, Duplex or Auto Negotiate settings on Red Hat Linux, Fedora and Centos.

To set the interface speed, duplex or auto negotiation on Linux system boot up (make settings permanent), you need edit /etc/sysconfig/network-scripts/ifcfg-eth0 file for eth0 interface. This file used by Red Hat enterprise Linux, Fedora core, Cent Os etc.

Open the file:
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0

Add following line:

ETHTOOL_OPTS=”speed 100 duplex full autoneg off”

Save and close the system. It will set the eth0 device to 100Mbs, full duplex, with the auto negotiation off at boot time. You can simply restart the networking (it will disconnect all ssh or ftp session) or restart the server. Depend upon traffic and load it may take upto 1 minute to setup a new port speed:
$ /etc/init.d/network restart

If you want 1000Mbs set line as follows:

ETHTOOL_OPTS=”speed 1000 duplex full autoneg off”

Update: if above command failed to work for 1000Mbps use following command (see below in comment sections for discussion) :

ETHTOOL_OPTS=”speed 1000 duplex full autoneg on”

For Debian or Ubuntu Linux

Type the following command (and test them one by one)
$ sudo ethtool –change eth0 speed xxx duplex yyy autoneg off

where xxx = 10, 100 or 1000 and yyy = half or full.
So start with 10 half, 10 full, 100 half, …

Do an ifconfig to check whether you got an IP address.

Go back to first step until it stops working and use the previous values that still worked to:

To make the change permanent, execute the following command:

$ sudo nano /etc/network/interfaces

and type at the pre-up section:

$ pre-up /usr/sbin/ethtool –change eth0 speed xxx duplex yyy autoneg off


Copyright © 2012
This feed is for personal, non-commercial use only.
The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:
)

The post How to add ethtool duplex settings to a network card appeared first on Computer Repair Services, Mobiles, Wordpress, Tutorial, Security & Linux Tips.


Viewing all articles
Browse latest Browse all 19

Latest Images

Trending Articles





Latest Images