Hello,
I am trying to simulate bridging two subnets. The host is running Windows 7 Professional and the two Virtual guests are running Windows XP Professional. There are three NICs installed on the computer - one for the host, the other two for the guests. The subnets on the guests are:
10.0.0.0 and 10.128.0.0 (Subnet mask 255.128.0.0)
In the network settings of both VBs I have allocated 'Bridged Adaptor' and then connected a CAT 5 ethernet cable to each NIC and plugged these into the router (D Link DSL 2640R). There is a facility in the router to configure VLAN, but I am not too sure if this is the same a bridging two subnets.
I have tried to use a router but I am not too sure what IP address to allocate to it?
Any assistance will be greatly appreciated.
Mark
Bridging two subnets
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Bridging two subnets
This is outside the scope of Virtualbox, and into networking, as you ask how to configure an external hardware, so I will not go into full details but here are the main steps :
Make your host tag VLAN 10 on NIC#1 for Guest #1 (10.0.0.0 subnet)
Make your host tag VLAN 20 on NIC#2 for Guest #2 (10.128.0.0 subnet)
Plug Host NIC#1 into Router NIC#1
Plug Host NIC#2 into Router NIC #2
Configure router :
Assign VLAN 10 on NIC#1 and assign IP from 10.0.0.0 subnet
Assign VLAN 20 on NIC#2 and assing IP from 10.128.0.0 subnet
Configure TCP/IP stack correctly on each VM & router.
Voila!
PS : This is under the assumption your hardware supports the listed operations.
Make your host tag VLAN 10 on NIC#1 for Guest #1 (10.0.0.0 subnet)
Make your host tag VLAN 20 on NIC#2 for Guest #2 (10.128.0.0 subnet)
Plug Host NIC#1 into Router NIC#1
Plug Host NIC#2 into Router NIC #2
Configure router :
Assign VLAN 10 on NIC#1 and assign IP from 10.0.0.0 subnet
Assign VLAN 20 on NIC#2 and assing IP from 10.128.0.0 subnet
Configure TCP/IP stack correctly on each VM & router.
Voila!
PS : This is under the assumption your hardware supports the listed operations.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
itbookham
- Posts: 23
- Joined: 15. Apr 2011, 21:00
- Primary OS: MS Windows XP
- VBox Version: OSE other
- Guest OSses: XP/Windows 7
Re: Bridging two subnets
Hello,
I am much obliged for your suggestion. I don't think my router has the configuration options that you specify.
Is it possible to 'virtualize' connecting the two subnets without using an external hardware device?
Many thanks,
Mark
I am much obliged for your suggestion. I don't think my router has the configuration options that you specify.
Is it possible to 'virtualize' connecting the two subnets without using an external hardware device?
Many thanks,
Mark
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Bridging two subnets
Sure, you got several choices depending on what you want to do exactly :itbookham wrote:Is it possible to 'virtualize' connecting the two subnets without using an external hardware device?
- Your host can act as a router, if you setup 2 host-only NICs and connect your VMs on them, depending on the subnet.
- Setup an extra VM and configure as router. You will then configure 2 NICs and connect each to one of the subnet.
- Reuse the VMs already setup and configure them to route the different subnets from one to another.
If you need more details, you will need to dig more into networking I am afraid.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
itbookham
- Posts: 23
- Joined: 15. Apr 2011, 21:00
- Primary OS: MS Windows XP
- VBox Version: OSE other
- Guest OSses: XP/Windows 7
Re: Bridging two subnets
Hello,
Thanks for responding.
In your scenario how many physical NICs will I need to have installed on the host machine?
Thanks,
Mark
Thanks for responding.
In your scenario how many physical NICs will I need to have installed on the host machine?
Thanks,
Mark
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Bridging two subnets
If you want to access something outside the two subnets (something physical), at most 1, but it depends if you want to do NAT (then none) or Bridged (then 1)
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Bridging two subnets
Are you sure that you understand the difference between bridging and routing? If you bridge two subnets, they must use the same IP subnet, not a different one.itbookham wrote:Hello,
I am trying to simulate bridging two subnets. The host is running Windows 7 Professional and the two Virtual guests are running Windows XP Professional. There are three NICs installed on the computer - one for the host, the other two for the guests. The subnets on the guests are:
10.0.0.0 and 10.128.0.0 (Subnet mask 255.128.0.0)
In the network settings of both VBs I have allocated 'Bridged Adaptor' and then connected a CAT 5 ethernet cable to each NIC and plugged these into the router (D Link DSL 2640R). There is a facility in the router to configure VLAN, but I am not too sure if this is the same a bridging two subnets.
I have tried to use a router but I am not too sure what IP address to allocate to it?
Any assistance will be greatly appreciated.
Mark
A bridge simply rebroadcasts the packet on the other network segment so it must be in the same subnet. A router will forward traffic which is addressed to the other network.
If you want to route between the two IP subnets, the router should be the default gateway for both subnets. If the default gateway of either subnet is some other router/gateway, you will need extra routing to get the traffic to the internal router so that it can be forwarded.
192.168.1.x dg 192.168.1.254
|
192.168.1.254 dg blank
router
192.168.2.254 dg blank
|
192.168.2.x dg 192.168.2.254
Bill