Unable to set eth0 autoneg off speed 1000 duplex full : invalid argument

1

I use Ubuntu server for my things,but when i config speed 1000 and duplex full the error occur. I've tried the answers from here,does not work, the command i used is

ethtool -s eth0 speed 100 duplex full

Before this happened I changed my network settings, but unfortunately forgot what I have done. Every time I restart my computer or network, server cannot be connected and the server shows the error something like "speed/duplex mismatch". I tried everything I can, finally, I added the argument blew to my network interfaces, and it worked, able to be connected.

up sleep -5; ethtool -s eth0 speed 10 duplex half

But science then , my network is very slow. I want to have my server full speed, and I don't just know how to do it. I have search google, still nothing. I tried to reinstall the operation system, it still happens. I have to add that line above to my networking settings in order to get my network working. And this is my eth0 information.

    Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 10Mb/s
    Duplex: Half
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
    Current message level: 0x000000ff (255)
                   drv probe link timer ifdown ifup rx_err tx_err
    Link detected: yes

Please help me on how to get my net working good. What should I do to get my network working well? I'll be very pleased. Is this caused by my settings or by the net provider? But before I change my network settings everything is perfect. Please help!

ubuntu
linux-networking
ethtool
asked on Server Fault Dec 28, 2014 by amrino • edited Apr 13, 2017 by Community

1 Answer

3

Auto-negotiation of speed and duplex is part of the 1000BASE-T specification, that is gigabit ethernet over unshielded twisted pair copper cables.

You cannot force 1000 full duplex, that's not gigabit ethernet, that's some other thing for which a standard does not exist.

You can set speed and duplex for 10Mbps and 100Mbps, because autoneg was not required for those versions of ethernet.

If you like, you can disable the various speeds and duplexes which a NIC advertises, so it only ever advertises 1000/full, but auto-negotiation is still required.

See man ethtool and look for "advertise".


In regards to your issue, see here:

Speed: 10Mb/s
Duplex: Half

When a link cannot auto-negotiate, it falls back to the slowest supported speed at half duplex.

Auto-negotiation is failing on your link. Look at why the switch won't autoneg. Maybe try a different cable. If you're messing with autoneg settings just remove everything and let the link auto-negotiate properly.

answered on Server Fault Dec 28, 2014 by suprjami

User contributions licensed under CC BY-SA 3.0