Need help creating 2 subnets on VMs.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
theshadow1234
Posts: 4
Joined: 9. Jul 2011, 20:40
Primary OS: MS Windows 2008
VBox Version: OSE other
Guest OSses: server 2008

Need help creating 2 subnets on VMs.

Post by theshadow1234 »

Greetings. I am new here and i am trying to get help with setting up 2 VM servers on different subnets. The subnets i am trying to use is 192.168.4.0 & 192.168.5.0. My PC has 2 physical Nics and one is already configured for my Lan 192.168.1.0. My gateway is 192.168.1.1. My setup is running the latest version of virtualbox. These servers will run Server 2008 Ent.


The problem i am having is i cannot figure out what adapter i need to assign to each virtual machine and how to configure them. I tried to follow some tutorials like setting up RRAS and configuring my external adpaters to 192.168.4.1 and 192.168.5.1 with both Class C subnets and assign them as Bridged Adapters to each Virtual Machine but i can't get it to work. THe closest i get is pinging both gateways from the RRAS server but I can't ping anything behind these adapters.

This is so confusing. You guys recommend anything like a tutorial out there that shows you step by step on how to configure multiple subnets in a virtual environment?

Thanks for your help.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Need help creating 2 subnets on VMs.

Post by BillG »

What do you want to do with these networks? What machines are going to use them? If they are virtual machines you don't need to use any NICs in the host. You can run them in internal (virtual) networks.

Although this is basically a network problem rather than a VBox one, post what you trying to do and I will have a look at it. If you simply want to run two subnets with a router between them, use two internal networks and run a vm (with a NIC in each network) as a router between them.
Bill
theshadow1234
Posts: 4
Joined: 9. Jul 2011, 20:40
Primary OS: MS Windows 2008
VBox Version: OSE other
Guest OSses: server 2008

Re: Need help creating 2 subnets on VMs.

Post by theshadow1234 »

Yes you are correct. All I want is 2 Networks to talk to each other.

Here is my configuration. I changed it a bit

VM1, Windows 2K8, Internal network Adapter 10.11.1.2, 255.255.255.0, 10.11.1.1
VM2 Windows 2K8, Internal network Adapter 10.32.1.2 255.255.255.0, 10.32.1.1
VM3, Windows 2k8 (Router PC), INternal network of VM1 and Internal Network of VM2, 2 adapters, Internal Network 1 = 10.32.1.1, 255.255.255.0 Internal Network 2 = 10.11.1.1, 255.255.255.0.

All i want to do is have 2 subnets talk to each other. I went ahead and setup 2 virtual machines. One Internal Network for each adapter. And I setup the Windows Server 2008 VM with both internal networks of each virtual machine.

From Win Server Router I can ping both gateways successfully. I can ping VM1 but cannot ping from VM1 the gateway 10.11.1.1. I also cannot ping VM2. From VM2 i cannot ping 10.32.1.1 but can ping VM1 from VM2. I cannot ping anything from VM1.

Routing and Remote Access is not installed on the router Pc.

My quesion is do i need to install routing and remote access lan Routing to make make both of these networks communicate successfully or is there another way of making this work?

Thanks
For Your Help.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Need help creating 2 subnets on VMs.

Post by BillG »

You must have IP forwarding enabled on the router vm to route between the networks. It is disabled by default. The easiest way to do that in Windows Server is to configure RRAS as a LAN router.

Also note that you may have to enable ICMP echo in each server's firewall to use ping.
Bill
theshadow1234
Posts: 4
Joined: 9. Jul 2011, 20:40
Primary OS: MS Windows 2008
VBox Version: OSE other
Guest OSses: server 2008

Re: Need help creating 2 subnets on VMs.

Post by theshadow1234 »

Thanks for your reply. I got this to work with your advice. However I am not running Routing and Remote Access. I just simply configured 2 nics on the router VM as gateways to thier respective networks. A reboot was all i needed from the VM machine that couldn't communicate. I can still ping across both networks but i still can't ping the Gateway from either side.

Oh well I am happy with my setup for now. ALl i need to do now is figure out how I can get to the my external network from these to internal networks .

Thanks.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Need help creating 2 subnets on VMs.

Post by BillG »

For that you need three NICs in your router vm, one for each internal network and one linked to a NIC in the host (which has Internet access). You then run your RRAS vm as a NAT router.
Bill
Post Reply