Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Discussions about using Linux guests in VirtualBox.
Post Reply
louisquatorze478

Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by louisquatorze478 »

I just installed a fresh Ubuntu Server 22.04.1 on VirtualBox, I set the network card as bridged. My Ubuntu server gets no IP (I insist on the fact it's the first time I have this problem with Linux VM and I already check topics about this problem).

I tried to force a request with dhclient <my adapter name> and dhclient -r. After several times, I got an IP without any particular reason (and disappear without any reason).

The problem is after started my Ubuntu Server, all my other VM in bridge can't have an IP address (this is the most crazy point).

If I want to fix this bug, I am obligated to forget my Wifi host connection (Ubuntu Desktop 22.04.1 LTS), restart VirtualBox service and relaunch my other VM without starting my Ubuntu Server (otherwise, the bug on other VM come back).

Strangely, if I connect my host to another network like my mobile phone through a mobile sharing connection, my Ubuntu Server can successfully get an IP.

I am sure it's not a DHCP lease problem with my router because I have a lot of not used IP addresses on the domestic network. To eliminate this hypothesis, I checked if I can get an IP on a VM with an other computer, and I can.

If I put the Ubuntu Server network card as NAT, I can have internet access.

I have not seen any explicit problem on syslog and kernel log on my host.

I don't know what the problem is, what should I check for a clue? Is it possible that Ubuntu Server incorporates a DHCP client, which might interfere with my actual DHCP router?

Note: I reinstalled Ubuntu Server and the problem persists, also using VM Ware.
lordavatar1234
Posts: 7
Joined: 22. Sep 2017, 20:05

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by lordavatar1234 »

Not all physical network adapters support "bridging." This is especially common with wifi network adapters.

See - viewtopic.php?f=1&t=56236
louisquatorze478

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by louisquatorze478 »

My adapter support because it works on other VM...
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by scottgus1 »

louisquatorze478 wrote:the problem persists, also using VM Ware.
If this means that the installed OS also does this freak-out on a VMware VM, then it's the OS, not Virtualbox or VMware. Something the OS is doing or has been told to do is messing up the host network. See Virtualbox Networks: In Pictures: Bridged Adapter for how Virtualbox Bridged works. Once you grasp the setup you'll understand why a VM can mess up a host network.
louisquatorze478

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by louisquatorze478 »

This is the logs of an other VM which not be able to get an IP after I started the Ubuntu Server. I repeat that this VM has already working fine and the problem appears after I start the Ubuntu Server (which has no sense):

Code: Select all

Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3766] device (eth0): Activation: starting connection 'Wired connection 1' (c8027eee-9954-3ggd-f8gd-22s5c981b615)
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3770] audit: op="connection-activate" uuid="c8027eee-9954-3ggd-f8gd-22s5c981b615" name="Wired connection 1" pid=1034 uid=1000 result="success"
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3774] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3782] manager: NetworkManager state is now CONNECTING
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3787] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3812] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.3847] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Oct  2 04:00:38 computer NetworkManager[585]: <info>  [1664697638.4765] dhcp4 (eth0): state changed no lease
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.4962] device (eth0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.4975] manager: NetworkManager state is now DISCONNECTED
Oct  2 04:01:23 computer NetworkManager[585]: <warn>  [1664697683.4978] device (eth0): Activation: failed for connection 'Wired connection 1'
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.4981] device (eth0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.5335] dhcp4 (eth0): canceled DHCP transaction
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.5336] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Oct  2 04:01:23 computer NetworkManager[585]: <info>  [1664697683.5336] dhcp4 (eth0): state changed no lease
This logs after I launch dhclient:

Code: Select all

Oct  2 04:03:18 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
Oct  2 04:03:24 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Oct  2 04:03:31 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Oct  2 04:03:31 computer dhclient[3013]: DHCPOFFER of 192.168.1.73 from 192.168.1.254
Oct  2 04:03:31 computer dhclient[3013]: DHCPREQUEST for 192.168.1.73 on eth0 to 255.255.255.255 port 67
Oct  2 04:03:40 computer dhclient[3013]: DHCPREQUEST for 192.168.1.73 on eth0 to 255.255.255.255 port 67
Oct  2 04:03:49 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
Oct  2 04:03:55 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
Oct  2 04:04:07 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
Oct  2 04:04:19 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
Oct  2 04:04:31 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Oct  2 04:04:38 computer dhclient[3013]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
Oct  2 04:04:50 computer dhclient[3013]: No DHCPOFFERS received.
Oct  2 04:04:50 computer dhclient[3013]: No working leases in persistent database - sleeping.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by mpack »

As Scott pretty much said, VirtualBox and VMWare share no code. Therefore if you have a problem that is common to both platforms then by definition neither VirtualBox nor VMWare can be the common factor. Most likely the common factor is something you are doing.
louisquatorze478

Re: Fresh Ubuntu Server gets no IP and prevent other VM to get an IP address in bridged mode

Post by louisquatorze478 »

I tested with the Ubuntu Server 20.04.5 LTS version which is only available on the alternative downloads page and it works.
I don't know why Ubuntu web site by default provides 20.04.1 LTS version... In any case, the 20.04.5 version get an IP in bridged directly during the process installation while 20.04.1 does not.
Thanks for your help.
Post Reply