Make Mac Work:

Helping Manage The Macintosh Enterprise

CreativeTechs

Identify Active DHCP Servers

Sometimes, it seems like your network must be haunted. Everything works perfectly for days then a lone workstation goes crazy, losing internet access, failing to bind to the server, or even using an IP outside your normal range. A reboot remedies the problem, until it crops up days later on a completely different machine.

The likely culprit is an unintended DHCP server. Devices like misconfigured Airports, retired routers used as desktop hubs, or even a “modded” XBox in the break room can offer erroneous network information to unsuspecting machines. It’s an unexpected problem, but a common one. Fortunately, it’s relatively easy to find out from which DHCP server your Macintosh is actively receiving configuration information.

First, you’ll need the Unix name for your active network interface. The simplest way to get this is to open System Profiler in the Utilities folder, and select “Network” from the left column. This will list each network interface in plain english as well as the “BSD Device Name” you’re looking for. You can get the same information from the command line, though the format may take a bit more to decipher, by typing:

ifconfig -u

With the Unix name of the active interface, you can use this information to determine the IP address of that interface’s DHCP server by opening the Terminal and typing:

ipconfig getoption INTERFACE server_identifier

Substitute the interface name for INTERFACE in the example above and you’ll immediately know which IP is providing a given computer its DHCP information. If it’s not coming from the address you expect (most likely your router or your OS X Server), then you’ve identified a rogue DHCP server on your network. Locate the machine physically and reconfigure it (or unplug it altogether) and the problem will disappear.