Complicated VLANs Setup (Seeking Guidance)

Discussions related to using VirtualBox on Windows hosts.

Complicated VLANs Setup (Seeking Guidance)

Postby Jetras » 14. Sep 2021, 21:18

I've been using VirtualBox on Windows for a while now to simulate our product, which is a stand alone network where different groups of computers interact. I have been using a single LAN in the classroom for some time, but a few years ago we started to use VLANs in the field. I am trying to convert my IP scheme to match the one deployed in the field to make training more realistic.

I have a router, but I cannot find a good Virtual Switch to assist with setting up the VLANs, I only need 3 VLANs. What is a good Virtual Switch, preferably that has an ISO image where the Switch can be a VM itself?

I also need to be able to plug the one laptop (HOST) that runs the 6-7 different VMs to be able to plug into a HUB and have 2-3 devices plug into the HUB and be able to be routed to the proper VLANs inside the Host.

Any assistance would be greatly appreciated.
Jetras
 
Posts: 18
Joined: 14. Sep 2021, 21:06
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows (2012 & 10), Linux (RHEL, Ubuntu, CentOS), FreeBSD (pfSense)

Re: Complicated VLANs Setup (Seeking Guidance)

Postby scottgus1 » 15. Sep 2021, 00:27

Jetras wrote:What is a good Virtual Switch, preferably that has an ISO image where the Switch can be a VM itself?

I've wanted one of these myself. Have tried several tutorials to make Linux act like a switch, haven't been successful. Will stay tuned...

Jetras wrote:laptop (HOST) that runs the 6-7 different VMs to be able to plug into a HUB

This part would use Virtualbox Bridged, see Virtualbox Networks: In Pictures

My suspicion is you'd need multiple wired Ethernet adapters to get traffic to go out to a hub then back. On a laptop this might involve USB adapters, which would be run by the host OS and be Bridgeable by Virtualbox. However, I have no experience with VLANs, so maybe only one ethernet wire is needed to the hub.
scottgus1
Site Moderator
 
Posts: 13346
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Complicated VLANs Setup (Seeking Guidance)

Postby Jetras » 15. Sep 2021, 02:54

To give a little more information. We use the Third Octet as the VLAN identifier. So I am trying to build 3 VLANs setup in the following configs:

VLAN10 Gateway 10.1.10.1/24
VLAN11 Gateway 10.1.11.1/24
VLAN12 Gateway 10.1.12.1/24

I need to plug a HUB into the Host NIC and be able to plug a device that goes to each VLAN into the HUB to interact with the VMs on those VLANs. I have pfSense to use as a Router just need a Switch and if the HOST Machine was on Linux I could setup OVS, but I'm stuck on Windows.
Jetras
 
Posts: 18
Joined: 14. Sep 2021, 21:06
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows (2012 & 10), Linux (RHEL, Ubuntu, CentOS), FreeBSD (pfSense)

Re: Complicated VLANs Setup (Seeking Guidance)

Postby Martin » 15. Sep 2021, 08:02

Do you need real VLANs? You could also just run the three subnets over the same network adapter without VLAN tagging.
Martin
Volunteer
 
Posts: 2517
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Complicated VLANs Setup (Solution Found)

Postby Jetras » 21. Sep 2021, 14:57

I need actual VLAN Subnets. I found a solution for all interested. It's not a Working Switch, but with VirtualBox, I configured a Router to connect to the Internal Networks that I setup as LANs.

So I used the information at https://wifi17icafe.wordpress.com/2017/ ... an-4-nics/ to enable more than the base 4 Ethernet Adapters for my Router. Then configured each Adapter to connect to a separate VLAN (Internal Network).

Each Machine was connected to its VLAN through its Ethernet Adapter in VirtualBox, so I could connect 1-2 machines to each VLAN, and then the Router would handle all routing between VLAN Networks with all the Gateways properly set. I then connected the Host NIC to same side of the Router bridging it to the Router's Ethernet Adapter. There is nothing connected to the outbound side of the Router, everything is connected to the Ethernet Adapters on the LAN side. I don't need the Firewall, since we are Air Gapped, so I turned it off in pfSense. I can connect a HUB to the Host NIC and connect Cameras and other Devices to interact with my VMs.

All my VMs use the proper subnets and can communicate across the LANs through the "Switch" to each other now.
Jetras
 
Posts: 18
Joined: 14. Sep 2021, 21:06
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows (2012 & 10), Linux (RHEL, Ubuntu, CentOS), FreeBSD (pfSense)


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot] and 48 guests