# ethtool：链路检测到：无（自动协商失败）在eth0上

- **ID:** `networking/ethtool-autoneg-failure`
- **领域:** networking
- **类别:** system_error
- **验证级别:** ai_generated
- **修复率:** 75%

## 根因

以太网接口因自动协商失败而无法建立链路，通常由NIC和交换机端口之间的速度/双工设置不匹配，或电缆/连接器故障引起。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| ethtool 5.10-6.10 | active | — | — |
| Linux kernel 5.10-6.8 | active | — | — |
| Intel I350/i40e drivers 5.x-6.x | active | — | — |
| Broadcom bnxt_en driver | active | — | — |
| Mellanox mlx5 driver | active | — | — |

## 解决方案

1. ```
   Check cable and connection: use `ethtool eth0` to see current settings, then test with a known-good cable. Replace if faulty.
   ```
2. ```
   Force both sides to the same speed/duplex: on Linux, `ethtool -s eth0 speed 1000 duplex full autoneg off` and configure the switch port to 1000/full. Verify with `ethtool eth0`.
   ```
3. ```
   If autoneg is required, ensure both sides support the same capabilities: update NIC firmware or driver, and verify switch port configuration (e.g., `show interfaces status` on Cisco).
   ```

## 无效尝试

- **Forcing speed/duplex on only one side (e.g., NIC set to 1000/full, switch set to auto)** — Autonegotiation requires both sides to have matching settings; forcing one side while leaving the other on auto causes a duplex mismatch, leading to packet loss or no link. (85% 失败率)
- **Replacing the NIC without testing the cable or switch port** — The issue may be a bad cable or switch port; replacing the NIC wastes time and resources. (60% 失败率)
- **Setting the interface to a lower speed (e.g., 100 Mbps) without verifying switch support** — The switch port may not support 100 Mbps or may have a different configuration, causing the same failure. (70% 失败率)
