Share via


Setup two IPs on the same PC with one network adapter?

Question

Thursday, February 11, 2016 6:12 PM

Hello,

A Win 10 PC needs to communicate with devices on LAN hardcoded to communicate with Netcat mod via 2 IP addresses simultaneously thus requiring 2 network interfaces. To enable that:

  • tried adding and setting up Microsoft Loopback Adapter (MLA), but can't ping the PC loopback adapter from LAN devices and communicate with it.

  • tried adding a different IP alias to the physical network adapter instead of MLA, but again can't ping the 2nd IP from LAN. May be some adapter, static routes, Registry or router config steps missing? If anyone was able to ping 2 IPs from LAN on a Win 10 PC with one network adapter without using VMs - pls share your detail config.

All replies (10)

Thursday, February 11, 2016 11:43 PM

No sure I follow what you have tried to be honest, but I have a static setup under Internet Protocol Version (TCP /IPv4), on the properties of that click Advanced. Click Add under the IP addresses top box. Adding a second address both ping ok. Have you tried that?


Friday, February 12, 2016 1:42 AM

Neither I can follow details of your setup. :) I tried to add an alias, both ping OK from the same PC, but from LAN only main adapter IP pings, but not the alias. If both IPs ping OK for you from another PC on the same LAN segment (not from different segments or routers each), can you give more details about your setup as an example:

- IP & Subnet & Gateway of the main address?

- IP & Subnet & Gateway of the alias?

- did you enable IP routing in Registry?

- did you setup Static Route in your LAN Router to the alias (example)?

- did you setup ICS on your main adapter IP?

Generally IP aliases are used to access the same network adapter from different LAN segments. In such scenario each IP will ping from its segment subnet. But when accessing both IPs from the same LAN segment, I can't ping the alias IP.


Friday, February 12, 2016 7:05 PM

So hopefully a screenshot will explain my setup. As the screenshot 192.1.168.97 is the main network with the default gateway being  the router supplied by my ISP. The 10.0.0.1 has no gateway so would broadcast to find its way on its segment. I have a 255.255.255.0 gateway on the 10 address just because I do not need anymore IP addresses than that.

No IP routing setup, so no registry no router setup no routes set on the PC. The two machines I have on the 192 only can ping .97. A PC defined with 10.0.0.2 on the same network segment can ping the 10.0.0.1

Hope that shows my test. If you are doing something different and want me to test that let me know what that is and I can try to setup a test.


Friday, February 12, 2016 11:46 PM

192.1.168.97 is the main network with the default gateway being  the router supplied by my ISP. The 10.0.0.1 has no gateway so would broadcast to find its way on its segment. ...

A PC defined with 10.0.0.2 on the same network segment can ping the 10.0.0.1

Hope that shows my test.

What's your network topology? Do you have 2 separate network segments, each having its own router, or just one segment with one modem-router? If only one segment, how a PC with 10.0.0.2 IP can ping your another PC with alias 10.0.0.1 through the gateway 192.168.1.1? Can you access the web from 10.0.0.2? What gateway is setup on that 2nd PC? Did you setup port forwarding or static route on your router?

If you want to experiment, pls assign 192.168.1.99 to your 2nd PC, 192.168.1.98 to the alias on the 1st PC, and try to ping both 192.168.1.97 and 192.168.1.98 from 192.168.1.99.


Saturday, February 13, 2016 12:27 AM

1 router, it is 192.168.1.1. No extra config on that. A modern router I guess as it is recent last 12 months and have been updated for IPv6. That is not that relevant I would say as the setup this is standard IPv4 setup. The 10.0.0.x IP have no gateway listed, so they broadcast on there 10.0.0.x subnet 255.255.255.0 to find each other. I cannot access the web from 10.0.0.x as it has no route outside 10.0.0.x. They define there own routes I can see that from a 'route print -4' from a Command Prompt (I did not set it up, IPv4 \ Windows does).

I have used this for a use on a production network to keep certain production equipment off the main network in the past.

I will try the experiment tomorrow for me as shut my test network down for now.


Saturday, February 13, 2016 7:28 PM

Yes can ping .97 primary IP on second PC and .98 second IP on second PC from first PC with .99

Did get a warning about multiple default gateways when setting .97 & .98 on the adapter, when only one gateway is listed.


Thursday, February 25, 2016 9:28 PM

Sorry for some delay. Are you able to ping both primary .97 and alias .98 IPs on a Windows PC from a Linux PC with .99 IP address on the same LAN segment? If you can do it, an I can't with Firewall switched off on both, what can be the reason?


Friday, February 26, 2016 1:54 PM

Yes.

The Linux is Mint 17.3 with static 192.168.1.99. Its a VMware VM so uses that driver and networks via the host, a laptop running VMware Workstation 12 Player on Windows 7.

The Windows 10 10586 has 192.168.1.97 static with 192.168.1.98 as a secondary. That is a Hyper-V VM so using that driver networked via the Hyper-V 2016 TP4 server its host.

No routes were setup or harmed in the making of this test.

If you try a traceroute to 192.1.168.98 what does that show?

EDIT: not sure how traceroute works on Linux as for me that fails, but the ping works, so guess it is saying local i.e. no route. Traceroute to an internet server works as expected.


Saturday, February 27, 2016 5:09 PM

Using a VMware VM might invalidate the test, even if it accesses LAN in Bridged mode with its own IP assigned by the router, since it still goes through the same host Windows PC network adapter. Would be cleaner to boot the laptop from a Linux ISO or CD distro directly and then run the test.


Saturday, February 27, 2016 5:13 PM

The Linux VM is on a separate host to the Windows 10 VM, so they connect via the router. So not sure what you mean by it invalidating the test, so what it would prove booting the laptop off a Linux boot.