Lines Matching +full:g +full:- +full:link
1 .. SPDX-License-Identifier: GPL-2.0
7 ------------
11 1. **Users and System Administrators**: For those dealing with real-world
12 Ethernet issues, this guide provides a practical, step-by-step
15 or mysterious network issues, jump right into the step-by-step guide and
24 Step-by-Step Diagnostic Guide from Linux (General Ethernet)
25 -----------------------------------------------------------
28 focusing on **link stability and detection** across different Ethernet
29 environments, including **Single-Pair Ethernet (SPE)** and **Multi-Pair
37 In this guide, we assume that users may have **limited or no access to the link
43 - **Link is up and stable, but no data transfer**: If the link is stable but
47 - **Link is unstable**: Link resets, speed drops, or other fluctuations
50 - **No link detected**: The interface is up, but no link is established.
56 administratively up. Unlike `ethtool`, which provides information on the link
61 For example, in the output `<NO-CARRIER,BROADCAST,MULTICAST,UP>`, the important
64 - **UP**: The interface is in the administrative "UP" state.
65 - **NO-CARRIER**: The interface is administratively up, but no physical link is
71 - **Command:** `ip link show dev <interface>`
73 - **Expected Output:**
75 .. code-block:: bash
77 4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
78 link/ether 88:14:2b:00:96:f2 brd ff:ff:ff:ff:ff:ff
80 - **Interpreting the Output:**
82 - **Administrative UP State**:
84 - If the output contains **"UP"**, the interface is administratively up,
85 and the system is trying to establish a physical link.
87 - If you also see **"NO-CARRIER"**, it means the physical link has not been
89 misconfiguration, or no connection at the link partner. In this case,
90 proceed to the **Inspect Link Status and PHY Configuration** section.
92 - **Administrative DOWN State**:
94 - If the output lacks **"UP"** and shows only states like
98 .. code-block:: bash
100 ip link set dev <interface> up
102 - **Next Steps**:
104 - If the interface is **administratively up** but shows **NO-CARRIER**,
105 proceed to the **Inspect Link Status and PHY Configuration** section to
108 - If the interface was **administratively down** and you have brought it up,
112 - **If the interface is up and the link is detected**:
114 - If the output shows **"UP"** and there is **no `NO-CARRIER`**, the
115 interface is administratively up, and the physical link has been
119 - If the interface is up and the link is detected but **no data is being
126 - If the **link is unstable** or **frequently resetting or dropping**, this
131 Inspect Link Status and PHY Configuration
134 Use `ethtool -I` to check the link status, PHY configuration, supported link
135 modes, and additional statistics such as the **Link Down Events** counter. This
137 duplex issues, and link instability.
139 For both **Single-Pair Ethernet (SPE)** and **Multi-Pair Ethernet (MPE)**
140 devices, you will use this step to gather key details about the link. **SPE**
143 multiple link modes and autonegotiation.
145 - **Command:** `ethtool -I <interface>`
147 - **Example Output for SPE Interface (Non-autonegotiation)**:
149 .. code-block:: bash
153 Supported link modes: 100baseT1/Full
155 Supports auto-negotiation: No
157 Advertised link modes: Not applicable
159 Advertised auto-negotiation: No
163 Auto-negotiation: off
164 master-slave cfg: forced slave
165 master-slave status: slave
169 MDI-X: Unknown
170 Supports Wake-on: d
171 Wake-on: d
172 Link detected: yes
174 Link Down Events: 2
176 - **Example Output for MPE Interface (Autonegotiation)**:
178 .. code-block:: bash
182 Supported link modes: 10baseT/Half 10baseT/Full
184 Supported pause frame use: Symmetric Receive-only
185 Supports auto-negotiation: Yes
187 Advertised link modes: 10baseT/Half 10baseT/Full
189 Advertised pause frame use: Symmetric Receive-only
190 Advertised auto-negotiation: Yes
192 Link partner advertised link modes: 10baseT/Half 10baseT/Full
194 Link partner advertised pause frame use: Symmetric Receive-only
195 Link partner advertised auto-negotiation: Yes
196 Link partner advertised FEC modes: Not reported
199 Auto-negotiation: on
203 MDI-X: Unknown
204 Supports Wake-on: pg
205 Wake-on: p
206 Link detected: yes
207 Link Down Events: 1
209 - **Next Steps**:
211 - Record the output provided by `ethtool`, particularly noting the
212 **master-slave status**, **speed**, **duplex**, and other relevant fields.
221 or the **PSE** (Power Sourcing Equipment) is managed by proprietary user-space
224 (LEDs), using multimeters, or consulting vendor-specific software for
230 - **Command:** `ethtool --show-pse <interface>`
232 - **Expected Output Examples**:
239 .. code-block:: bash
244 2. **PoDL (Single-Pair Ethernet)**:
248 .. code-block:: bash
258 .. code-block:: bash
265 - **Adjust Power Limit (if needed)**:
267 - Sometimes, the available power limit may not be sufficient for the link
270 - **Command:** `ethtool --set-pse <interface> c33-pse-avail-pw-limit <limit>`
274 .. code-block:: bash
276 ethtool --set-pse eth1 c33-pse-avail-pw-limit 18000
277 ethtool --show-pse eth1
281 .. code-block:: bash
286 - **Next Steps**:
288 - **PoE or PoDL Not Used**: If **PoE** or **PoDL** is not implemented or used
292 - **PoE or PoDL Controlled Externally**: If **PoE** or **PoDL** is used but
293 is not managed by the Linux kernel's **PSE-PD** framework (i.e., it is
294 controlled by proprietary user-space software or external tools), this part
295 is out of scope for this documentation. Please consult vendor-specific
298 - **PSE Admin State Disabled**:
300 - If the `PSE Admin State:` is **disabled**, enable it by running one of
303 .. code-block:: bash
305 ethtool --set-pse <devname> podl-pse-admin-control enable
309 ethtool --set-pse <devname> c33-pse-admin-control enable
311 - After enabling the PSE Admin State, return to the start of the **Check
314 - **Power Not Delivered**: If the `Power Detection Status` shows something
315 other than "delivering power" (e.g., `over current`), troubleshoot the
319 - **Power Delivered but No Link**: If power is being delivered but no link is
321 Diagnostics** or reviewing the **Inspect Link Status and PHY
323 link or settings.
330 the state of the link partner. The results from the cable test will help in
332 noise-related problems.
334 - **Command:** `ethtool --cable-test <interface>`
336 The following are the typical outputs for **Single-Pair Ethernet (SPE)** and
337 **Multi-Pair Ethernet (MPE)**:
339 - **For Single-Pair Ethernet (SPE)**:
340 - **Expected Output (SPE)**:
342 .. code-block:: bash
349 results can be influenced by the link partner's state. Refer to the
353 - **For Multi-Pair Ethernet (MPE)**:
354 - **Expected Output (MPE)**:
356 .. code-block:: bash
378 local hardware and the link partner**. The accuracy and reliability of the
385 - An **Open Circuit** result might not only indicate a damaged or disconnected
386 cable but also occur if the cable is properly attached to a powered-down link
389 - Some PHYs may report a **Short within Pair** if the link partner is in
395 these quirks are often hardware-specific, the **kernel driver** would be an
406 - **OK**:
408 - The cable is functioning correctly, and no issues were detected.
410 - **Next Steps**: If you are still experiencing issues, it might be related
411 to higher-layer problems, such as duplex mismatches or speed negotiation,
412 which are not physical-layer issues.
414 - **Special Case for `BaseT1` (1000/100/10BaseT1)**: In `BaseT1` systems, an
415 "OK" result typically also means that the link is up and likely in **slave
419 for short-distance mode).
421 - **Open Circuit**:
423 - An **Open Circuit** result typically indicates that the cable is damaged or
426 - If the link partner is in **admin down** state or powered off, you might
429 - **Next Steps**: Inspect the cable at the fault length for visible damage
430 or loose connections. Verify the link partner is powered on and in the
433 - **Short within Pair**:
435 - A **Short within Pair** indicates an unintended connection within the same
438 - **Next Steps**: Replace or repair the cable and check for any physical
441 - **Short to Another Pair**:
443 - A **Short to Another Pair** means the wires from different pairs are
446 - **Next Steps**: Replace or repair the damaged cable. Inspect the cable for
449 - **Impedance Mismatch**:
451 - **Impedance Mismatch** indicates a reflection caused by an impedance
453 abnormal impedance (e.g., when different cable types are spliced together
456 - **Next Steps**: Check the cable quality and ensure consistent impedance
460 - **Noise**:
462 - **Noise** means that the Time Domain Reflectometry (TDR) test could not
466 - **Next Steps**: Identify and eliminate sources of electromagnetic
470 - **Resolution Not Possible**:
472 - **Resolution Not Possible** means that the TDR test could not detect the
476 - **Next Steps**: Inspect the cable manually if possible, or use alternative
479 - **Unknown**:
481 - An **Unknown** result may occur when the test cannot classify the fault or
485 - **Next Steps**: Re-run the test, verify the link partner's state, and inspect
488 Verify Link Partner PHY Configuration
491 If the cable test passes but the link is still not functioning correctly, it’s
492 essential to verify the configuration of the link partner’s PHY. Mismatches in
493 speed, duplex settings, or master-slave roles can cause connection issues.
498 - If both link partners support autonegotiation, ensure that autonegotiation is
499 enabled on both sides and that all supported link modes are advertised. A
502 - **Quick Fix:** Reset autonegotiation to the default settings, which will
503 advertise all default link modes:
505 .. code-block:: bash
507 ethtool -s <interface> autoneg on
509 - **Command to check configuration:** `ethtool <interface>`
511 - **Expected Output:** Ensure that both sides advertise compatible link modes.
512 If autonegotiation is off, verify that both link partners are configured for
515 The following example shows a case where the local PHY advertises fewer link
516 modes than it supports. This will reduce the number of overlapping link modes
517 with the link partner. In the worst case, there will be no common link modes,
518 and the link will not be created:
520 .. code-block:: bash
523 Supported link modes: 1000baseT/Full, 100baseT/Full
524 Advertised link modes: 1000baseT/Full
527 Auto-negotiation: on
532 - One possible issue occurs when one side is using **autonegotiation** (as in
533 most modern systems), and the other side is set to a **forced link mode**
534 (e.g., older hardware with single-speed hubs). In such cases, modern PHYs
535 will attempt to detect the forced mode on the other side. If the link is
538 - **No or empty "Link partner advertised link modes"**.
540 - **"Link partner advertised auto-negotiation:"** will be **"no"** or not
543 - This type of detection does not always work reliably:
545 - Typically, the modern PHY will default to **Half Duplex**, even if the link
548 - Some PHYs may not work reliably if the link partner switches from one
551 - **Next Steps**: Set both sides to the same fixed speed and duplex mode to
554 .. code-block:: bash
556 ethtool -s <interface> speed 1000 duplex full autoneg off
561 - In **BaseT1** systems (e.g., 1000BaseT1, 100BaseT1), link establishment
563 **slave**. A mismatch in this master-slave configuration can prevent the link
567 - **Role Preference in 1000BaseT**: The **1000BaseT** specification allows link
568 partners to negotiate master-slave roles or role preferences during
571 force these PHYs into a specific role (e.g., **forced master** or **forced
572 slave**) or try a weaker option by setting preferences. If both link partners
573 have the same issue and are forced into the same mode (e.g., both forced into
574 master mode), they will not be able to establish a link.
576 - **Next Steps**: Ensure that one side is configured as **master** and the
579 **forced**. Check for any driver-related restrictions or forced modes.
581 - **Command to force master/slave mode**:
583 .. code-block:: bash
585 ethtool -s <interface> master-slave forced-master
589 .. code-block:: bash
591 ethtool -s <interface> master-slave forced-master speed 1000 duplex full autoneg off
594 - **Check the current master/slave status**:
596 .. code-block:: bash
602 .. code-block:: bash
604 master-slave cfg: forced-master
605 master-slave status: master
607 - **Hardware Bugs and Driver Forcing**: If a known hardware issue forces the
610 across both link partners, and if both PHYs are forced into the same mode,
613 Monitor Link Resets and Speed Drops
616 If the link is unstable, showing frequent resets or speed drops, this may
619 downshift events or link speed changes via user space tools, both the Linux
623 - **Monitor Kernel Logs for Link Resets and Speed Drops**:
625 - The Linux kernel will print link status changes, including downshift
627 duplex mode, and downshifted link speed (if the driver supports it).
629 - **Command to monitor kernel logs in real-time:**
631 .. code-block:: bash
633 dmesg -w | grep "Link is Up\|Link is Down"
635 - Example Output (if a downshift occurs):
637 .. code-block:: bash
639 eth0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
640 eth0: Link is Down
642 This indicates that the link has been established but has downshifted from
645 - **Note**: Not all drivers or PHYs support downshift reporting, so you may
648 - **Monitor Link Down Events Using `ethtool`**:
650 - Starting with the latest kernel and `ethtool` versions, you can track
651 **Link Down Events** using the `ethtool -I` command. This will provide
652 counters for link drops, helping to diagnose link instability issues if
655 - **Command to monitor link down events:**
657 .. code-block:: bash
659 ethtool -I <interface>
661 - Example Output (if supported):
663 .. code-block:: bash
666 Link Down Events: 5
668 This indicates that the link has dropped 5 times. Frequent link down events
672 - **Check Link Status and Speed**:
674 - Even though downshift counts or events are not easily tracked, you can
675 still use `ethtool` to manually check the current link speed and status.
677 - **Command:** `ethtool <interface>`
679 - **Expected Output:**
681 .. code-block:: bash
685 Auto-negotiation: on
686 Link detected: yes
691 - **Disable Energy-Efficient Ethernet (EEE) for Diagnostics**:
693 - **EEE** (Energy-Efficient Ethernet) can be a source of link instability due
694 to transitions in and out of low-power states. For diagnostic purposes, it
696 contributing to link instability. This is **not a generic recommendation**
699 - **Next Steps**: Disable EEE and monitor if the link becomes stable. If
703 - **Command:**
705 .. code-block:: bash
707 ethtool --set-eee <interface> eee off
709 - **Important**: If disabling EEE resolves the instability, the issue should
714 - **Monitor Error Counters**:
716 - Use `ethtool -S <interface> --all-groups` to retrieve standardized interface
719 - **Command:** `ethtool -S <interface> --all-groups`
721 - **Example Output (if supported)**:
723 .. code-block:: bash
725 phydev-RxFrames: 100391
726 phydev-RxErrors: 0
727 phydev-TxFrames: 9
728 phydev-TxErrors: 0
730 - If the unified interface is not supported, use `ethtool -S <interface>` to
731 retrieve MAC and PHY counters. Note that non-standardized PHY counter names
734 - **Command:** `ethtool -S <interface>`
736 - **Example Output (if supported)**:
738 .. code-block:: bash
744 - **Note**: If no meaningful error counters are available or if counters are
745 not supported, you may need to rely on physical inspections (e.g., cable
746 condition) or kernel log messages (e.g., link up/down events) to further
749 - **Compare Counters**:
751 - Compare the egress and ingress frame counts reported by the PHY and MAC.
753 - A small difference may occur due to sampling rate differences between the
757 - Significant discrepancies indicate potential issues in the data path
780 can hunt down every elusive network issue - one twisted pair at a time.
783 dig deeper - or report that bug!