Posts Tagged ethtool

Transmission speed was too slow because of a duplex mismatch with the switch.

Today, when some developers were investigating some server issues, they found the network between server A and B is too slow, only about 50KB/s.

[root@A ~]# wget speedtestsa.com/100_MB.BIN
–2011-07-22 01:02:38– http://speedtestsa.com/100_MB.BIN
Resolving speedtestsa.com… 69.174.244.235
Connecting to speedtestsa.com|69.174.244.235|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100_MB.BIN.1′

0% [ ] 234,316 32.6K/s eta 51m 25s

Later, We have found the issue with A. The issue was a duplex mismatch with the switch.

[root@A ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes

This has been corrected by setting the network interface to auto-negotiate

We have set the auto-negotiation with the following command
[root@A ~]# ethtool -s eth0 autoneg on

and commented the line
#ETHTOOL_OPTS=”speed 100 duplex full autoneg off”

in the /etc/sysconfig/network-scripts/ifcfg-eth0

[root@A ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes

Files are now downloading at the expected speeds.

[root@A ~]# wget speedtestsa.com/100_MB.BIN
–2011-07-22 01:52:18– http://speedtestsa.com/100_MB.BIN
Resolving speedtestsa.com… 69.174.244.235
Connecting to speedtestsa.com|69.174.244.235|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100_MB.BIN.8′

35% [=============================> ] 37,164,108 8.22M/s eta 13s

1 Comment

Fork me on GitHub