Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: What is event ID for dhcp-client IP lease? (Or ia there a better way?)

09 Jul 2013   #1
bertilak

Windows 7 64bit
 
 
What is event ID for dhcp-client IP lease? (Or ia there a better way?)

Hi,

I need to do a net use when an IP is assigned via DHCP. The only way that I can find to do this is to schedule a task based on a logged event. To do this I need to specify
  • the log (I picked "Microsoft Windows DHCP Events/Admin")
  • the source (I picked Dhcp-Client)
  • the event ID (this is what I can't figure out)
I looked at the logs with the Event Viewer and found a bunch of dhcp-client log entries but none of them were "successful IP lease" or words to that effect.

I get tons of these: (50067) Dhcp has received network hint 146514C4F4E4 for the Network Card with the network address 0x4025C2636874

and, while meeeing with the router) a few of these: (1001) Your computer was not assigned an address from the network (by the DHCP Server) for the Network Card with network address 0x4025C2636875. The following error occurred: 0x79. Your computer will continue to try and obtain an address on its own from the network address (DHCP) server.

but I never saw something indicating a successful lease and I know there was one or I couldn't be posting this question!

OR IS THERE A BETTER WAY to schedule a task when an IP is assigned?


My System SpecsSystem Spec
.

10 Jul 2013   #2
AdiGri

Windows 7 Home Premium 64-bit SP1
 
 

There is event id 50058 from DHCP that says Your computer was successfully assigned an address from the network... I have to say that I've never seen it in a log. Do you need to know when a new IP is assigned? Or simply when it gets TCP/IP connectivity?
My System SpecsSystem Spec
10 Jul 2013   #3
bertilak

Windows 7 64bit
 
 

Quote   Quote: Originally Posted by AdiGri View Post
There is event id 50058 from DHCP that says Your computer was successfully assigned an address from the network... I have to say that I've never seen it in a log. Do you need to know when a new IP is assigned? Or simply when it gets TCP/IP connectivity?
What I really want is a way to know when a net use to a folder my router is sharing will be successful. Right now my task that does the net use is scheduled to run at system start-up and that seems to be working.

EDIT: Actually what I have is working better than I thought. I was afraid that the net use would not persist across a router outage but it seems that is not a problem. I pulled the plug on the router for a minute and once it came up the mapped drive was still working. I guess I don't need to look for a more robust approach after all.
My System SpecsSystem Spec
.


10 Jul 2013   #4
AdiGri

Windows 7 Home Premium 64-bit SP1
 
 

So basically, you need to know when you get network connectivity. In this thread, a user identified the events related to a network connection by disconnecting the network, connecting it back and then checking the event log. However, you can make "net use" to map a drive permanently (with the /P:Yes switch) so there is no need to re-run at startup and it should re-connect when a network is disconnected.
My System SpecsSystem Spec
10 Jul 2013   #5
bertilak

Windows 7 64bit
 
 

AdiGri, Thanks. That looks like it addresses my situation perfectly!
My System SpecsSystem Spec
Reply

 What is event ID for dhcp-client IP lease? (Or ia there a better way?)




Thread Tools





Similar help and support threads
Thread Forum
How to find out DHCP lease time remaining ?
Hello, I'm on ADSL, and the provider automatically renews the IP every 4 days. Under Win XP, I simply had to click on the network icon in taskbar (lower right corner) and the window showed me since how long I had been connected (and thus if there was a risk of getting disconnected soon or...
Network & Sharing
Event 1001 Dhcp client
I've just connected a new PC to my ADSL modem and I get the above error in the event log. Also stating "Your computer was not assigned an address from the network (by the DHCP Server) for the Network Card with network address 0x00etc..... The following error occurred: 0x79. Your computer will...
Network & Sharing
Event Log Event 1001: DHCP Client
Hi there. I've spent a good 10 hrs searching for a fix to my problem - including SevenForums - with no success... I just purchased a Clevo P170HM with i7-2920XM processor and GTX 485 graphics card. It's an awesome system. I went into event log, and after noticing a few critical and error...
Network & Sharing
Event ID 1001 DHCP Client Lease Validity
Probably this error is pretty much a non-issue and I haven't a clue if the affected W7P machine, even runs Windows Server 2008 R2 (or any windows server for that matter). Is this 'server' thing, software that is by default installed (and I'm guessing it's only used when the machine networks with...
Network & Sharing
Dhcp-Client
Log Name: Microsoft-Windows-Dhcp-Client/Admin Source: Microsoft-Windows-Dhcp-Client Date: 09/08/2010 00:19:26 Event ID: 1003 Task Category: Address Configuration State Event Level: Warning Keywords: User: LOCAL SERVICE Computer: ...
Network & Sharing
Unable to get IP. No DHCP client
Reference this thread: http://www.sevenforums.com/network-sharing/27738-amazing-network-problem-3.html Router: D-Link d-524 V4000 Ethernet: Nforce via mobo Gigabyte GM-A570SLIv2 I am having similar problems as with the linked thread. What happened with me was I needed to download...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App