Mac slow on DHCP? Check STP.

by Volker Weber


My iMac has been slow to pull its configuration from DHCP. It just took half a minute to a minute after waking up. That was never a problem on the MacBook. I narrowed the problem down to wired connections. And then it dawned on me that the wireless connections went through a dumb switch where the wired connections went through a smart switch.

I started playing with the port settings, and when I switched off STP (spanning tree) on the iMac port, the problem went away. Switch it back on, and the delay was back.

You have a couple of options:

  1. Switch off STP completely, as pictured above.
  2. Switch off STP for the ports connecting your Macs. Workstations don't cause loops.
  3. Leave on STP and switch on Fast Link for your Mac ports. That's what I am trying now.


If option 3 does not work, I am going to option 2. I am trying to avoid option 1, since I have been burned by STP before. See:

  1. Sonos networking difficulties
  2. Be careful with STP and Sonos

SonosNet is a mesh network. It uses STP to prevent loops in the topology. If you misconfigure your smart switch, it may be forwarding all your traffic through a Sonos player.


Cisco calls this portfast.

Federico Hernandez, 2011-06-03

On a related note: I have been having trouble with my Sonos system. Various Zone players were loosing connection to each other, so I called the extremely competent (!) Sonos support. There I learned that certain switches (i.e. my D-Link DGS1008D) are causing problems as soon as there is more than one Zone player connected via wires to the local network. This is all due to STP which cannot be turned of of course :-(
The support person recommended getting e.g. a linksys switch or a Netgear (all non GS model are fine). Normally I avoid calling hotlines but this call made my day. Strange how your post, Volker, which I found interesting but irrelevant regarding my problem is all of sudden at center stage. The supporter of course new your name when I mentioned this post regarding STP issues...

Markus Dierker, 2011-06-03

Markus, Sonos is aware that I have discovered STP issues before.

Volker Weber, 2011-06-03

@Federico: not exactly. Cisco calls this "switch STP off". :-)

Portfast is a configuration, where STP is instructed to bring an interface to the forwarding mode immediately as soon as the interface comes up. If you enable it on a port Cisco IOS tells you to use it with caution because it can cause bridging loops. It is ment to save workstations the waiting time (30 to 60 seconds) STP needs to make sure there is no loop.

@Volker: according to the manual for your switch the formally correct way would be to re-enable STP and put ports connected to workstations and servers (not: other switches) into Fast Link Mode (that is what Portfast is called by Netgear). You should find Fast Link under CSP Port Configuration in Advanced STP Configuration).

Robert Dahlem, 2011-06-03

Thank you, Robert. That is exactly what I did with 1/G13 (and 1/G14).

Volker Weber, 2011-06-03

Oops. Vowe updated his entry so my comment looks a little pointless now. At least below the @Federico part. :-)

Robert Dahlem, 2011-06-03

Robert, I often update when I learn. :-) In this case I only beat you by a minute or so.

Volker Weber, 2011-06-03

It is SOP in many enterprise networks to turn off STP on edge switches by default. For good reason.

Andy Mell, 2011-06-03

Robert, what I was trying to say was that instead of turning spanning tree off, the ports should be in portfast mode or as you described nicely into fastlink mode on Netgear equipment. :-)

Federico Hernandez, 2011-06-03

@Andy: can you please explain the good reason? What about accidental loops?

Robert Dahlem, 2011-06-03

@Robert: forwarding delays on port turn up. Unnecessary STP traffic. Theres no need for it as if you connect two ports on the same switch together the traffic will just run through those two ports without affecting others. We keep more modern loop prevention protocols running on the uplink ports to the network core.

STP is useless these days, convergence time is too great for modern networks, it's from the era of 10mbit and thick wire Ethernet. Won't converge fast enough for networks carrying voice traffic (dropped calls etc)

Andy Mell, 2011-06-05

Old archive pages

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.


Paypal vowe