I often need to know whilst debugging a network connection where my computer has picked up an IP address from, so I can find the IP address of a router, or to make sure there?s not a rogue DHCP server on the network and so on. There is no way to find this in the GUI in Mac OS X, although it is available via ipconfig on the command line:
ipconfig getoption en0 server_identifier
Needless to say, I can never remember the parameters for it, so I wrote an AppleScript to automate the process. With the script, you can also get the DHCP server for multiple interfaces at once as well. Here's the code:
(*
DHCP Server Lookup © RickoKid 2008
Version 0.1
This program is free software: you can redist...