Windows Hyper V - Adding a second IP address to a server?

Soldato
Joined
31 May 2005
Posts
15,640
Location
Nottingham
I am using Hyper V and all working well.

It is sharing my ethernet card on the host PC and is getting its own IP address, all OK there.

What I would like to do, is add a secondary IP address to the same virtual PC?

Is this possible?

Thanks.
 
Do you mean adding another NIC to the host PC and sharing it with your VM? That will work.

However, in case you mean adding the same virtual adapter twice, I just tried that and it worked. A second IP assigned from DHCP.

Assuming you do mean the second option why would you need that?
 
Thanks.

That will make things easy.

I wish to host 2 games on the server, however both use the same default ports which obviously cannot happen.

I am a neat freak and hate adding ports to server addresses, such as game.server.com:3467

Adding a second IP means I can assign the secondary IP to the other game server and run on the same port.

If that makes sense?
 
Last edited:
Derp, one thing I forgot was that I cannot forward the same port number to 2 different internal IPs so still back to the original problem.

Any way around this?
 
If both applications use the same ports then you have no choice but to change the default port numbers on your second application.

There is nothing "neat freak" about having port numbers to denote service type. It's just convenient that by default you don't have to add numbers.

I also don't think 2 IP addresses on the same machine in the same subnet is going to work too well for you. I tried something similar on a Linux box a couple of years ago and as well as I thought it had configured, all the traffic ended up going over a particular NIC rather than sharing app X to NIC1 and app y to NIC2.

You could try using a different IP range but that will require extra config on your router if it will take it however you are still trying to separate traffic by port number which you've identified you can't do currently.

If there are 2 known sources of traffic then you could probably do it with a decent firewall and not need to change port numbers.
 
Back
Top Bottom