Hi,
I'm trying to create a VLAN network like this:
DHCP ---------- CLIENT1
\ |
\---------CLIENT2
So I've added 2 adapters for each machine with Adapter1 set to Bridged Adapter and Adapter2 = Internal Network.
DHCP server is working fine, giving the IP addresses for the clients, and clients got access to the internet.
But the machine with DHCP cannot access the internet.
Used enp0s8 as interface for DHCP, and i'm not sure if i have to do anything with enp0s3.
Do you have ideas how to fix it?
Regards,
Roman
Internet access on client with DHCP running on internal network
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Internet access on client with DHCP running on internal network
Please right-click each guest in the main Virtualbox window's guest list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab. Please label which one is which.
Re: Internet access on client with DHCP running on internal network
Hi,
Only .vbox files?
Only .vbox files?
-
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: Internet access on client with DHCP running on internal network
DHCP might be working, but how is the internal network supposed to see the Internet? You are using private IP subnets. They need a NAT router somewhere to access the Internet.
The best idea is to give the guests just one NIC and run one vm as a router between the private LAN and the Internet via your physical LAN router. The router vm has one NIC in the internal network and one bridged to your physical LAN. The internal NIC is the gateway for your internal (virtual) LAN and the external NIC is set to bridged.
Internet
|
physical NAT router -> physical LAN (including host PC)
|
192.168.1.x (set to bridged - network config from physical NAT router)
virtual router
192.168.2.254 gateway blank
|
vms 192.168.2.x dg 192.168.2.254 (network config from local DHCP)
You don't even need DHCP on the internal network if you run the virtual router as a NAT router. You just need to set its private NIC manually to be the default gateway for the LAN, then set up the virtual router as a NAT router and it will do the DHCP for you.
There are plenty of router appliances you can use - pfSense works well with VirtualBox.
The best idea is to give the guests just one NIC and run one vm as a router between the private LAN and the Internet via your physical LAN router. The router vm has one NIC in the internal network and one bridged to your physical LAN. The internal NIC is the gateway for your internal (virtual) LAN and the external NIC is set to bridged.
Internet
|
physical NAT router -> physical LAN (including host PC)
|
192.168.1.x (set to bridged - network config from physical NAT router)
virtual router
192.168.2.254 gateway blank
|
vms 192.168.2.x dg 192.168.2.254 (network config from local DHCP)
You don't even need DHCP on the internal network if you run the virtual router as a NAT router. You just need to set its private NIC manually to be the default gateway for the LAN, then set up the virtual router as a NAT router and it will do the DHCP for you.
There are plenty of router appliances you can use - pfSense works well with VirtualBox.
Bill