On windows 10 I have a ubuntu VirtualBox running and I have two ethernet interfaces on the windows host:
- "Ethernet"
- "WLAN"
I now want to connect these two real ethernet devices on the host with two virtual interfaces on the ubuntu guest. In order to do so I define two bridge adapters on the VirtualBox configuration to connect to "Ethernet" (Adapter2) and "WLAN" (Adapter3):
Inside the VirtualBox guest I define the network configuration in the file /etc/netplan/01-network-manager-all.yaml
as follows:
# Let NetworkManager manage all devices on this system
network:
version: 2
ethernets:
enp0s8:
link-local: []
dhcp4: yes
enp0s9:
link-local: []
dhcp4: no
addresses:
- 192.168.200.100/24
gateway4: 192.168.200.220
The output of ip addr show
then shows this (incorrect/invalid) configuration:
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 08:00:27:64:6a:fb brd ff:ff:ff:ff:ff:ff
inet 192.168.200.243/24 brd 192.168.200.255 scope global dynamic enp0s8
valid_lft 43151sec preferred_lft 43151sec
3: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:ee:d0:c4 brd ff:ff:ff:ff:ff:ff
inet 192.168.200.100/24 brd 192.168.200.255 scope global enp0s9
valid_lft forever preferred_lft forever
QUESTIONS:
- How to find out which adapter on the VirtualBox setting corresponds to which interface in the ubuntu host? Does
Adapter2
correspond toenp0s8
or toenp0s9
? How to find out? - How to "fix" the setting for the interface that is connected to the windows "WLAN" adaptor so the guest ubuntu does actually connect to the windows "WLAN" adaptor and to the outside internet? Because I cannot ping 8.8.8.8, i.e. the ubuntu guest system does not seem to have outside internet connection. Also strange is that the two interfaces in the ubuntu guest are in the same subnet
192.168.200
. That does not look right and might be the problem that the ubuntu guest is unable to access the outside internet via the windows "WLAN" adaptor. How to fix this? - I might have a third ethernet adaptor that connects to cable internet
- I am not an expert in networkings. For example, I do not really know what a "gateway" means when defined for an adapter in the network settings.
- I want to apologize if I forgot something, if I have followup questions. As mentioned earlier, I am not an expert in networks. Ideally the answer will contain some general explanations on how this works.
ip addr show
. The question here is about HOW to set up a configuration of the network of a VM. These are two completely different questions in my view ...