blog.up-link.ro
1Apr/100

How To change Ethernet network card speed and duplex settings in Linux

This tutorial will explain how to change network card speed and duplex settings in linux. It's working with any linux distributions like Fedora, CentOS, Debian, Ubuntu, etc.

ethtool is an Linux/Unix command allowing to modify the NIC parameters. ethtool can be used to query and change settings such as speed, negotiation and checksum offload on many network devices, especially Ethernet devices.

1. Install ethtool

Install ethtool in Fedora and CentOS:

# yum install ethtool

Install ethtool in Debian:

# apt-get install ethtool

Install ethtool in Ubuntu:

# sudo apt-get install ethtool

2. Using ethtool

You can check the current Ethernet network card speed and duplex settings using the following command

# ethtool eth0

or

# sudo ethtool eth0

if you are using Ubuntu.

eth0 is the Ethernet network card interface

Output:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes

Turn off Auto-Negotiate feature using the following command

# ethtool -s eth0 autoneg off

or

# sudo ethtool -s eth0 autoneg off

if you are using Ubuntu.

3. ethtool Syntax

# ethtool -s eth0 speed SPEED duplex DUPLEX

Examples:

This example will show you how to setup your NIC speed 10 and half duplex
# ethtool -s eth0 speed 10 duplex half

This example will show you how to setup your NIC speed 100 and full duplex
# ethtool -s eth0 speed 100 duplex full

Print This Post Print This Post
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.