Query 2003 dhcp leases

dhcpperlvbscriptwindows-server-2003

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.

Best Answer

For a windows 2003 server query:

netsh dhcp server <type.srvIP.here> scope s.s.s.s show client | find "clientIP"
netsh dhcp server <type.srvIP.here> 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 <type.srvIP.here> show scope

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

arp -a "clientIP"
arp -a | find "MACAddress"