How should I set up multiple NICs for Hyper-V

hyper-vnicroutingwindows-server-2008-r2

I have a PowerEdge server that has 1 management NIC and 4 other NICs. I have the management NIC set up so that I can access iDRAC and it works great. Now I'd like to set up Windows 2008 R2 Hyper-V. Our network has two kinds of IP addresses. One is the 10.10.x.x kind that you can't get to from outside the network. The other is a public kind, like 128.210.x.x.

I thought I should set up one NIC with a 10.10.x.x IP address and the other with as 128.210.x.x IP address so that the Hyper-V parent partition can use the 10.10.x.x one and be relatively safe from outside attack. Then the child partitions/guest OS's running on top of Hyper-V could use the public NIC, so that people could get at them from anywhere (some of these are web servers).

When I try to set them up this way, Windows complains about having multiple default gateways. If I give both NICs public IPs then things work — that is, both parent and child partitions can get out to the internet. Could someone who knows vastly more about networking than me explain what I should be doing here? The basic idea is to have one VM running a file server, accessible on a 10.10.x.x IP or via WINS like \FILESERVER and then to have a bunch of other VMs that are separate webservers. Thanks.

Best Answer

Your problem stems from a misunderstanding about default gateways. There is only one total, not one per NIC. Setting additional default gateways is for redundancy only.

You only have one default gateway, but you still need to set route for the other interfaces for non-default situations. If you don't do this, all traffic leaving your server will attempt to go out of the interface that has the default gateway on it, since that is the only gateway. It's pretty obvious why this won't work well for you.

So, in conclusion, if you define your default gateway for the 10.x.x.x interface, you need to add static routes for the 128.210.x.x interfaces which define the next hop for traffic leaving those NICs.

Related Topic