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

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

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

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

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

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 for2: What is event ID for dhcp-client IP lease? (Or ia there a better way?)
Thread Forum
How to find out DHCP lease time remaining ? Network & Sharing
Event 1001 Dhcp client Network & Sharing
Event Log Event 1001: DHCP Client Network & Sharing
Event ID 1001 DHCP Client Lease Validity Network & Sharing
Dhcp-Client Network & Sharing
DHCP client errors in event log Network & Sharing
Unable to get IP. No DHCP client 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 01:23 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33