3

CentOS 5.x

I configured my CenTOS server to use full duplex. I did this by editing the network script:

more /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.200
NETMASK=255.255.255.0
HWADDR=00:14:5E:0C:8B:E3

ETHTOOL_OPTS="speed 100 duplex full autoneg off"

(IPs and MAC has been renamed to protect the innocent =) )

After making this change, I ran service network restart

If I run mii-tool, i see:

eth0: no autonegotiation, 100baseTx-HD, link ok

However if I run ethtool eth0, I see:

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 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: g
        Wake-on: g
        Current message level: 0x000000ff (255)
        Link detected: yes

Why is there a discrepancy in the duplex? Mii-tool thinks that it's half and ethtool thinks that it's full.

Is ethtool not actually querying the current duplex state?

Mike B
  • 11,570
  • 42
  • 106
  • 165
  • 1
    It was always strange to me too, but for many years mii-tool has never reported accurate status, so I always use ethtool – Gabor Vincze Mar 07 '12 at 23:22

1 Answers1

2

It might be mii-tool that's lying to you -- but yeah, one of 'em's got the wrong idea. I'd trust ethtool, as I believe it's better supported by most drivers these days, but ultimately any of those tools can only trust what they're being told from the drivers. Ask your switch what it thinks is going on, as something of an "independent observer".

womble
  • 95,029
  • 29
  • 173
  • 228
  • 1
    All gigabit nics properly support ethtool. They tend to emulate the older mii protocol (miitool) since mii isnt capable of handling gigabit. So ya, trust ethtool over miitool. – phemmer Mar 08 '12 at 00:07