Can you query a DHCP server using netsh to display the IP address assigned to a MAC?




Hello,

I am working with our Windows 2003 DHCP server at work via netsh and I
am trying to optain the IP address of a client using the MAC address. I
can run the following command:

C:\Program Files\Common Files\IBM Tivoli>netsh dhcp server scope
10.40.0.0 show clients

and it prints the output

Changed the current scope context to 10.40.0.0 scope.

Type : N - NONE, D - DHCP B - BOOTP, U - UNSPECIFIED, R - RESERVATION
IP
================================================================================
==
IP Address - Subnet Mask - Unique ID - Lease Expires
-T
ype
================================================================================
==

10.40.252.1 - 255.255.0.0 - 00-18-4d-db-ba-5f -7/14/2009
9:33:31 AM -
D
10.40.252.2 - 255.255.0.0 - 00-1a-64-ae-2d-2e -7/14/2009
1:11:35 PM -
D
10.40.252.3 - 255.255.0.0 - 00-1a-64-39-04-ea -7/14/2009
9:27:18 AM -
D
10.40.252.4 - 255.255.0.0 - 00-14-5e-f4-0b-90 -7/14/2009
9:21:44 AM -
D
10.40.252.5 - 255.255.0.0 - 00-14-5e-55-8d-38 -7/14/2009
9:41:21 AM -
D
10.40.252.6 - 255.255.0.0 - 00-1a-64-39-04-e6 -7/14/2009
9:44:27 AM -
D
10.40.252.7 - 255.255.0.0 - 00-0d-60-1c-c9-d3 -7/14/2009
9:44:54 AM -
D

What I would like to do is only display the IP address for the given
Unique ID in my script which is a variable containing a MAC address. I
have successuflly put the above information into a file by using the >
C:\dhcp_dump.txt extension to my command but I do not know how to
manipulate the output to only display or dump the single IP address
assigned to the Unique ID/MAC listed above. Any suggestions?


--
djackson88
------------------------------------------------------------------------
djackson88's Profile: http://forums.techarena.in/members/112751.htm
View this thread: http://forums.techarena.in/server-scripting/1210241.htm

http://forums.techarena.in

.



Relevant Pages

  • Re: Scope wont release addresses
    ... > I have a scope on a DHCP server that servers my clients on ... Each scope is to be a different subnet, ... router must also be setup to forward DHCP Queries to the DHCP Server. ... that the client in the proper subnet receives the proper address from the ...
    (microsoft.public.win2000.networking)
  • Re: DHCP, 2Scopes on one server
    ... connected to a different LAN. ... valid scope if the original scope was disables is because: ... When a client requests a IP address from the DHCP server, ...
    (microsoft.public.win2000.networking)
  • Re: DHCP & NAP
    ... I realize NAP doesn't work on XP which was ... For testing I created a 2nd scope amd left ... My XP or any other none-NAP supported client will not ... My goal is to have one DHCP server and one scope (all ...
    (microsoft.public.windows.server.networking)
  • Re: DHCP & NAP
    ... I realize NAP doesn't work on XP which was ... For testing I created a 2nd scope amd left ... My XP or any other none-NAP supported client will not ... My goal is to have one DHCP server and one scope (all ...
    (microsoft.public.windows.server.networking)
  • Re: Understanding the DHCP Server Client conversation (very intresting subject)
    ... why not the DHCP server just sends its offer to the client that is requesting the service according to its MAC address?? ... you said the (DHCP server send the DHCP OFFER as a unicast, to the whole network) but a specified MAC address. ...
    (microsoft.public.cert.exam.mcse)

Loading