Discussion Locked

Batch file to renew the ip from dhcp

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need a batch file that can renew my ip address from the DHCP server with administrator rights under windows 2000(i do have the user name and password of the administrator account).

And do u know if i can use this as a log on script?

thank you

5 replies

by stillatit

The command is

ipconfig /renew

to renew the lease on all adaptors. If you only want to renew one adaptor, called, for example, foo, then use

ipconfig /renew foo

You can put the command in a batch file or run it from an icon. You do not need admin rights to do it.

By the way, why do it at all? The DHCP client in your machine will automagically try a renew when the lease is 1/2 gone, and if that fails, try again more frequently until it succeeds.

Good luck.

by mackem

Why do you need to renew your ip address. It will will renew automatically as long as you log on regularly. Usually it will loose the address after a period of time, say 3 days.
If you need to keep the ip address then set up a static ip address with subnet and gateways dns etc.
hope this helps

by navjun

I need to do that b/c i have a problem with routher and internet provider.
and the way to fix it is to renew the IP address
i don't know how to write a batch file so if some one would write me one it would be nice
and i need it with admin rights
since under windows 2000 you can't renew the ip address unless u have some rights

thanks

This discussion is closed to new replies.