DHCP, Task: Capture DHCP client-lease information logs

Task: Capture DHCP client-lease information logs in DHCP Operations Guide

Task: Capture DHCP client-lease information logs

Purpose

Using DHCP, almost any host with physical access to the network will get an IP address and other host configuration. This task captures the minimum key information to identify a client’s advertised hostname, assigned hostIP, and MAC address at the time of DHCP request, release, and renewal.

Procedure 1: Pull data from DhcpSrvLog via scriptable manual method

  1. Make sure that a secure and remotely accessible share is available to store a week’s length of logs.
  2. Mount the file share and copy the content:

 

net use \\Repository_hostname\sharename
net use \\DHCP_Server_hostname\dhcpdir
(For “dhcpdir”, Make sure that dhcpdir is either a remotely accessible share or replace this with the local directory path (the default is c:\windows\system32\dhcp)
findstr “Rlease Update Assign” \\DHCP_Server_hostname\dhcpdir\DHCPSrvLog-WED.log >> \\Repository_hostname\sharename\DHCP-Client_May2003.log
(Replace “WED” with the current day of the week and replace May 2003 to the current month and year.)
net use \\Repository_hostname\sharename /delete
net use \\DHCP_Server_hostname\dhcpdir /delete

Dependencies

None

Technology Required

Base DHCP Windows Server 2003