Linux – Plugged-in network cable is not detected (possibly related to green ethernet?)

ethernetgigabit-ethernetlinux

I have just purchased a D-Link DIR-652 wireless router, and now I want to connect a Shuttle XS25GT V2 computer using a 1 metre Cat 5e ethernet cable. The Shuttle runs Ubuntu 12.10 and has a JMC250 Ethernet card.

When I plug the network cable in, the Shuttle does not detect the connection and can thus not communicate with the network. The output of ethtool is exactly the same as if no network cable was plugged in:

root@shuttle:~# ethtool p33p1
Settings for p33p1:
        Supported ports: [ TP MII ]
        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 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x000020c6 (8390)
                               probe link rx_err tx_err hw
        Link detected: no

This does not change using a different network cable (1m, 3m, 15m). Strangely, when I connect a different computer with the router using the same network cable, everything works fine, and when I connect the Shuttle to a different router (of a different model) using the same network cable, it also works.

I have discovered that turning auto-negotiation off fixes the problem. After running ethtool -s p33p1 autoneg off speed 100 duplex full, this is the output:

root@shuttle:~# ethtool p33p1
Settings for p33p1:
        Supported ports: [ TP MII ]
        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:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x000020c6 (8390)
                               probe link rx_err tx_err hw
        Link detected: yes

However, Gigabit ethernet requires auto-negotiation, so this will only work with reduced speed.

I suspect that the “Green Ethernet” functionality of the router might not detect the connection of the cable and thus not turn on the power of the ethernet port. There seems to be no way to disable Green Ethernet in the config menu of the router, though.

Does anyone have an idea how I could fix this problem? I tried to manually tell the network card to negotiate a connection using ethtool -r, but that did not do anything.

Best Answer

I'm willing to bet that your router is waiting to hear what kind of link whatever is connected to it is going to run at to turn the port on, and seeing that your Shuttle is waiting to hear what speed it's supposed to run at will keep waiting because the port is turned off!

I haven't read the manual yet so I can't tell you how to do it, but see if you can turn off the Green Networking for the one port your Shuttle is connected to (and leave the auto-negotiation on) and see what happens.

The other thought is to get your Shuttle to force a data packet out somehow (manual ping to 127.0.0.1 for example) to present some sort of electrical activity on the port.

After reading through D-Link's website, Green Ethernet seems to be mostly marketing. I do say mostly because there is potential to save energy, but some of the features they mention are already used in other pieces of technology. So, perhaps the "turning off the port to save energy" is a good idea in theory, but I think it makes some bad assumptions about how some other devices work and is more of a pain than practical.

GL

Related Question