5

NAT works fine and I have internet connection, but bridged connection not working. I have tried quiet a few things, including resetting MAC address for bridged adapter:

enter image description here

when I do ifconfig it does not show eth0

enter image description here

But when I look in interfaces eth0 is in there as shown below:

enter image description here

It was working before so I don't know what could be the issue. I also noticed when I restart VM it stalls for a while saying configuring network settings or something along those lines but I am guessing it never receives the settings.

Eddie Martinez
  • 283
  • 2
  • 6
  • 13

1 Answers1

16

The bridge adapter has nothing to with this. Your VM simply has not started your ethernet interface. You should try manually:

   sudo ip link set dev eth0 up
   sudo dhclient -v eth0
   ping -c1 8.8.4.4

The -v option might have to be removed, depending on your distro. Also, just to be on the safe side, allow the promiscuous mode for VMs only.

MariusMatutiae
  • 46,990
  • 12
  • 80
  • 129
  • 1
    would you mind explaining what each of the above commands does? In my case I have `enp0s3` instead of `eth0`. The first command `sudo ip link set dev enp0s3 up` works. However `sudo dhclient -v enp0s3` goes into a inifinite loop saying something like `DHCPDISCOVER on enp0s3 to 255.255.255.255 port 67 interval 11 (xid=0x5bd18616)` for ever.. – alpha_989 Mar 25 '18 at 16:09
  • 1
    @alpha_989 The second command asks for the an IP address to the local DHCP server. If it loops forever, then it means that either there is no DHCP on the LAN, or that there is no network connection whatsoever. If you are sure that **there is** a DHCP server on your LAN, then it means you have not correctly configured VirtualBox´s interfaces. – MariusMatutiae Mar 26 '18 at 09:09
  • thanks it works. why it just work with dhcp mode ?. i try with no success when trying static ip mode. – Brain90 Feb 01 '19 at 12:54
  • @Brain90 It should work with a static IP as well. But first and foremost, it seems to me your ethernet interface is down, which means it needs to be brought up. If it is down initially, then it means your Network-manager is misconfigured. In order to diagnose that, though, it i sbest to ask a different question, since this really differs from the OP. – MariusMatutiae Feb 01 '19 at 16:13
  • Also use ipconfig -a to see what adapter available – gotozero Nov 02 '21 at 03:32