How to create an IP alias on Windows

前端 未结 7 1048
时光说笑
时光说笑 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:31

    It may depend on which version of Windows you have, but here are some steps from my Windows 7 machine. You want to get to your "local adapter settings". There are probably 1000 ways to do this, but here is one.

    • Go to Control Panel -> Network and sharing center
    • Click "change adapter settings" on the left
    • Right click on your local network connection and go to properties
    • Select your TCP/IP v4 protocol and click properties
    • TCP must be set to static addressing, so set it to "Use the following address" and set up your default IP config for the network. Then click advanced.
    • Under IP Address in Advanced TCP/IP settings, click Add
    • Add extra IP addresses as needed

    enter image description here

    Another approach is to add the Microsoft Loopback adapter as a network device. This lets you set up a virtual network adapter on your machine. This can be useful for network testing from your own machine. See http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/259c7ef2-3770-4212-8fca-c58936979851/ for more info.

    0 讨论(0)
提交回复
热议问题