How to create an IP alias on Windows

前端 未结 7 1056
时光说笑
时光说笑 2020-12-14 11:02

I need to create an alias for my network interface such that it can be accessed locally with either 127.0.0.1 or 33.33.33.33.

In *nix I would do this:



        
7条回答
  •  遥遥无期
    2020-12-14 11:22

    You cannot add an alias in the GUI when using DHCP to get an address. The "netsh" command, however, is helpful to achieve this:

    netsh interface ip add address "Local Area Connection" 192.168.2.2 255.255.255.0

    This has to be done as an administrator.

    Use "ipconfig" to check what the network interface is called. In my case it is "Local Area Connection".

提交回复
热议问题