[Solved] Hosted Network doesn't remove the initial IP when I set a new one via control panel, resulting with multiple IPs.

closee 0 Reputation points
2024-02-11T21:47:20.4333333+00:00

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: User's image
(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.

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,363 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
776 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jing Zhou 7,260 Reputation points Microsoft Vendor
    2024-03-14T02:28:15.5166667+00:00

    Hello,

     

    Thank you for posting in Q&A forum.

    According to your statement, you have tried to delete the managed network but still face the same issue.

    I just want to add more steps after you delete the managed network:

    1.Run CMD command:

    netsh wlan stop hostednetwork

    netsh wlan set hostednetwork mode=disallow

    to disable the hostednetwork

    2.Delete the virtual adapter if there's any:

    3.Reset TCP/IP Stack by CMD command:

    netsh int ip reset

    netsh winsock reset

    Then please create the new hosted network and see if it works.

    Hope this answer can help you well.

     

    Best regards,

    Jill Zhou


  2. closee 0 Reputation points
    2024-11-17T14:37:20.0066667+00:00

    I have figured a way out.

    Steps to solve the issue:

    1. Stop the hostednetwork via cmd: netsh wlan stop hostednetwork. Also disconnect from all connections except your main connection (in my case wifi).
    2. Under Control Panel → Network and Internet → Network and Sharing Center, click Change adapter settings option on the left sidebar.
    3. Double click your wifi adapter and select Properties.
    4. Switch to Sharing tab.

    By default, the first checkbox is unchecked and it can only be enabled when there are other connections to share. But surprisingly, it is possible to enable it this time, and there is no dropdown menu to choose from.

    1. Enable the first check box and click OK.
    2. Click the Close button.

    At this point, the problem is solved. You can start the hostednetwork and configure the IP via control panel. There won't be any more multiple IPv4 Addresses, and it will persist as expected.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.