PC is getting wrong IP address despite DHCP

13,885

Log on to your router and try to delete the DHCP lease for this machine, then run ipconfig /release followed by ipconfig /renew in a command prompt.

If that fails, try uninstalling the driver for the NIC and reboot the PC. The driver should be reinstalled automatically. If not, reinstall the latest version and try again.

If that fails install Wireshark and start a capture and re-run the ipconfig commands again. Filter the results with bootp and post them here.

Share:
13,885

Related videos on Youtube

F.P
Author by

F.P

Updated on September 18, 2022

Comments

  • F.P
    F.P over 1 year

    From one day to the other (maybe a windows update was in between, not sure), my PC is currently always (self assigning?) getting an IP address configured like this:

    Automatically configured IPv4-Address: 169.254.168.179
    IPv4-Subnet Mask: 255.255.0.0
    IPv4-Standard Gateway: 
    IPv4-DHCP-Server: 192.168.1.1
    IPv4-DNS-Server: 192.168.1.1
    

    I'm running Windows 7 Home (x64). The router is a Linksys WRT 1900AC, DHCP is configured on it for addresses from 192.168.1.100 to .199.

    At most, there are maybe 10 devices connected at any time. Lease time is 1440 minutes.

    DHCP Client Service is running.

    All other devices on the same network (WLAN or LAN) get their "normal" DHCP addresses (192.168.1.X). Only my PC doesn't get one.

    When I manually configure it to use a correct address (along with the correct subnet mask), the connections works fine as always.

    What could cause this? I already restarted the PC and the router several times.

    How can I make this work as it was supposed to be?

    • Admin
      Admin over 7 years
      The fact you are getting a 169.254 address indicates your comptuer can't access the DHCP server. 169.254.168.179 is not a valid public ip address. So I am not sure the reason you claim you are getting a "real" ip address.
    • Admin
      Admin over 7 years
      Sorry, that was just bad naming... I meant an IP that (to me) comes out of nowhere... I'll rephrase
    • Admin
      Admin over 7 years
      We'll need more info: Which OS are you using? Is the DHCP client service running on the computer? What's the number of IP addresses the DHCP server is configured to hand out (has it exhausted it's address pool)? If you manually request a new address from the DHCP server, do you get any error messages?
    • Admin
      Admin over 7 years
      @Ƭᴇcʜιᴇ007 I edited in some of the information. I don't exactly know how to manually request a new one...?
    • Admin
      Admin over 7 years
      Open up a command prompt "As Administrator", and then run ipconfig /renew, that will cause it to go out and attempt to get a new address form DHCP.
    • Admin
      Admin over 7 years
      The 169.254.x.x range of IP addresses is reserved by Microsoft for private network addressing. Long story short, windows has assigned this because it cannot find a DHCP server within the network subnet. Here's a set of steps you can try to see if it solves the problem. 1. run CMD as administrator 2. at the prompt type: net localgroup Administrators /add networkservice1 3. press enter then type: net localgroup Administrators /add localservice 4. press enter then type: exit 5. press enter and restart your computer
    • Admin
      Admin over 7 years
      To rectify a common mistake for 169.254 addresses. Even if a DHCP server is in the network and it can be accessed, if the DHCP server pool is full and is not handing out any ip addresses a 169.254 address is also found on the client. So saying the DHCP server could not be reached is technically incorrect. The correct term is: There was no DHCP server who handed out an ip address.
    • Admin
      Admin over 7 years
      I suggest using LEDE instead of the default firmware that comes on the WRT1900AC. This should solve your problem.
  • Jens Ehrich
    Jens Ehrich over 7 years
    Downvoter care to comment so I can improve my answer?
  • Jens Ehrich
    Jens Ehrich over 7 years
    @Ramhound. Harsh. But duly noted, and edited.
  • F.P
    F.P over 7 years
    release and renew seems to have fixed it. Is there any chance of finding out why this happened? It worked in the night before and the next morning it didn't. I find that very weird.
  • Jens Ehrich
    Jens Ehrich over 7 years
    You can check the router's logs, the Windows Event Log or try capturing the traffic with Wireshark next time it happens. Glad it's working.