Is a batch file the only way to release and renew an IP in one step?
ipconfig /release
ipconfig /renew
I unfortunately have to admin some Windows servers using Remote Desktop. Obviously if I type ipconfig /release, then I'll loose my connection and won't be able to ipconfig /renew. Obviously this can be done with .bat files, but I wanted to ask the pros just to see if there were any other tricks to doing it in the Windows server world.
-
Most people I think just either use static IP addresses for servers, or fixed DHCP assignments, and don't change IP addresses outside of scheduled reboots (Changing endpoints on running servers=bad). A bat file seems the simplest solution, but honestly even a straight up release should autorenew an IP address before the remote desktop session times out.
redknight : @yasth - in agreement, sounds odd to have renew the ip address of a server- it is generally not recommended.gravyface : +1 DHCP on a server is not recommended at all, but I'd go with a right-click Repair on the NIC properties in the systray; that should work too and on a remote workstation I just tried, my RDP session persisted without issue.Jakobud : I'm in the process of switching the server from a fixed address to a static DHCP lease on a new DHCP server. That's why I need to release/renew it, so it picks up its static lease from the new DHCP server.yasth : When you set it to DHCP it should auto renew? It certainly shouldn't need to release (what would it even be bound to?).From yasth -
Combine the two commands into one
ipconfig /release && ipconfig /renew
From Jason Berg -
I like the last command by Jason Berg... :)
From Tony_E -
Restart PC will do it, but the simplest is to pull the network cable, wait a few seconds then plug it back...
From dunxd
0 comments:
Post a Comment