I am trying to set a static IP address for a hosted network, created via command prompt.
I used to set the IP address from control panel settings with no problems.
Now, when I do the same, I get a problem. The new IP address is successfully added, not replaced. I get multiple IPs.
There are workarounds to delete the IP address, but every time I stop and start the hosted network, I get the same problem again.
I have tried:
- Removing the old IP address via command prompt.
- Setting the new IP address via command prompt.
- Disabling then enabling the IPv4 via control panel.
- Setting the same IP as static via control panel.
Nothing made a permanent difference.
Using the mobile hotspot feature isn't an alternative for me, because it is disabled when offline.
I don't have this problem with other connections.
I don't see multiple IPs in the Advanced TCP/IP settings.
Here is the ipconfig
information given in cmd:
(The IPs above aren't personal information. Please do not blur dear reviewer.)
I know that 192.168.137.1 is a bogon IP address. I have no setting for sharing any networks. I have tried enabling and disabling that too, but no change.
I have also tried deleting the registry entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WlanSvc\Parameters\HostedNetworkSettings
No change.
Windows 10, 22H2.
Note: I have firstly asked the same question in here and they have referred me here after failing to solve this problem. They asked me to remove the network adapter driver and restart. I did that and it didn't work.
Edit: I tried posting the solution in the Microsoft Answers post too, but it is locked. You can find the answer below.