Results 1 to 8 of 8

Thread: Is there a way to query a DHCP server to get a list of MAC addresses?

  1. #1
    mike_z@excite.com Guest

    Is there a way to query a DHCP server to get a list of MAC addresses?

    Q: Is there a way to query a DHCP server to get a list of MAC addresses?

    I would like to do this so that I can wake everyone up when I want to do
    WSUS updates weekly. I can manually create/update the list of MAC
    addresses but that is quite time consuming as you can imagine. Since they
    are listed in DHCP, it should be a simple process to grab a hold of them
    with a script.

    Thanks
    --
    Mike

  2. #2
    /\\/\\o\\/\\/ Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    mike_z@excite.com wrote:
    > Q: Is there a way to query a DHCP server to get a list of MAC addresses?
    >
    > I would like to do this so that I can wake everyone up when I want to do
    > WSUS updates weekly. I can manually create/update the list of MAC
    > addresses but that is quite time consuming as you can imagine. Since they
    > are listed in DHCP, it should be a simple process to grab a hold of them
    > with a script.
    >
    > Thanks


    you might take a look at DHCPObj.dll
    from the Windows 2000 RK.

    if you need an example I have one at work (2morrow)

    gr /\/\o\/\/

  3. #3
    /\\/\\o\\/\\/ Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    on W2K3 you can consider using Netsh

    netsh dhcp server export

    gr /\/\o\/\/

    /\/\o\/\/ wrote:
    > mike_z@excite.com wrote:
    >> Q: Is there a way to query a DHCP server to get a list of MAC addresses?
    >>
    >> I would like to do this so that I can wake everyone up when I want to do
    >> WSUS updates weekly. I can manually create/update the list of MAC
    >> addresses but that is quite time consuming as you can imagine. Since
    >> they
    >> are listed in DHCP, it should be a simple process to grab a hold of them
    >> with a script.
    >>
    >> Thanks

    >
    > you might take a look at DHCPObj.dll
    > from the Windows 2000 RK.
    >
    > if you need an example I have one at work (2morrow)
    >
    > gr /\/\o\/\/


  4. #4
    mike_z@excite.com Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    /\/\o\/\/ wrote:

    > on W2K3 you can consider using Netsh
    >
    > netsh dhcp server export
    >
    > gr /\/\o\/\/
    >
    > /\/\o\/\/ wrote:
    >> mike_z@excite.com wrote:
    >>> Q: Is there a way to query a DHCP server to get a list of MAC addresses?
    >>>
    >>> I would like to do this so that I can wake everyone up when I want to do
    >>> WSUS updates weekly. I can manually create/update the list of MAC
    >>> addresses but that is quite time consuming as you can imagine. Since
    >>> they
    >>> are listed in DHCP, it should be a simple process to grab a hold of them
    >>> with a script.
    >>>
    >>> Thanks

    >>
    >> you might take a look at DHCPObj.dll
    >> from the Windows 2000 RK.
    >>
    >> if you need an example I have one at work (2morrow)
    >>
    >> gr /\/\o\/\/


    hmm, I used

    netsh dhcp server export c:\me.txt all

    and it wrote some kind of binary code (not ASCII text) to the file. I
    looked at the help to get the syntax correct but it says nothing about
    plain text or anything like that. This looks like it would do what I need
    it to do though.


    --
    Mike

  5. #5
    mike_z@excite.com Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    /\/\o\/\/ wrote:

    > on W2K3 you can consider using Netsh
    >
    > netsh dhcp server export
    >
    > gr /\/\o\/\/
    >
    > /\/\o\/\/ wrote:
    >> mike_z@excite.com wrote:
    >>> Q: Is there a way to query a DHCP server to get a list of MAC addresses?
    >>>
    >>> I would like to do this so that I can wake everyone up when I want to do
    >>> WSUS updates weekly. I can manually create/update the list of MAC
    >>> addresses but that is quite time consuming as you can imagine. Since
    >>> they
    >>> are listed in DHCP, it should be a simple process to grab a hold of them
    >>> with a script.
    >>>
    >>> Thanks

    >>
    >> you might take a look at DHCPObj.dll
    >> from the Windows 2000 RK.
    >>
    >> if you need an example I have one at work (2morrow)
    >>
    >> gr /\/\o\/\/


    Correction to my last post:

    If I use the following command:

    netsh dhcp server dump all >mac.txt

    I get this: (which looks like everything but what I need)




    # ==============================================================
    # Configuration Information for Server 172.20.60.11
    # ==============================================================



    # =====================================
    # Add Classes
    # =====================================

    Dhcp Server 172.20.60.11 Add Class "Default Routing and Remote Access Class"
    "User class for remote access clients" 525241532e4d6963726f736f6674 0 b
    Dhcp Server 172.20.60.11 Add Class "Default BOOTP Class" "User class for
    BOOTP Clients" 424f4f54502e4d6963726f736f6674 0 b
    Dhcp Server 172.20.60.11 Add Class "Microsoft Windows 2ae0 Options"
    "Microsoft vendor-specific options for Windows 2ae0 Clients"
    4d53465420352e30 1 b
    Dhcp Server 172.20.60.11 Add Class "Microsoft Windows 98 Options" "Microsoft
    vendor-specific options for Windows 98 Clients" 4d534654203938 1 b
    Dhcp Server 172.20.60.11 Add Class "Microsoft Options" "Microsoft
    vendor-specific options applicable to Windows 98 and Windows 2ae0 Clients"
    4d534654 1 b

    # =====================================
    # Add Classes End
    # =====================================


    # =====================================
    # Add Optiondef
    # =====================================


    Dhcp Server 172.20.60.11 Add Optiondef 249 "Classless Static Routes" BINARY
    0 comment="Destination, mask and router IP addresses in priority order"
    Dhcp Server 172.20.60.11 Add Optiondef 1 "Subnet Mask" IPADDRESS 0
    comment="Subnet mask in network byte order" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 2 "Time Offset" DWORD 0 comment="UCT
    offset in seconds" 0
    Dhcp Server 172.20.60.11 Add Optiondef 3 "Router" IPADDRESS 1 comment="Array
    of router addresses ordered by preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 4 "Time Server" IPADDRESS 1
    comment="Array of time server addresses, by preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 5 "Name Servers" IPADDRESS 1
    comment="Array of name servers [IEN 116], by preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 6 "DNS Servers" IPADDRESS 1
    comment="Array of DNS servers, by preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 7 "Log Servers" IPADDRESS 1
    comment="Array of MIT_LCS UDP log servers on subnet" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 8 "Cookie Servers" IPADDRESS 1
    comment="Array of cookie servers, RFC 865" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 9 "LPR Servers" IPADDRESS 1
    comment="Array of RFC 1179 servers, by preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 10 "Impress Servers" IPADDRESS 1
    comment="Array of Imagen Impress Servers" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 11 "Resource Location Servers"
    IPADDRESS 1 comment="Array of RFC 887 ResLoc Servers on subnet, by
    preference" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 12 "Host Name" STRING 0 comment="Host
    name for client, RFC 1035 character set" ""
    Dhcp Server 172.20.60.11 Add Optiondef 13 "Boot File Size" WORD 0
    comment="Size of boot image file in 512-octet blocks" 0
    Dhcp Server 172.20.60.11 Add Optiondef 14 "Merit Dump File" STRING 0
    comment="Path name for crash dump file" ""
    Dhcp Server 172.20.60.11 Add Optiondef 15 "DNS Domain Name" STRING 0
    comment="DNS Domain name for client resolutions" ""
    Dhcp Server 172.20.60.11 Add Optiondef 16 "Swap Server" IPADDRESS 0
    comment="Address of client's swap server" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 17 "Root Path" STRING 0 comment="Path
    name for client's root disk, char set NVT ASCII" ""
    Dhcp Server 172.20.60.11 Add Optiondef 18 "Extensions Path" STRING 0
    comment="tftp file for option extensions" ""
    Dhcp Server 172.20.60.11 Add Optiondef 19 "IP Layer Forwarding" BYTE 0
    comment="Disable/enable IP packet forwarding on this client" 0
    Dhcp Server 172.20.60.11 Add Optiondef 20 "Nonlocal Source Routing" BYTE 0
    comment="Disable/enable nonlocal datagrams" 0
    Dhcp Server 172.20.60.11 Add Optiondef 21 "Policy Filter Masks" IPADDRESS 1
    comment="Destination/mask IP address pairs to filter source routes" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 22 "Max DG Reassembly Size" WORD 0
    comment="Maximum size datagram for reassembly by client; max 576" 0
    Dhcp Server 172.20.60.11 Add Optiondef 23 "Default IP Time-to-live" BYTE 0
    comment="Default TTL for client's use on outgoing DGs" 0
    Dhcp Server 172.20.60.11 Add Optiondef 24 "Path MTU Aging Timeout" DWORD 0
    comment="Timeout in seconds for aging Path MTU values; RFC 1191" 0
    Dhcp Server 172.20.60.11 Add Optiondef 25 "Path MTU Plateau Table" WORD 1
    comment="MTU discovery sizes, sorted by size, all >= 68" 0
    Dhcp Server 172.20.60.11 Add Optiondef 26 "MTU Option" WORD 0 comment="MTU
    discovery size, >= 68" 0
    Dhcp Server 172.20.60.11 Add Optiondef 27 "All subnets are local" BYTE 0
    comment="The client assumes that all subnets are local" 0
    Dhcp Server 172.20.60.11 Add Optiondef 28 "Broadcast Address" IPADDRESS 0
    comment="Broadcast address" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 29 "Perform Mask Discovery" BYTE 0
    comment="The client should use ICMP for subnet mask discovery." 0
    Dhcp Server 172.20.60.11 Add Optiondef 30 "Mask Supplier Option" BYTE 0
    comment="The client should respond to subnet mask requests via ICMP." 0
    Dhcp Server 172.20.60.11 Add Optiondef 31 "Perform Router Discovery" BYTE 0
    comment="The client should solicit routers using RFC 1256." 0
    Dhcp Server 172.20.60.11 Add Optiondef 32 "Router Solicitation Address"
    IPADDRESS 0 comment="Address to use for router solicitation" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 33 "Static Route Option" IPADDRESS 1
    comment="Destination/router address pairs, in priority order" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 34 "Trailer Encapsulation" BYTE 0
    comment="The client should negotiate use of trailers (RFC 983)." 0
    Dhcp Server 172.20.60.11 Add Optiondef 35 "ARP Cache Timeout" DWORD 0
    comment="Timeout in seconds for ARP cache entries" 0
    Dhcp Server 172.20.60.11 Add Optiondef 36 "Ethernet Encapsulation" BYTE 0
    comment="0=>client should use ENet V2; 1=> IEEE 802.3" 0
    Dhcp Server 172.20.60.11 Add Optiondef 37 "TCP Default Time-to-live" BYTE 0
    comment="TTL that client uses when sending TCP segments" 0
    Dhcp Server 172.20.60.11 Add Optiondef 38 "Keepalive Interval" DWORD 0
    comment="Keepalive timeout in seconds" 0
    Dhcp Server 172.20.60.11 Add Optiondef 39 "Keepalive Garbage" BYTE 0
    comment="Send garbage octet" 0
    Dhcp Server 172.20.60.11 Add Optiondef 40 "NIS Domain Name" STRING 0
    comment="Name of Network Information Service domain" ""
    Dhcp Server 172.20.60.11 Add Optiondef 41 "NIS Servers" IPADDRESS 1
    comment="Addresses of NIS servers on client's subnet" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 42 "NTP Servers" IPADDRESS 1
    comment="Addresses of Network Time Protocol servers" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 43 "Vendor Specific Info" BINARY 0
    comment="Embedded vendor-specific options" ae
    Dhcp Server 172.20.60.11 Add Optiondef 44 "WINS/NBNS Servers" IPADDRESS 1
    comment="NBNS Address(es) in priority order" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 45 "NetBIOS over TCP/IP NBDD"
    IPADDRESS 1 comment="NetBIOS over TCP/IP NBDD address(es) in priority
    order" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 46 "WINS/NBT Node Type" BYTE 0
    comment="0x1 = B-node, 0x2 = P-node, 0x4 = M-node, 0x8 = H-node" 0
    Dhcp Server 172.20.60.11 Add Optiondef 47 "NetBIOS Scope ID" STRING 0
    comment="NetBIOS over TCP/IP Scope ID" ""
    Dhcp Server 172.20.60.11 Add Optiondef 48 "X Window System Font" IPADDRESS 1
    comment="Array of X Windows font servers" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 49 "X Window System Display"
    IPADDRESS 1 comment="Array of X Windows Display Mgr servers" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 51 "Lease" DWORD 0 comment="Client IP
    address lease time in seconds" 0
    Dhcp Server 172.20.60.11 Add Optiondef 58 "Renewal (T1) Time Value" DWORD 0
    comment="Time between addr assignment to RENEWING state" 0
    Dhcp Server 172.20.60.11 Add Optiondef 59 "Rebinding (T2) Time Value" DWORD
    0 comment="Time from addr assignment to REBINDING state" 0
    Dhcp Server 172.20.60.11 Add Optiondef 64 "NIS+ Domain Name" STRING 0
    comment="The name of the client's NIS+ domain." ""
    Dhcp Server 172.20.60.11 Add Optiondef 65 "NIS+ Servers" IPADDRESS 1
    comment="A list of IP addresses indicating NIS+ servers" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 66 "Boot Server Host Name" STRING 0
    comment="TFTP boot server host name" ""
    Dhcp Server 172.20.60.11 Add Optiondef 67 "Bootfile Name" STRING 0
    comment="Bootfile Name" ""
    Dhcp Server 172.20.60.11 Add Optiondef 68 "Mobile IP Home Agents" IPADDRESS
    1 comment="Mobile IP home agents in priority order" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 69 "Simple Mail Transport Protocol
    (SMTP) Servers" IPADDRESS 1 comment="List of SMTP servers available to the
    client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 70 "Post Office Protocol (POP3)
    Servers" IPADDRESS 1 comment="List of POP3 servers available to the client"
    0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 71 "Network News Transport Protocol
    (NNTP) Servers" IPADDRESS 1 comment="List of NNTP servers available to the
    client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 72 "World Wide Web (WWW) Servers"
    IPADDRESS 1 comment="List of WWW servers available to the client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 73 "Finger Servers" IPADDRESS 1
    comment="List of Finger servers available to the client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 74 "Internet Relay Chat (IRC)
    Servers" IPADDRESS 1 comment="List of IRC servers available to the client"
    0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 75 "StreetTalk Servers" IPADDRESS 1
    comment="List of StreetTalk servers available to the client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 76 "StreetTalk Directory Assistance
    (STDA) Servers" IPADDRESS 1 comment="List of STDA servers available to the
    client" 0.0.0.0
    Dhcp Server 172.20.60.11 Add Optiondef 1 "Microsoft Disable Netbios Option "
    DWORD 0 vendor="Microsoft Options" comment="Option for enabling or
    disabling Netbios for Microsoft Windows 2ae0 Clients" 1
    Dhcp Server 172.20.60.11 Add Optiondef 2 "Microsoft Release DHCP Lease On
    Shutdown Option" DWORD 0 vendor="Microsoft Options" comment="Option for
    enabling or disabling Windows 2ae0 Clients to release DHCP lease on
    shutdown" 1
    Dhcp Server 172.20.60.11 Add Optiondef 3 "Microsoft Default Router Metric
    Base" DWORD 0 vendor="Microsoft Options" comment="Default Router Base
    Metrics for Microsoft Windows 2ae0 Clients" 1
    Dhcp Server 172.20.60.11 Add Optiondef 1 "Microsoft Disable Netbios Option "
    DWORD 0 vendor="Microsoft Windows 2ae0 Options" comment="Option for
    enabling or disabling Netbios for Microsoft Windows 2ae0 Clients" 1
    Dhcp Server 172.20.60.11 Add Optiondef 2 "Microsoft Release DHCP Lease On
    Shutdown Option" DWORD 0 vendor="Microsoft Windows 2ae0 Options"
    comment="Option for enabling or disabling Windows 2ae0 Clients to release
    DHCP lease on shutdown" 1
    Dhcp Server 172.20.60.11 Add Optiondef 3 "Microsoft Default Router Metric
    Base" DWORD 0 vendor="Microsoft Windows 2ae0 Options" comment="Default
    Router Base Metrics for Microsoft Windows 2ae0 Clients" 0

    # =====================================
    # Add Optiondef End
    # ====================================


    # =====================================
    # Set Optionvalue
    # =====================================

    Dhcp Server 172.20.60.11 set optionvalue 46 BYTE "8"
    Dhcp Server 172.20.60.11 set optionvalue 69 IPADDRESS "172.20.60.15"
    Dhcp Server 172.20.60.11 set optionvalue 15 STRING "net.int"
    Dhcp Server 172.20.60.11 set optionvalue 70 IPADDRESS "172.20.60.15"
    Dhcp Server 172.20.60.11 set optionvalue 6 IPADDRESS "172.20.60.12"
    "172.20.60.11"

    # =====================================
    # Set Optionvalue End
    # =====================================


    Dhcp Server 172.20.60.11 Set AuditLog "C:\WINDOWS\System32\dhcp"
    Dhcp Server 172.20.60.11 Set DatabaseBackupInterval 60
    Dhcp Server 172.20.60.11 Set DatabaseBackupPath "C
    \WINDOWS\System32\dhcp\backup"
    Dhcp Server 172.20.60.11 Set DatabaseCleanupInterval 60
    Dhcp Server 172.20.60.11 Set DatabaseLoggingFlag 1
    Dhcp Server 172.20.60.11 Set DatabaseName "dhcp.mdb"
    Dhcp Server 172.20.60.11 Set DatabasePath "C:\WINDOWS\System32\dhcp"
    Dhcp Server 172.20.60.11 Set DatabaseRestoreFlag 0
    Dhcp Server 172.20.60.11 Set DetectConflictRetry 3

    # =====================================
    # Add Scope
    # =====================================

    Dhcp Server 172.20.60.11 add scope 172.20.60.0 255.255.255.0 "Professional
    Office Building and Mahan combined Scope" ""
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set state 1

    # ======================================================================
    # Start Add Ipranges to the Scope 172.20.60.0, Server 172.20.60.11
    # ======================================================================


    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add iprange 172.20.60.71
    172.20.60.254 BOTH

    # ======================================================================
    # End Add Ipranges to the Scope 172.20.60.0, Server 172.20.60.11
    # ======================================================================


    # ======================================================================
    # Start Add Excluderanges to the Scope : 172.20.60.0, Server :
    172.20.60.11
    # ======================================================================



    # ======================================================================
    # End Add Excluderanges to the Scope : 172.20.60.0, Server :
    172.20.60.11
    # ======================================================================


    # ======================================================================
    # Start Add OptionValues to the Scope : 172.20.60.0, Server :
    172.20.60.11
    # ======================================================================


    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 51 DWORD "6912ae"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 3 IPADDRESS
    "172.20.60.1"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 15 STRING
    "net.int"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 6 IPADDRESS
    "172.20.60.11" "172.20.60.12"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 44 IPADDRESS
    "172.20.60.11"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 46 BYTE "8"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set optionvalue 51 DWORD
    user="Default BOOTP Class" "6912ae"

    # ======================================================================
    # End Add OptionValues to the Scope : 172.20.60.0, Server :
    172.20.60.11
    # ======================================================================


    # ======================================================================
    # Start Add ReservedIp to the Scope : 172.20.60.0, Server : 172.20.60.11
    # ======================================================================


    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.58
    ae3013d9d75c "MLTD9D75C.net.int" "Minolta Copier/Printer ACS/PM" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.59
    ae1185d87da0 "NPID87DA0.net.int" "HP 4250 Printer ACS/PM" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.6
    ae1143fa2a26 "Main Switch POB (Dell)" "Dell Switch" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.57
    ae01e6aafa10 "NPIAAFA10.net.int" "23ae in Nurse's office" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.44
    08ae09695792 "JENNYHP4ae0.net.int" "" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.40
    aec0b76b51a0 "APC Master Switch VM Controller" "" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.45
    ae110ab90b60 "Neurology print Server" "Neurology print Server" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.71
    ae127964f5b4 "linux.net.int" "Helpdesk IP Address" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.46
    ae1279df3bb5 "NPIDF3BB5.net.int" "Jenny's Office" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.56
    ae1321c23a09 "ASC Front Desk" "ASC Front Desk" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.55
    ae132122cb09 "NPI22CB09.net.int" "Nurses' station ASC" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.239
    ae115b89d0aa "suse1.suse1" "SUSE linux reservation" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set reservedoptionvalue
    172.20.60.239 12 STRING "Suse1"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 set reservedoptionvalue
    172.20.60.239 15 STRING "suse1"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.111
    aee01846040d "FC4-1.net.int" "Linux " "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.47
    ae110ac24e8b "NPIC24E8B.net.int" "Nursing Station" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.38
    ae9aed01f7be "TapeDrive" "MSL 5030 Tape Library" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.148
    ae0f202cd522 "WS09 " "Reservation to kill Internet access" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.92
    ae110a39ede8 "WS04" "Reservation to kill Internet access" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.93
    ae0f202cba0e "WS16" "Reservation to kill Internet access" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.89
    ae0cb5ae8021 "Cae8021.net.int" "Music on Hold" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.41
    ae0e3b011cbd "PS011CBD.net.int" "Surgery Front Desk HP4" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.238
    ae40ca11360d "front12103.net.int" "Medmaster VNC Windows 95" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.240
    ae40ca1137ef "Default.net.int" "Medmaster VNC Windows 95" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.236
    ae40ca1135fe "WORKSTAT27.net.int" "Medmaster VNC Windows 95" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.235
    ae40ca113e49 "WORKSTAT 43.net.int" "Medmaster VNC Windows 95" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.42
    ae30c1c45189 "UNKNOWN_3.net.int" "HP LJ 12ae (external Jetdirect)" "BOTH"
    Dhcp Server 172.20.60.11 Scope 172.20.60.0 Add reservedip 172.20.60.43
    ae1185fcb08a "NPIFCB08A.net.int" "Billing Office HP 4250" "BOTH"

    # ======================================================================
    # End Add ReservedIp to the Scope : 172.20.60.0, Server : 172.20.60.11
    # ======================================================================



    # =====================================
    # Add Scope End
    # =====================================


    # =====================================
    # Add Super Scope
    # =====================================


    # =====================================
    # Add Super Scope End
    # =====================================

    # =====================================
    # Add MScope
    # =====================================



    # =====================================
    # Add MScope End
    # =====================================


    # ==============================================================
    # Configuration Information for Server 172.20.60.11 Ends
    # ==============================================================




    --
    Mike

  6. #6
    Mike Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    Hello mike_z@excite.com,

    > /\/\o\/\/ wrote:
    >
    >> on W2K3 you can consider using Netsh
    >>
    >> netsh dhcp server export
    >>
    >> gr /\/\o\/\/
    >>
    >> /\/\o\/\/ wrote:
    >>
    >>> mike_z@excite.com wrote:
    >>>
    >>>> Q: Is there a way to query a DHCP server to get a list of MAC
    >>>> addresses?
    >>>>
    >>>> I would like to do this so that I can wake everyone up when I want
    >>>> to do
    >>>> WSUS updates weekly. I can manually create/update the list of MAC
    >>>> addresses but that is quite time consuming as you can imagine.
    >>>> Since
    >>>> they
    >>>> are listed in DHCP, it should be a simple process to grab a hold of
    >>>> them
    >>>> with a script.
    >>>> Thanks
    >>>>
    >>> you might take a look at DHCPObj.dll
    >>> from the Windows 2000 RK.
    >>> if you need an example I have one at work (2morrow)
    >>>
    >>> gr /\/\o\/\/
    >>>

    > Correction to my last post:
    >
    > If I use the following command:
    >
    > netsh dhcp server dump all >mac.txt
    >
    > I get this: (which looks like everything but what I need)
    >


    Does this command show you what you want?
    (Replace {dhcpservername} with the NetBIOS name of your DHCP Server - you
    can use the IP too)

    for /f "tokens=1" %a in ('netsh dhcp server \\{dhcpservername} show scope^|find
    /i "Active"') do netsh dhcp server \\{dhcpservername} scope %a show clients&netsh
    dhcp server \\{dhcpservername} scope %a show clientsv5



  7. #7
    mike_z@excite.com Guest

    Re: Is there a way to query a DHCP server to get a list of MAC addresses?

    > I get this: (which looks like everything but what I need)
    >>

    >
    > Does this command show you what you want?
    > (Replace {dhcpservername} with the NetBIOS name of your DHCP Server - you
    > can use the IP too)
    >
    > for /f "tokens=1" %a in ('netsh dhcp server \\{dhcpservername} show
    > scope^|find /i "Active"') do netsh dhcp server \\{dhcpservername} scope %a
    > show clients&netsh dhcp server \\{dhcpservername} scope %a show clientsv5


    Awesome man, thanks a bunch. That is exactly what I need.

    --
    Mike

  8. #8
    /\/\o\/\/ [MVP] Guest

    Re: Is there a way to query a DHCP server to get a list of MAC add

    glad it worked out, I could not check the syntax @ home.

    in a check at work, I noticed that I did switch to DHCPCMD from the DLL.

    for the ones with 2000 :
    this works like this.

    DHCPCMD.EXE <dhcpserver> enumclients <scope> -v

    gr /\/\o\/\/

    "mike_z@excite.com" wrote:

    > > I get this: (which looks like everything but what I need)
    > >>

    > >
    > > Does this command show you what you want?
    > > (Replace {dhcpservername} with the NetBIOS name of your DHCP Server - you
    > > can use the IP too)
    > >
    > > for /f "tokens=1" %a in ('netsh dhcp server \\{dhcpservername} show
    > > scope^|find /i "Active"') do netsh dhcp server \\{dhcpservername} scope %a
    > > show clients&netsh dhcp server \\{dhcpservername} scope %a show clientsv5

    >
    > Awesome man, thanks a bunch. That is exactly what I need.
    >
    > --
    > Mike
    >


Similar Threads

  1. How to import list of new DHCP Scopes into Windows Server
    By ProtocolX in forum Windows Server Help
    Replies: 1
    Last Post: 03-05-2011, 12:00 PM
  2. Replies: 5
    Last Post: 15-01-2011, 05:48 PM
  3. Replies: 1
    Last Post: 10-07-2009, 05:46 PM
  4. DHCP on SBS 2003 - BAD_ADDRESS in DHCP lease list
    By haritable in forum Small Business Server
    Replies: 2
    Last Post: 26-02-2008, 10:47 PM
  5. Replies: 1
    Last Post: 25-01-2007, 07:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •