0

Let's say two hosts are connected with an Ethernet connection. There is a similar sounding question that talks about how the two LAN cards determine the link speed by sending and receiving auto-negotiation pulses where both cards advertise their capabilities.

However, how is the cable taken into account? Let's say that both LAN cards are identical and support a much higher speed than the cable, how do they "sense" that they need to settle for a slower speed?

1
  • There are so many ethernet variants, each requiring a specific medium,, and most are a fixed speed. Check out this answer for a list of many of the ethernet variants and maximum cable length of the variant. Commented Mar 21, 2021 at 14:40

1 Answer 1

3

There's Autonegotiation and that's it. Both sides advertise the speeds and modes they support and the best mutually supported mode is selected. The cable is not tested or trained. If the cable quality doesn't support the chosen speed, transmission errors and even repeated link loss have to be expected.

The rare exception with training are "smart-rate" ports with any subset of 1000BASE-T, 2.5GBASE-T, 5GBASE-T, and 10GBASE-T supported. Those ports use a training mode (within the PMA sublayer) for testing the cable and (yet optional) fast retraining.

Also, there may be proprietary mechanisms for falling back to lower speeds, based on pair connectivity or cable training. Likely the most widely used is Broadcom's Ethernet@Wirespeed driver option that removes 1000BASE-T from Autonegotiation temporarily when PCS fails to link all lanes (because of a two-pair or damaged cable), effectively falling back to 100BASE-TX.

6
  • 1
    But when I put a low quality ethernet cable between my machine and my NAS, then ubuntu will tell me "ethernet wired xx MB/s". And if I switch out the cable to a CAT 6 cable, then I see this message change... So somehow ubuntu seems to know how much throughput the cable can take. Commented Mar 21, 2021 at 15:15
  • 1
    @kuropan It's possible that your NIC and driver have some sort of smart-rate technology but it certainly isn't the default. Commented Mar 21, 2021 at 19:55
  • 1
    My understanding is that many 1G interfaces will retry at 100M if they fail to succesfully establish a link at 1G. Commented Mar 22, 2021 at 14:44
  • @PeterGreen That's mostly Broadcom's "Ethernet@Wirespeed". I considered adding that to the answer, will do. Commented Mar 22, 2021 at 15:05
  • 2
    @kuropan, 1 Gbps on UTP (1000Base-T) requires all four pairs to work, but if your cable does not have all four pairs good, then it will try to connect at 100 Mbps (100Base-TX), which only requires two good pairs. Many early ethernet UTP cables only connected the two pairs because 10Base-T and 100Base-TX only used the two pairs. Commented Mar 22, 2021 at 15:20

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.