vswitch/virtual net configuration question

wildbill001

Weaksauce
Joined
Jun 2, 2012
Messages
85
This scenario is for a home lab environment. So it does not have to be an "elegant" solution :)

I'm working with ESXi5.1 running on an AMD 8120 plugged into a Gigabyte 990FXA-UD3 mobo with 32g RAM. This board has a RealTek NIC and I have a dual-port Intel Pro 1000 plugged into one of the PCI-e slots.

What I want to end up with:

Network 1:
Let's say this is 10.0.0.0/24 (10.0.0.1 thru .254). This segment would be my "main" home network. That is, the router connected to the ISP will provide DHCP for any system or VM on this network. This would also be the network to the internet or outside world.This part is actually easy to do and I have been working this way for some time.I have created a vswitch, added one of the adapters, put my VMs on that switch and all is right with the world.​

The problems start when I want to add Network 2.
Network 2:
This will be another network, say, 172.16.239.0/24. I would like this segment to have its own DHCP server as well as its own DNS server. Any VM placed on this segment will have a 172.16.239.x IP address. (Here's where I get lost) I need systems on this segment to be able to reach out to the internet and any system on Network 1.​

I have tried creating a vswitch with no adapters, assigning 172.16.239.x to this segment. Then I created a small VM running RH with interfaces attached to both switches to act as a router. Turned on port forwarding. This sort of worked but was incredibly slow and somewhat unreliable. Then when I attempted to add DNS, it just fell on the floor and puked bits all over (i.e., it did not work).

I know I'm missing something and figure it is a "forest for the trees" kind of thing but just don't see what it is. Do I need to add another physical router, assign it the 172 net, assign an adapter to vswitch 2 and then bridge the two networks at the router level? Or am I over thinking this?

Pointers, suggestions, examples, etc. would be most welcome.

Bill W
 
You're on the right track with deploying a virtual router. I have a similar setup in my home lab.

If your 172.16.239.x network should only talk to other subnets through the virtual router, you don't need to add any adapters to it. So long as two VMs are on the same port group on the same host they can talk to each other via their virtual NICs assigned to that port group.

You'll want your virtual router to have two network interfaces, one on each subnet, then configure it just as you would a physical router and make its 172.16.239.x IP the default gateway for the servers in that subnet. I'm currently using a Windows 2012 VM with RRAS. Hell, it's even my router to the internet for the whole house and works great.
 
Well, good to know that I was on the right track. Just don't understand why throughput was so bad. I don't have the exact numbers in front of me but instead of a gigbit ethernet speed it more like a half-bit speed. The "router" system was a RH 6.4 system with two nics, one on each vswitch, 1 core and 1gb RAM. I did NOT set up a port-group. Should I have? Should I have built a "beefier" system? OH, and I used the default vmxnet3 interface(s) as opposed to the e1000 interface.

The only way I could get halfway decent throughput was to put 2 NICS on each VM which kinda defeated the whole purpose of two subnets.

So any thoughts, suggestions, anything I could have missed? Thanks in advance.

Bill W
 
Back
Top