Couldn't set static IP address to adapter

7,836

Solved by resetting everything related to the interfaces using :

netsh interface ip reset

When I tried to apply the solution suggested by @Nova and when I set the static IP using :

netsh interface ip set address "TestWIFI" static 192.168.137.1 255.255.255.0 196.168.137.1

I got the following error :

The object already exists.

After manually checking all the adapters one by one I couldn't find any adapter having this IP address.

But using the following command : netsh interface ip show ipaddresses

I noticed that the one of the connections (Ethernet) have that IP (Even though that it's not showing in the GUI!!). After applying the solution mentioned above and restarting my computer the hostednetwork adapter accepted the 192.168.137.1 address and now I'm having internet access through it.

Share:
7,836

Related videos on Youtube

Amer Sawan
Author by

Amer Sawan

Updated on September 18, 2022

Comments

  • Amer Sawan
    Amer Sawan over 1 year

    I'm trying to create a hotspot on my laptop using the hostednetwork and share the internet connection so I can use the internet on other devices.

    First, I've enabled the hostednetwork :

    netsh wlan set hostednetwork mode=allow ssid=MYNETWORK key=SomeStrongPassword

    Then I started the network using : netsh wlan start hostednetwork

    Now I have a WiFi connection visible on other devices, but I won't be able to connect to it as I can't obtain an IP Address.

    Then I shared the internet connection by enabling the Internet Connection Sharing

    By doing this, the hostednetwork adapter will now have a static IP address 192.168.137.1 by giving this address DHCP will be enabled on this adapter and the internet will be shared to it also other devices will be able to obtain IP address.

    The problem that the hostednetwork adapter won't take the set IP. When I check the connection information I can only see

    Autoconfiguration IPv4 Address :  169.254.x.x
    

    I tried to :

    Disable/Enable the adapter
    ipconfig /flushdns
    ipconfig /release
    ipconfig /renew
    Restart my computer
    Restart the Internet Connection Sharing (ICS) Service
    

    But it didn't work.