What's the difference between the following link modes when we run ethtool:
- Supported link modes
- Advertised link modes
- Link partner advertised link modes
There is a similar output from mii-tool:
- Capabilities
- Advertising
- Link Partner
Please explain what these 3 link modes actually mean.
Also, does Link Partner mean the router that I'm connected to? Or it means the NIC?
If so, is there a way to find the link modes supported by the router? (Not the Ethernet card)
21 Answer
When you connect two Ethernet NICs with a cable, for example your PC and your router, but also e.g. your PC and your laptop, the NICs perform autonegotation over the cable: They advertise the possible connection speeds and modes to the partner on the other end of the cable, and then both NICs choose the "best" speed and mode.
So the supported link modes are the modes that the hardware of the NIC that ethtool is interrogated can actually do. The advertised modes are the modes that are advertised to the partner on the other end over the cable, and the link partner advertised modes are the modes that the NIC at the other end is advertising over the cable.
Most routers run embedded linux, so you can find out the supported modes by getting root access to your router and running ethtool on the router. However, since normally the advertised modes will correspond to the supported modes (unless some are impossible with the given cable), you can also just look at the link partner advertised modes as first approximation.