Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I query my windows 2003 dhcp server from my windows xp in order to get the ip address if i have the mac address or otherwise.

share|improve this question
up vote 4 down vote accepted

For a windows 2003 server query:

netsh dhcp server <> scope s.s.s.s show client | find "clientIP"
netsh dhcp server <> scope s.s.s.s show client | find "MACAddress"

You'll need to know the scope (s.s.s.s) in which this client is on, to show scopes:

netsh dhcp server <> show scope

Why not just query your network switch for it though?:

arp -a "clientIP"
arp -a | find "MACAddress"
share|improve this answer
The command arp -a don't work because my network has many vlans seperated by routers. I want to search an ip address which is in an other vlans. For the netsh command, i try to create a script to do this remotely from a desktop not directly on my dhcp servers. On my xp i don't have the context dhcp in netsh. – AdrienF Aug 7 '09 at 9:55
Ah, yes. Windows XP's netsh is a bit limited, unfortunately I don't know if it's possible to extend it (might be a good SF question. At least for finding the MAC address of a windows host, you can use nbtstat -A "hostIP". – l0c0b0x Aug 7 '09 at 10:44
Thank you for the nbtstat command, it will help me a lot. The best would be to do the opposite, but I think it will be enough to make my script. – AdrienF Aug 7 '09 at 11:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.