Open DHCP Locate


The Open DHCP Locate (ODHCPLoc) is program to locate and display active DHCP servers on subnet. Program sends standard DHCP discover messages. If it detects any unauthorized server (server not included in valid_dhcp list), it displays it in special way. It's also possible to display only unauthorized servers. Received DHCP message may be printed in short format or in full format with whole packet decoded.

Example ODHCPLoc output:

# odhcploc
22:21:08 (IP) OFFER (S) ***

This show that server offered IP Because server was not included in valid IP list, it's marked by ***.

With verbose output all options included in message are displayed.

# odhcploc -v
22:21:15 (S)         ***
Message type: 2 Boot reply
Hardware type: 1
Hardware addr len: 6
Hops: 0
Transaction ID: 0x00000000
Seconds elapsed: 0
Flags: 0x0000
Client IP address:
Your (client) IP address:
Next server IP address:
Relay agent IP address:
Client MAC address: 31:32:33:34:35:36
Server host name not given
Boot file name not given
Valid magic cookie
Option(t= 53, l=  1): DHCP Message Type - DHCP Offer
Option(t= 54, l=  4): Server Identifier -
Option(t= 51, l=  4): IP Address Lease Time - 86400
Option(t=  1, l=  4): Subnet Mask -
Option(t=  3, l=  4): Router Option -
Option(t= 15, l= 22): Domain Name -
Option(t=  6, l=  8): Domain Name Server Option -
Option(t=255): End Option

System requirements

ODHCPLoc needs POSIX like OS with ability to send UDP packets to limited broadcast address ( It was successfully tested on following platforms:

Platforms marked with * doesn't include simple mechanism to choose output network interface. Default interface is used there (usually interface with default route). This is no problem for machines with only one NIC, but may be problem for multi homed.

Building and usage

Use make in source directory for compile odhcploc binary. Usage is described in manual page odhcploc.8.


See support page.


Latest source tarball is odhcploc-20111021.tar.gz. You can also grab Linux i386 binaries (compiled on Slackware 12.0) or Cygwin i386 binaries (also includes cygwin1.dll, so it's simple unzip and ready to go). For complete list of downloads see download page.


ODHCPLoc is distributed under the ISC License.


This project is maintained by Jan Friesse <honzaf (at) users (dot) sourceforge (dot) net>.

Copyright (C) 2010-2011 Jan Friesse Get Open DHCP Locate at Fast, secure and Free Open Source software downloads