On Mac there is this command
sudo ifconfig lo0 alias 10.10.10.10
I need the equivalent in Windows.
What would it be? What do I need to look for exactly?
You need to do this from an elevated console, since Windows does not have a sudo:
netsh interface ip add address "Local Area Connection" 10.10.10.10 255.255.255.0
"Local Area Connection" may be different for you. To find the name you'll need to run:
ipconfig
And pull the network interface's name.
netsh
is Windows specific it's not going to function the same as the alias
does in *nix. The netsh command is disabling the DHCP, so you need to tell the PC what to look for. The *nix function might not disable, which would be why that isn't needed. Another option, though not built into Windows, would be to look and see if Cygwin has support for the *nix ipconfig
. If it does, then you should be able to use the same command in Windows (after installing Cygwin).
Nov 22, 2017 at 18:47
You can do this from an elevated Command Prompt with the netsh utility:
netsh int ipv4 add address "Local Area Connection" 10.10.10.10 255.255.0.0
You need to replace "Local Area Connection"
with the name of the network adapter and 255.255.0.0
with the appropriate subnet mask. You can view the system's network adapter names by running ipconfig
.