WiFi TCP/IP defaults to DNS: 127.0.0.1 while on DHCP

rs232

Senior Member
Joined
Nov 1, 2018
My WiFi NIC will always use 127.0.0.1 when its TCP/IP settings are on DHCP. If I change to static no issue but as you can imagine this creates some unwanted issues every time I connect with my laptop to a new WiFI network (as the address range is different)

Code:
InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Ethernet                            18 IPv4    {}
Ethernet                            18 IPv6    {}
Resetting DNS servers on interface Wi-Fi - the system will use default DNS service.
-InputObjext
Wi-Fi                                6 IPv4    {127.0.0.1}
Wi-Fi                                6 IPv6    {}

So Interface index 6

Now check this out:
Code:
PS C:\Program Files\Stubby> Set-DnsClientServerAddress -InterfaceIndex 6 -ResetServerAddresses
PS C:\Program Files\Stubby> get-dnsclientserveraddress Wi-Fi

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Wi-Fi                                6 IPv4    {127.0.0.1}
Wi-Fi                                6 IPv6    {}


PS C:\Program Files\Stubby> Set-DnsClientServerAddress -InterfaceIndex 6 -ServerAddresses ("10.10.6.1")
PS C:\Program Files\Stubby> get-dnsclientserveraddress Wi-Fi

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Wi-Fi                                6 IPv4    {10.10.6.1}
Wi-Fi                                6 IPv6    {}


PS C:\Program Files\Stubby> Set-DnsClientServerAddress -InterfaceIndex 6 -ResetServerAddresses
PS C:\Program Files\Stubby> get-dnsclientserveraddress Wi-Fi

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Wi-Fi                                6 IPv4    {127.0.0.1}
Wi-Fi                                6 IPv6    {}

You see? I can set it manually but as soon as I set DHCP it autoset itself to 127.0.0.1.
This is not a DHCP issue as my Android mobile phone works perfectly on the same network.

Has anyone an idea on how to fix this?

Thanks!!
 
The IP address 127.0.0.1 is the loopback address which is used to establish a network connection to the same device. It shouldn't be the address assigned to your WiFi card, even with DHCP enabled.

Here are several possible solutions:

1. **Flush the DNS Cache and Reset IP**
Run the command prompt as administrator and type the following commands:
```
netsh int ip reset
ipconfig /flushdns
```
Then restart your computer. These commands will reset your IP settings and flush your DNS cache.

2. **Remove and Reinstall the WiFi Adapter**
This can be done through the Device Manager. Navigate to "Network adapters", find your WiFi card, right-click on it and select "Uninstall device". After the process is complete, click on "Action" > "Scan for hardware changes". Windows should automatically reinstall the driver.

3. **Update Network Drivers**
It could be a driver issue. Try updating your WiFi card drivers, either by going to the Device Manager and right-clicking on your WiFi card and selecting "Update driver", or by manually downloading the drivers from the manufacturer's website.

4. **Disable IPv6**
It is also possible that IPv6 is causing the problem. Disable IPv6 on the WiFi adapter by going to the properties of your WiFi card in Network Connections.

5. **Check for Conflicting Software**
Some software like VPNs can alter your network configuration. If you have recently installed any new network-related software, it could be causing the issue. Try to disable or uninstall it to see if the problem persists.

6. **Malware Check**
A malware infection could be redirecting your network traffic. Run an in-depth scan with a trusted anti-malware program.

7. **Check Router Configuration**
Although you mentioned that your Android phone is working perfectly on the same network, it's still worth checking your router's DHCP settings. There's a chance that some settings are configured in a way that they conflict with your laptop.

8. **Check with a New Network Profile**
Delete your current Wi-Fi network profile and create a new one.

If none of these steps resolve the issue, you might want to consider doing a clean install of your Windows OS or seek professional technical help. Remember to back up your data before reinstalling the OS.
 
i would assume there is a delay in your Dhcp kicking in which means the local (127.0.0.1) address gets posted as a default while you wait

i lot of things can cause slow response time like checking for updates or power issues but replace the router and test if your dhcp needs authentication protocols from the isp... here in Australia thats catching a lot of networks out as Microsoft charges forwards
 
i would assume there is a delay in your Dhcp kicking in which means the local (127.0.0.1) address gets posted as a default while you wait

i lot of things can cause slow response time like checking for updates or power issues but replace the router and test if your dhcp needs authentication protocols from the isp... here in Australia thats catching a lot of networks out as Microsoft charges forwards
Ok but my point is different: 127.0.0.1 should not be the default. Default is empty and this is the case even when APIPA kicks. That said thank for the feedback but I feel like excluding a DHCP issue as all the other parameters are received perfectly (IP, subnet, gateway, wins, etc) it's just DNS1. Also it's only this device the others are working perfectly.
 
FYI I managed to fix this completely uninstalling the NIC, and installing manually the latest Intel drivers.
 
DHCP can provide a lot of configuration options including which nameservers are to be used. That is just one way it could get set to the local host address. VPNs can also do this as a means to route DNS requests through the vpn
 
Back
Top Bottom