Renewing an IP lease
If you're having an IP configuration problem, you can often solve it by renewing the computer's IP lease. To do that, use a /renew switch, like this:
C:\>ipconfig /renew Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.1.110 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 C:\>
When you renew an IP lease, the ipconfig command displays the new lease information.
This command won't work if you configured the computer to use a static IP address.
Releasing an IP lease
You can release an IP lease by using an ipconfig command with the / release parameter, like this:
C:\>ipconfig /release Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 0.0.0.0 Subnet Mask . . . . . . . . . . . : 0.0.0.0 Default Gateway . . . . . . . . . : C:\>
As you can see, the DNS suffix and default gateway for the computer are blank, and the IP address and subnet mask are set to 0.0.0.0.
After you release the DHCP lease, you can use an ipconfig /renew command to obtain a new DHCP lease for the computer.
Flushing the local DNS cache
You probably won't need to do this unless you're having DNS troubles. If you've been tinkering with your network's DNS configuration, you may need to flush the cache on your DNS clients so that they'll be forced to reacquire information from the DNS server. You can do that by using a /flushdns switch:
C:\>ipconfig /flushdns Windows IP Configuration Successfully flushed the DNS Resolver Cache. C:\>
Tip: Even if you don't need to do this, it's fun just to see the computer read flushed. If I worked at Microsoft, you'd be able to revert Windows Vista computers back to XP by using a /flushVista switch.
In this tutorial:
- TCP/IP Tools and Commands
- Using the arp Command
- Using the hostname Command
- Renewing an IP lease
- Using the nbtstat Command
- Using the netdiag Utility
- Using the netstat Command
- Using the nslookup Command
- Displaying DNS records
- Using the pathping Command
- Using the ping Command
- Using the route Command
- Using the tracert Command