All,
I am trying to setup a VirtualBox VM that would be the closest to emulating a Bare Metal Router with a LAN Subnet.
Read through the OpenWrt on VirtualBox HowTo
When reading the wiki entry, it seemed the goal was to set up an x86 OpenWRT router so it would work to emulate that of an actual device with several Private-range subnets (10.0.0.0/8 or 172.16.0.0/12, or 192.168.0.0/16) ranges and a WAN interface connecting to the LAN of the host.
.
I've been using a post over at the VirtualBox forums to piece together what's being done in the HowTo, and to make a few diagrams of my own about what the different Adapter types actually mean.
I've integrated all of the relevant diagrams into a single one based on the How To.
Below are the diagrams I made from the forum post diagram, please let me know if any of them are incorrect or inconsistent.
I visualized how the network layout of the HowTo might look based on the OpenWRT posts' visual and text descriptions of the Adapter Strategies to make the integrated diagram, but I'm still confused about the intent of the HowTo.
The Adapter Strategies are in VirtualBox here in the Attached to: dropdown:
VirtualBox Adapter Strategies:
(based on this VirtualBox Forums Post)
The, HowTo, seems a little inconsistent / or maybe just confusing in the following areas:
-
In the VM Setup section, it says that the optional
eth2interface is configured in VirtualBox as a Bridged Adapter, which would place the adapter on the Host LAN, thus not passing the traffic through the OpenWRT VM from the Guests. -
It mentions setting up 3x Host-Only Adapters without mentioning the Bridged Adapter at all.
But instead I found a private vlan for a management interface, and a Bridged Aadapter, with a Host Only Adapter.
And I'm confuse about how to proceed to make this match the standard layout of an actual embeded systems router that I bought off the shelf, so I can model it in my machine and approximately make it work the same way on the production Linksys E5400 I have.
| HowTo Result | Desired Layout |
|---|---|
| So far above is what I think I have based on following the HowTo. | And above is what I think I should have to model it after the production E5400, but I don't know which VirtualBox Network config I should use to achieve this, I really don't think it's the Bridged Adapter because the point is to keep the private IPs behind the firewall of the OpenWRT router. |
So then I need to know which VirtualBox Adapter Strategy to pick instead;
It almost seems to me like it should go into a Host-Only Adapter config for vboxnet1 or something, but I'm unsure about this.
The HowTo seems a little out of wack for modeling a real router virtually, since it's adding the guests to the Physical LAN via a Bridged Adapter which isn't the case in the bare metal world. (Maybe it's the intent?)
Now in the Bare Metal world, I would also have 4 ports for four different subnets, possibly with the same interface split into virtual nics. But none the less I would still have private subnets.
And incase of a screw up, I'd have a Serial TTY going into the physical device serving as the Management mng interface, at least in the beginning.
Please help me to select the VirtualBox Adapter Strategy that would be the closest to emulating a Bare Metal Router with a LAN Subnet.
