Sometimes in my network I have some DHCP problem, the clients don't receive their IP. The problem seems connected with the switch because, for example, if I change the switch port of the client the dhcp starts working.

I have the same problem with wifi, when I have the problem in the port of the accesspoint, all wifi clients connected at the same accesspint cannot get a valid IP.

After few hours the problem goes away without any action. I tried to restart the DHCP server (it is the windows server 2016 service) without any success.

I checked the client network drivers but the problem happens with different network cards and different computers.

I'm using HP switches 1810/1910/2590 , do you know if there are any known function that block broadcast traffic?

  • Do you have STP enabled on the switch?
    – Ron Trunk
    May 11, 2020 at 15:08
  • Yes it is!.....
    – Tobia
    May 11, 2020 at 15:17
  • STP can prevent DHCP clients from getting an address because the port doesn't start forwarding traffic until STP goes into the forwarding state. That can be up to 30 seconds. By then the client has timed out. Cisco has a command called "portfast" to fix this. I'm sure HP has a similar command.
    – Ron Trunk
    May 11, 2020 at 15:46
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 17, 2020 at 17:31
  • Unfortunately I did not find a solution, I tried to play a bit with STP but I did not solve. Sometimes I still have think kind of problem
    – Tobia
    Dec 18, 2020 at 7:05

2 Answers 2


Spanning-tree starts all ports as "blocking" until it can confirm no loop. The process can take up to 30s. On my 2810, without any other explicit configuration, it only takes a few seconds.

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

As you can see, the switch is automatically classifying the port as an "edge". The state for Trk2 (LACP group to another switch) shows OperEdgePort: No, because it goes to a STP enabled switch. Notice the port comes up even faster because LACP completes in 100ms...

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

(ignore the 1990, it doesn't have an RTC, and all these messages happen before NTP sets the clock.)


You should put client (access) ports in admin-edge mode. That way, they don't start in STP blocked mode but will forward right away. The default config is auto-edge which causes a notable delay between physical link up and actual L2 connectivity. Since DHCP is tried very early after link up it may fail with auto-edge.

For each access port on the 2530(?), run spanning-tree <n> admin-edge-port root-guard, with <n> being the port number(s)/range. root-guard prevents an edge port from becoming root, so it's recommended as well.

The old 1810v1 doesn't run RSTP but the slightly newer 1810v2 does - the admin-edge setting is in Switching -> Spanning Tree -> Spanning Tree Port Settings.

While you're at it, do verify that you've got the right switch selected as STP root bridge by giving it the lowest bridge priority number. Having a random switch as root may cause (very) frequent topology changes that can disrupt connectivity.

  • Let's say that almost all my ports could have a dhcp client, I have to set this setting to all ports? I think it is required also for neighbour switches ports.
    – Tobia
    May 13, 2020 at 11:20
  • Only set admin-edge-port (or portfast for Cisco) on access/client ports. Inter-switch links stay up all the time and don't have the problem.
    – Zac67
    May 13, 2020 at 11:46
  • Setting inter-switch links to admin-edge causes a short-period network loop (with the corresponding broadcast storm) when a redundant link is connected. You'll want to avoid that.
    – Zac67
    May 13, 2020 at 11:52
  • I tried but it fails again, I don't think this is a problem related to the latency of STP because the wifi accesspoint port is up when the wifi client tries to connect. Do you have any other idea of what can be?
    – Tobia
    May 15, 2020 at 13:46
  • There are several other possibilities: a rogue DHCP server, L2 connectivity problems, exhausted scope, ... You need to check the switch logs, their MAC tables when DHCP fails and possibly deep analyze the exact problem (packet capture etc) - does the DHCP discovery reach the server? Does it send an offer?
    – Zac67
    May 15, 2020 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.