0

I am using Windows host and ubuntu guest via Virtualbox. I have 2 network adapters configured. Both are bridged. The first one is bridged to my wifi network adapter and the second one is bridged to my usb ethernet adapter. The wifi adapter is set to dhcp, the usb network adapter is set to static ip. My problem is that in my linux guest only the wifi adapter is up after boot and the usb adapter one is not up, even though configured in interfaces. This is the ifconfig -a output:

lukasz@lukasz-vb:~$ ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.10.29  netmask 255.255.0.0  broadcast 172.21.255.255
        inet6 fe80::87e1:2aa6:bac0:b941  prefixlen 64  scopeid 0x20<link>
        inet6 2003:f0:9bcc:3500:5c07:9fa7:4423:f093  prefixlen 64  scopeid 0x0<global>
        inet6 2003:f0:9bcc:3500:d260:1f95:48fc:63af  prefixlen 64  scopeid 0x0<global>
        ether 08:00:27:6f:af:c4  txqueuelen 1000  (Ethernet)
        RX packets 33  bytes 2898 (2.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 69  bytes 10487 (10.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 08:00:27:f4:fd:65  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 50  bytes 4188 (4.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 4188 (4.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The 1st one is thorugh wifi adapter, and the second one is through usb adapter. This is ifconfig:

lukasz@lukasz-vb:~$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.10.29  netmask 255.255.0.0  broadcast 172.21.255.255
        inet6 fe80::87e1:2aa6:bac0:b941  prefixlen 64  scopeid 0x20<link>
        inet6 2003:f0:9bcc:3500:5c07:9fa7:4423:f093  prefixlen 64  scopeid 0x0<global>
        inet6 2003:f0:9bcc:3500:d260:1f95:48fc:63af  prefixlen 64  scopeid 0x0<global>
        ether 08:00:27:6f:af:c4  txqueuelen 1000  (Ethernet)
        RX packets 1801  bytes 137862 (137.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 10787 (10.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 50  bytes 4188 (4.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 4188 (4.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The second adapter is down...

I tried configuring it in etc/network/interfaces:

lukasz@lukasz-vb:~$ cat /etc/network/interfaces 
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# USB C ethrnet adapter static ip
auto enp0s8
iface enp0s8 inet static
      address 10.10.10.7
      netmask 255.0.0.0
      gateway 10.10.10.6

The 1st (wifi) interface works, even though its not even configured there, how can I configure the 2nd?

  • Have you tried ifup enp0s8? – Panki Jan 15 at 9:16
  • Yes it works if I do it manually after the boot. But how to make the interface live after boot automatically? – Bremen Jan 15 at 9:37
  • I thought Ubuntu had surrendered to systemd and now uses the dhcpd. In that case, the config-file is /etc/dhcpcd.conf instead of /etc/network/interfaces? – Ljm Dullaart Jan 15 at 19:02
  • @LjmDullaart I dont have such file in the /etc dir. – Bremen Jan 17 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.