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.
# odhcploc 192.168.1.218 22:21:08 (IP)192.168.1.218 OFFER (S)192.168.1.2 ***
This show that server 192.168.1.2 offered IP 192.168.1.218. 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 192.168.1.218 22:21:15 (S)192.168.1.2 *** 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: 0.0.0.0 Your (client) IP address: 192.168.1.104 Next server IP address: 192.168.1.2 Relay agent IP address: 0.0.0.0 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 - 192.168.1.2 Option(t= 51, l= 4): IP Address Lease Time - 86400 Option(t= 1, l= 4): Subnet Mask - 255.255.255.0 Option(t= 3, l= 4): Router Option - 192.168.1.2 Option(t= 15, l= 22): Domain Name - test.example.com Option(t= 6, l= 8): Domain Name Server Option - 192.168.1.2 Option(t=255): End Option
ODHCPLoc needs POSIX like OS with ability to send UDP packets to limited broadcast address (255.255.255.255). 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.
Use make in source directory for compile odhcploc binary. Usage is described in manual page odhcploc.8.
See SourceForge.net 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 SourceForge.net 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-2023 Jan Friesse |