1

Our server has two NICs each on a different subnet, we want traffic to cross between the two subnets. By default if these are two base NICs then this seems to work. Problem comes when one of them is bound to a Hyper-V switch. Traffic then does not seem to pass between the two subnets.

Further description of our network:

Subnet 192.168.1/24 is ADSL, 192.168.0/24 is Internal company network

The following network map describes from ADSL router, to hyper-V host, to virtualized server.

ADSL router
192.168.1.1

Hyper-V physical Host

NIC 2
192.168.1.5
gateway: 192.168.1.1

NIC 1 / hyper-V switch
192.168.0.5
gateway: 192.168.1.5
DNS: 192.168.0.10

Virtualized server

NIC 1
192.168.0.10
gateway: 192.168.0.5
DNS: 192.168.0.10

Problem is the Hyper-V switch doesn't appear to route traffic across to the other subnet on NIC 1 as would normally happen if it were a physical network.

Any suggestions what I have got wrong here?

Zoredache
  • 130,897
  • 41
  • 276
  • 420
NickC
  • 2,373
  • 13
  • 41
  • 55
  • 4
    Hyper-V doesn't route traffic because it's not a router. A virtual switch doesn't route traffic because it's not a router, it's a layer 2 switch. This isn't any different to a physical network. If you want hosts on one network to communicate with hosts on another network you need a router. Whether it's a VM acting as a router or a physical router shouldn't make any difference. – joeqwerty Mar 11 '15 at 03:33

2 Answers2

1

Like others have said, you need a router or routing service to move traffic from one subnet to another. I would recommend you do some research on networking fundamentals before continuing.

tomstephens89
  • 1,011
  • 1
  • 12
  • 24
0

You would likely have to add routes between the two virtual network adapters on a machine that was attached to both networks. (Virtual or real). you would need to do this under Routing and Remote Access services under the Network Policy and Access Services role..

Though typically it is preferred to use networking hardware to do this... Are the switches you are using Layer 3? They generally do this type of stuff more efficiently than using a server that is hosting application services..

MikeAWood
  • 2,566
  • 1
  • 13
  • 13
  • Not good to put RRAS on a hyper-V host which should be kept as simple and minimal as possible. Microsoft are becoming a nightmare! To install "Routing", "Remote Access" role needs to be installed, to install "Remote Access Routing role" service "DirectAccess and VPN (RAS)" needs to be installed, "DirectAccess and VPN (RAS)" in turn requires Windows Internal Database and worst of all IIS to be installed. Forgot to say this is on server 2012 R2. – NickC Mar 16 '14 at 18:25
  • 1
    Generally speaking, I would never use a Windows box as a router. Like I stated above, networking hardware can do this much more efficiently. HyperV host or not, it is simply not advisable to do this unless circumstances force you to do so.. Just to clarify, network adapters don't route traffic between them even without having HyperV involved. So I am unsure what you are trying to ask here. Can you simply add both adapters to your VMs so they have access to both networks? Might be easier to multihome if that would work. Otherwise, get some network hardware to take care of this. – MikeAWood Mar 17 '14 at 03:28
  • If circmstances force you to do so - get Mikrotik CHR (Cloud Hosted Router) and install it in Hyper-V. – TomTom Jan 26 '16 at 17:53