未知的 DHCP 问题

网络工程 dhcp 播送 视窗
2022-02-07 01:25:12

有时在我的网络中我有一些 DHCP 问题,客户端没有收到他们的 IP。问题似乎与交换机有关,因为例如,如果我更改客户端的交换机端口,则 dhcp 开始工作。

我的wifi也有同样的问题,当我在接入点的端口出现问题时,在同一个accesspint连接的所有wifi客户端都无法获得有效的IP。

几个小时后,问题消失了,没有采取任何行动。我尝试重新启动 DHCP 服务器(它是 windows server 2016 服务)但没有成功。

我检查了客户端网络驱动程序,但问题发生在不同的网卡和不同的计算机上。

我正在使用 HP 交换机 1810/1910/2590 ,您知道是否有任何已知功能可以阻止广播流量?

2个回答

生成树将所有端口作为“阻塞”开始,直到它可以确认没有循环。该过程最多可能需要 30 秒。在我的 2810 上,没有任何其他显式配置,只需要几秒钟。

I 01/01/90 00:00:42 ports: port 1 is Blocked by STP
I 01/01/90 00:00:45 ports: port 1 is now on-line

(配置)

hp-2810-1# show spanning-tree 1 config

 Multiple Spanning Tree (MST) Configuration Information

  STP Enabled [No] : Yes
  Force Version [MSTP-operation] : MSTP-operation
  Default Path Costs [802.1t] : 802.1t
  MST Configuration Name : [...]
  MST Configuration Revision : ...      Switch Priority : 0
  Forward Delay [15] : 15               Hello Time [2] : 2
  Max Age [20] : 20                     Max Hops [20] : 20

                  | Path      Prio  Admin Auto  Admin Hello  Root   TCN    BPDU
  Port  Type      | Cost      rity  Edge  Edge  PtP   Time   Guard  Guard  Flt
  ----- --------- + --------- ----- ----- ----- ----- ------ ------ ------ ----
  1     100/1000T | Auto      128   No    Yes   True  Global No     No     No

hp-2810-1# show spanning-tree 1 detail

 Status and Counters - CST Port(s) Detailed Information

  Port                      : 1
  Status                    : Up
  BPDU Protection           : No
  BPDU Filtering            : No
  Errant BPDU Count         : 0
  Root Guard                : No
  TCN Guard                 : No
  MST Region Boundary       : Yes
  External Path Cost        : 20000
  External Root Path Cost   : 0
  Administrative Hello Time : Global
  Operational Hello Time    : 2
  AdminEdgePort             : No
  Auto Edge Port            : Yes
  OperEdgePort              : Yes
  AdminPointToPointMAC      : True
  OperPointToPointMAC       : Yes
  Aged BPDUs Count          : 0
  Loop-back BPDUs Count     : 0
  TC ACK Flag Transmitted   : 0
  TC ACK Flag Received      : 0

  MST        MST        CFG        CFG        TCN        TCN
  BPDUs Tx   BPDUs Rx   BPDUs Tx   BPDUs Rx   BPDUs Tx   BPDUs Rx
  ---------- ---------- ---------- ---------- ---------- ----------
  159598     0          0          0          0          0

如您所见,交换机自动将端口分类为“边缘”。Trk2(LACP group to another switch)的状态显示OperEdgePort: No,因为它转到启用 STP 的交换机。请注意,端口启动速度更快,因为 LACP 在 100 毫秒内完成......

I 01/01/90 00:00:42 ports: port 41 is Blocked by LACP
I 01/01/90 00:00:42 ports: port 41 is Blocked by STP
I 01/01/90 00:00:42 ports: port 41 in Trk2 is now on-line

(忽略 1990,它没有 RTC,所有这些消息都发生在 NTP 设置时钟之前。)

您应该将客户端(访问)端口置于管理边缘模式。这样,它们不会以 STP 阻止模式启动,而是会立即转发。默认配置会auto-edge导致物理链路启动和实际 L2 连接之间的显着延迟。由于 DHCP 在链接后很早就尝试过,它可能会失败并显示auto-edge.

对于 2530(?) 上的每个访问端口,运行spanning-tree <n> admin-edge-port root-guard<n>端口号/范围。root-guard防止边缘端口成为根,因此也推荐使用。

旧的 1810v1 不运行 RSTP,但稍新的 1810v2 运行 - 管理边缘设置在Switching -> Spanning Tree -> Spanning Tree Port Settings中。

当您使用它时,请确认您已将正确的交换机选为 STP 根网桥,方法是为其提供最低网桥优先级编号。将随机交换机作为根可能会导致(非常)频繁的拓扑更改,从而中断连接。