Sometimes your DHCP service is not able to pull an IP address, the reason could be that the network stack on Windows goes banana. To fix the problem, open command prompt with administrator privilege (click on Start → type in “cmd” → right click on the command prompt and choose “Run as Administrator”) and type these command:

netsh int ip reset C:\netsh.log.txt
netsh winsock reset

… then all your network configuration will be reset.

Update: The command netsh is very powerful, you can control a lot of things in Windows with it, like network interfaces, route table …

Some examples:

  • Set the LAN adapter to static IP address:

    netsh interface ip set address name="Local Area Connection" static 192.168.10.15 255.255.255.0 192.168.10.1 1

  • Set the LAN adapter to DHCP:

    netsh interface ip set address name="Local Area Connection" dhcp

  • Configure the LAN adapter’s secondary DNS:

    netsh interface ip add dns name="Local Area Connection" 8.8.8.8 index=2

———————————-

1. Left click the Start button
2. Select run
3. In the open box type: netsh int ip reset c:\resetlog.txt
c:\resetlog.txt will show what changes existed.

TIP:

If
you can ping both the loopback address (127.0.0.1) and your IP address
but you cannot ping any other IP addresses, use the Arp tool to clear
out the Address Resolution Protocol (ARP) cache. To view the cache
entries, type any one of the following commands: arp -a

arp -gTo delete the entries, type the following command: arp -d IP addressTo flush the ARP cache, type the following command: netsh interface ip delete arpcache.