1

I have a weird issue where changing the networking mode on a Windows 7 VM in VirtualBox to bridged makes me lose my wired Ethernet connection in my Ubuntu host. The problem is, even after I change the networking mode back on the VM, restart network manager or reboot my machine, I can't see any Ethernet networks anymore. It's as if VirtualBox is messing with some network config file, but I can't figure out what.

My /etc/NetworkManager/NetworkManager.conf file, all seems well (I don't have it set to managed, but that was never an issue). And accordingly, network-manager shouldn't care about whats in /etc/network/interfaces, where I just have my loopback interface. I also restarted and rebooted network manager, but even just running dhcpcd, it can't find any interfaces, though it's listed in an output from ifconfig -a

This might just be a bug in VirtualBox, but it's pretty annoying. Any help would be greatly appreciated.

Some more outputs:

ifconfig:

enp2s0    Link encap:Ethernet  HWaddr 58:20:b1:68:ff:f4  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:43 Base address:0xe000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:61230 (61.2 KB)  TX bytes:61230 (61.2 KB)

wlp5s0    Link encap:Ethernet  HWaddr 5c:e0:c5:32:7f:85  
          inet addr:10.219.184.99  Bcast:10.219.255.255  Mask:255.255.0.0
          inet6 addr: fe80::4d41:3774:5f38:aa9e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4544 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3794 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4339663 (4.3 MB)  TX bytes:569662 (569.6 KB)

cat /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

cat /etc/network/interfaces

auto lo
iface lo inet loopback

sudo lshw -C network

 *-network               
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 15
       serial: 58:20:b1:68:ff:f4
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.041.00-NAPI duplex=half latency=0 link=no multicast=yes port=twisted pair speed=10Mbit/s
       resources: irq:43 ioport:4000(size=256) memory:c4204000-c4204fff memory:c4200000-c4203fff
  *-network
       description: Wireless interface
       product: Wireless 7265
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: 61
       serial: 5c:e0:c5:32:7f:85
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-53-generic firmware=17.352738.0 ip=10.219.184.99 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
       resources: irq:50 memory:c4000000-c4001fff
  • The most common source of issues with bridged networking is that the network doesn't like it. What kind of network are you on? If it is not managed by you, confirm with management that it's okay to use bridged mode. – fkraiem Dec 8 '16 at 16:36
  • 1
    The network's not managed by me, so you may be right in that I can't use bridged networking (although I was able to set a static IP earlier with no problems). But honestly I don't really care at this point whether bridged networking works or not, I just want my Ethernet connection to work on my Ubuntu host, but VirtualBox did some voodoo and messed everything up. And even after I closed VirtualBox and rebooted, the problem persists – user627126 Dec 8 '16 at 16:41
  • One possible reason: In a company I worked for we had network switches monitored, and as soon as there were more than one HW address seen on one user port, the port was locked. Only the network administrator could release the switch port. – ridgy Dec 8 '16 at 16:53
  • 1
    I'm in a college dorm room, and the network infrastructure here is pretty rough around the edges. But I'm confident that it is not a hardware issue. I'm running VirtualBox 5.0.24_Ubuntu r108355. And I'd like to reiterate that I have been able to use my hosts wired ethernet connection without problems in the past. As soon as I selected bridged networking in my vm though, Ubuntu showed that my ethernet connection was disconnected, and even after a reboot I didn't see any available ethernet connections – user627126 Dec 8 '16 at 17:06
  • 1
    The only problem I had with my ethernet connection before was a driver issue, which I remedied here: askubuntu.com/questions/857085/… But the issue with VirtualBox is definitely cause and effect. I enabled bridged mode, so VirtualBox did something that caused my ethernet to disconnect. I just have to figure out what – user627126 Dec 8 '16 at 17:07

Your Answer

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