VirtualBox: ifconfig does not show my ip address

19,915

After udev-200, the naming convention of interfaces no longer follows the kernel naming convention. Hence, eth0 no longer exists and something like enp0s3 is the new naming convention. Now the name differ depending on where the ethernet card is on the board.

There is no difference between the adapter number, but there might be a difference if the Attached to is different. Make sure you are using the correct form of attachment to your Host.

virbr0 is a virtual network interface that is used to connect the Host to the Guest in a virtualized environment. You don't really have to worry about it now.

The loopback adapter looks fine.

Share:
19,915

Related videos on Youtube

barrrista
Author by

barrrista

Updated on September 18, 2022

Comments

  • barrrista
    barrrista over 1 year

    I recently installed centos7 onto virtualbox. I enabled bridged networking on adapter 1 (enp0s3) on the virtualbox manager, to bridge my wireless adapter on the host.

    When I type ifconfig on the guest (the VM), I can't see any ip address, and can't access the internet.

    ifconfig

    Later, I changed the bridged adapter to adapter 3 and then I see an ip address under enp0s3. What gives?

    Can someone explain to be the difference between choosing Adapter #'s 1,2,3, and 4? Also, is enp0s3 the adapter I should use? or the third one, virbr0 (not sure what this is)? My guess is the loopback adapter isn't right.

    • Daniel B
      Daniel B almost 8 years
      Depending on how much magic VirtualBox performs, bridging to a wireless adapter is not possible, because it’s a point-to-point connection that doesn’t expect a network on the client end.
  • xR34P3Rx
    xR34P3Rx over 9 years
    This will only work if your enp0s3 is bridged to your external network.
  • barrrista
    barrrista over 9 years
    Right now it is on VirtualBox: Adapter 2, Bridged Adapter, Wireless LAN PCI (the right one I use on my host), Deny promiscuous mode, and cable connected.
  • xR34P3Rx
    xR34P3Rx over 9 years
    Nah, just edit the IP, DNS1, GATEWAY, subnet mask. That should get you online.
  • barrrista
    barrrista over 9 years
    if adapter 1,2,3,4 does not matter, how does VirtualBox know which adapter on the VM side to bridge? e.g. enp0s3 vs. virbr0.
  • Digisec
    Digisec over 9 years
    Virbr0 will not work unless it is configured to but enp0s3 might differ if you change adapter. Forget about virbr0.