# Why gigabyte card performs on 100Mbit?

## mansniks

Hello,

I have two gigabit cards and switch, but can't make them perform faster than 100.

This shows up in kernel messages: e1000: eth1: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX. How to make it work in full speed? Thanks!

----------

## Desintegr

Does the switch support Gigabit Ethernet ?

Do you use Cat 5e cables ?

http://en.wikipedia.org/wiki/Template:UTP_Cable_Standards

 *Quote:*   

> 
> 
>     * Cat 1: Currently unrecognized by TIA/EIA. Previously used for POTS telephone communications, ISDN and doorbell wiring.
> 
>     * Cat 2: Currently unrecognized by TIA/EIA. Previously was frequently used on 4 Mbit/s token ring networks.
> ...

 

----------

## schachti

Did you try to manually set the speed instead of using autonegotiation?

----------

## DarKRaveR

 *schachti wrote:*   

> Did you try to manually set the speed instead of using autonegotiation?

 

This is only recommendable, if the switch is either manageable or at least a smartswitch with per port speed settings. Autoneg + fixed speed usually makes the autoneg side assume half duplex (which is reasonable) and gives more than ugly behavior if you force the other side into a full duplex mode.

----------

## Akkara

 *Quote:*   

> e1000: eth1: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX

 

What kernel are you using?

I vaguely recall reading something about the e1000 driver becoming split, with older cards remaining on the e1000 driver, and newer ones moving over to a new e1000e driver.  I don't know if this has happened yet, but mentioning it in case it is relevant.

----------

## schachti

 *DarKRaveR wrote:*   

> This is only recommendable, if the switch is either manageable or at least a smartswitch with per port speed settings.

 

At least it is worth a try to find out if there is a problem with autonegotiation.

----------

## DarKRaveR

 *schachti wrote:*   

>  *DarKRaveR wrote:*   This is only recommendable, if the switch is either manageable or at least a smartswitch with per port speed settings. 
> 
> At least it is worth a try to find out if there is a problem with autonegotiation.

 

Okay, ture, it might be worth a try, from experience:

2 gigabit switches with autoneg, autoneg not working, resultet in one switch using half duplex, the other full duplex and heaps of interface error (obviously autoneg didn't work in both directions, which unfortunately is mandatory for a negotiation). Forcing one into gigabit fullduplex thus disabling autoneg resulted in a complete loss of link on both sides. Setting both to fixed gigabit fullduplex again worked like a charm. The interesting part was, no matter which of the two took either of the roles (one autoneg, one fixed) resulted in a complete loss of link. Gotta love bad implementations   :Wink:  .

Still, he can give it a try, let's see if he reports back. There might even be chances, that the negotiation works, but one of the wires in the cable is broken/damaged, thus resulting in a 100FD fallback.

----------

## mansniks

Hmm, I see a discussion here  :Smile: 

I have linksys sd2005 switch, 2.6.23 / 2.6.24 kernels, cards are:

Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)

Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0)

When I tried to set speed to 1000 for one card, connection was lost (not a wonder, I think). 

At the moment I can't try again, but if I understood you all right, I should use "ethtool -s ethX speed 1000 duplex full autoneg off" on both cards? Can that make a problem if my G switch is connected to other 100 switch or router?

----------

## DarKRaveR

The Switch you got there is a single chip Design I assume (well some accompanying PHYs I guess there are).

Anyway, there is no way, you can Influence the switches Autonegotiation. If the switch sends out bad FLPs for autonegotiation, your cards will the capabilities announced by the switch. Forcing your card to 1000 mbps, whilst not sending a FLP from the card to the switch will certainly not help you case. If you have the possibility try to set your card to 1000mbps whilst letting it still send autonegotiation data, in the hope the switch might adopt, and your cards ignore whatever the switch says ... maybe only half duplex will work this way (you gotta try this out). This all is based upon the assumption your switch doesn'T send out proper FLPs with it's capabilities ... if the switch doesn't even process the ones from the cards properly, you are really in Trouble.

Now, what is strange, is that both cards react the same way, though they are different chips etc., are you sure, you are not having an issues with your cables?

----------

## mansniks

Is 13m total cable length (10m greatest length of piece) too much? It should not... Cables are 5E, I only made their ends myself. Anyway it would take some testing to say for sure, but now there are to many unknowns.

Ahhhh... I don't like to dig in all that useless stuff - why hardware fail to work properly on linux so often?! (radeon cards, atheros LAN wake on lan) Ok, but thats just because I don't like it. I will try later one more time.

----------

## DarKRaveR

No, 13m shouldn't be any trouble, if they were close to 100m, that might be an issue. Th eImportant part is, that they can do the 62.5MHz Bandwidth, including all 'contacts', and that all 4 copper pairs are connected properly ...

----------

## mansniks

So I tried this:

ethtool -s eth1 speed 1000 duplex half autoneg on           <- on intel

ethtool -s eth0 speed 1000 duplex half autoneg on           <- on atheros

after that 

ethtool eth1

Settings for eth1:

        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: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: umbg

        Wake-on: g

        Current message level: 0x00000007 (7)

        Link detected: yes

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: 1000Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: umbg

        Wake-on: g

        Link detected: yes

Obviously they don't listen to my commands much... 

then again:

ethtool -s eth1 speed 1000 duplex half autoneg on

ethtool eth1

Settings for eth1:

        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: Unknown! (65535)

        Duplex: Unknown! (255)

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: umbg

        Wake-on: g

        Current message level: 0x00000007 (7)

        Link detected: no

?!

Then do iperf -c eth0host and it (ethtool eth1) goes back to 100. Also if I set duplex to full at eth1, it doesn't work (can't connect). 

But eth0 host is performing better - ethtool -s eth0 speed 1000 duplex full autoneg on works well. 

Conclusion: most likely the problem is intel's G nic... It is and ibm laptop. Do you agree? What can I do about this?

----------

## DarKRaveR

Just for completeness, did you switch cables for testing, to see if the intel card really is the problem?

And I am not sure, if the Intel NIC is the problem - I've had caes (even for less than GBit, where NIC X didn't work at all with Switch Y, though both work with other Devices. Don't ask me what the manufacturers are doing, this all should be standards conforming, experience teaches a different lesson. 

If you have the chance, try testing the intel NIC with another switch. If the switch had the option to set explicit speeds, it would be interesting, what happens with autonegotiation off and switch+intel NIC at 1000 MBps, just to see, if things actually work, and it's just the negotiation.

----------

## eccerr0r

I've had a weird problem with one of my cable links in my house.  Gbit ethernet (Broadcom Tigon3) and a Gbit switch on the other end.  The link takes 2 minutes to negotiate and comes up in 100Mbit mode according to the switch.  And it works, at 100Mbit.

Connecting the machine straight to the port on the switch will result in a 1Gbit link.  What's funny is that's not the longest link in my house, I've got another run of cable with a hacked splice that actually negotiates the full Gbit link on another port of that switch.  Both links are shorter than 100m (I think the long link is only 80 ft, tops (with splice at around 30ft); the problematic link is around 30ft.)

I still haven't rootcaused that link in my house - most likely crossed a wire by mistake.

I mostly use Cat5 cabling; while it's generally marginal for Gbit, it mostly works...  Sometimes older cabling is actually Cat3 or omits 2 pairs; you need all 4 pairs in the cable to signal at 1Gbit.

----------

## Monkeh

 *eccerr0r wrote:*   

> I've had a weird problem with one of my cable links in my house.  Gbit ethernet (Broadcom Tigon3) and a Gbit switch on the other end.  The link takes 2 minutes to negotiate and comes up in 100Mbit mode according to the switch.  And it works, at 100Mbit.
> 
> Connecting the machine straight to the port on the switch will result in a 1Gbit link.  What's funny is that's not the longest link in my house, I've got another run of cable with a hacked splice that actually negotiates the full Gbit link on another port of that switch.  Both links are shorter than 100m (I think the long link is only 80 ft, tops (with splice at around 30ft); the problematic link is around 30ft.)
> 
> I still haven't rootcaused that link in my house - most likely crossed a wire by mistake.
> ...

 

You most likely have a wire in the wrong place or a bad crimp.

 *Quote:*   

> Conclusion: most likely the problem is intel's G nic... It is and ibm laptop. Do you agree? What can I do about this?

 

Unlikely. Try with a different cable.

----------

## mansniks

Monkeh is right... It is cable to blame. (but why both cards took 100, while one could take 1000?)

So this is what I did:

1. look at http://www.cdaschools.org/lchs/faculty/bkeylon/comptech/Wiring/wiring.html , choose T568B,

2. make cable carefully,

3. test with iperf.

Result: 83.5MB/s!

----------

## Monkeh

 *mansniks wrote:*   

> Monkeh is right... It is cable to blame. (but why both cards took 100, while one could take 1000?)

 

Possibly a bug in the driver. Either way, you want autoneg at all times, really. It handles faulty cables for you so you at least get a link.  :Wink: 

----------

## eccerr0r

Finally rootcaused the issue - I miswired the connector and made it a crossover where it should have been straight through.  This completely confused as the second pair were straight through... I suppose eventually the automatic link negotiator found that the cable was a crossover 100bT and linked up as such.  Hooking up the wall connector correctly, it now links up fast at full 1Gbit speeds!

----------

## Monkeh

 *eccerr0r wrote:*   

> Finally rootcaused the issue - I miswired the connector and made it a crossover where it should have been straight through.  This completely confused as the second pair were straight through... I suppose eventually the automatic link negotiator found that the cable was a crossover 100bT and linked up as such.  Hooking up the wall connector correctly, it now links up fast at full 1Gbit speeds!

 

Ah yes, the old T568A/B crossover. Annoying things, those. I'd check the rest of your cables and make sure they're not like that.

----------

