# DHCP：未从服务器0.0.0.0收到DHCPOFFER

- **ID:** `networking/dhcp-offer-not-received`
- **领域:** networking
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

DHCP客户端发送了DISCOVER广播，但在超时时间内未收到任何来自DHCP服务器的OFFER，通常由DHCP服务器配置错误、VLAN不匹配或交换机端口配置为接入端口而非中继端口引起。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| ISC DHCP 4.4.3 | active | — | — |
| dnsmasq 2.89 | active | — | — |
| Windows Server 2022 DHCP | active | — | — |

## 解决方案

1. ```
   Verify the DHCP server is running and reachable: `sudo tcpdump -i eth0 port 67 or port 68` to check if DISCOVER packets are sent and if OFFER packets are received.
   ```
2. ```
   Ensure the client's switchport is in the correct VLAN: `show vlan brief` on the switch, and set it with `switchport access vlan 10` if needed.
   ```
3. ```
   Check for DHCP snooping on the switch: `show ip dhcp snooping` and add an exception for the trusted port if needed: `ip dhcp snooping trust`.
   ```

## 无效尝试

- **** — This simply re-initiates the same process; if the server is unreachable or misconfigured, the same error will occur. (90% 失败率)
- **** — This bypasses DHCP entirely but may cause IP conflicts or routing issues if not coordinated with the network admin; it also ignores the root cause of DHCP failure. (50% 失败率)
- **** — If the server is not reachable due to VLAN or firewall issues, specifying the server IP will not help; the DISCOVER broadcast must still reach the server. (70% 失败率)
