How to find your DHCP Server Address under Mac OS X

Here's how to find out the IP address of the DHCP Server your Mac is currently using to obtain it's IP address. ipconfig getoption en0 server_identifier You...

Here’s how to find out the IP address of the DHCP Server your Mac is currently using to obtain it’s IP address.

ipconfig getoption en0 server_identifier

You can also do more with ipconfig, things like determine the router address for an interface:

ipconfig getoption en0 router

this is sure easier than what I used to do:

netstat -nr | grep default | awk ‘{print $2}’;

this method, however, returns the system-wide default router whereas the ipconfig method returns the router for an individual interface. replace en0 for en1 if using AirPort…

Keep This Useful

Spotted something outdated or unclear?

If a step has changed, a screenshot no longer matches, or something here just does not work the way it should, get in touch and we will take a look.