WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Query a DHCP Server

Keywords:     query a dhcp server

Question:

Does anybody out there have a clue how to query a dhcp server out of Winbatch for an ip-address if I supply the MAC address?

We are using dhcp not with a dynamic lease, but rather in a bootp manner with static entries. That means, that every PC and printer has a fixed MAC-address to ip-address definition which is updated by scripts. Now after I updated such an address with my script , I would like to check, also within the script, if it was updated correctly in the dhcp database. Now since this address has not been used yet I can also not find an arp entry.

Answer:

Assuming that you are using an NT DHCP server, you will want to query DHCP.MDB.

There is also a resource kit utility for command-line operation of the DHCP manager, which should be able to yield the answers that you are looking for.

AFIK, the NT ResKit utilities that report on the DHCP database are the only tools that can access that file. Microsoft never published the API for "Exchange Performance Enhanced Database Engine", which is the DB engine that is used for DHCP.MDB and WINS.MDB. I've researched this for years trying to find a way to directly access these two database files so that I could do some custom reporting on them, but I've never had any success in doing so.


Article ID:   W15177
File Created: 2002:09:05:13:50:20
Last Updated: 2002:09:05:13:50:20