A start job is running for wait for network to be configured. Ubuntu server 20.04
In /etc/netplan:
sudo rm -i /etc/netplan/01-netcfg.yaml
# remove unnecessary file
sudo -H gedit /etc/netplan/00-installer-config.yaml
# edit this file with these contents:
For dhcp:
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: true
optional: true
For static IP: (bridged network)
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
addresses:
- 192.168.x.xxx/24
gateway4: 192.168.x.1
nameservers:
search: [mydomain, otherdomain]
addresses: [8.8.8.8, 8.8.4.4]
optional: true
Create /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo -H gedit /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
with the following content:
network: {config: disabled}
Then:
sudo netplan generate
sudo netplan apply
reboot
Jastria Rahmat
Currently Studying: Computers & Coding Professional at: Ableton, Sound design & Electronic musics
Updated on September 18, 2022Comments
-
Jastria Rahmat over 1 year
After reading this post, I've followed this answer. But , when I edit the
/etc/netplan/01-netcfg.yaml
, it was blank. So I create that file and addoptional: true
. Aftersudo netplan apply
, It turns out to be an errorerror in network definition unknown key 'optional'
.Is the previous post answer still relevant for ubuntu 20.04? And he stated that:
Don't mask or disable the systemd service.
So, what is the best solution for this in 20.04?
edit:
result ofls /etc/netplan
00-installer-config.yaml 01-netcfg.yaml
result of
cat /etc/netplan/01-netcfg.yaml
optional: true
result of
sudo lshw -C network
as @heynnema requested and result ofcat /etc/netplan/*.yaml
-
chili555 over 3 yearsPlease edit your question to show the result of the terminal command:
ls /etc/netplan
and also:cat /etc/netplan/01-netcfg.yaml
-
Jastria Rahmat over 3 years@chili555 there you go, I've edited it.
-
Boris Hamanov over 3 yearsI order to help you, please edit your question and show me
sudo lshw -C network
andcat /etc/netplan/*.yaml
. Did your Ubuntu Server install fail during the install? -
Jastria Rahmat over 3 years@heynnema I've edited it. No. it didn't fail at all. In VBox, Using NAT is ok, but I want to use bridged adapter now to make it fixed IP.
-
chili555 over 3 yearsYou have two files: 00-installer-config.yaml and 01-netcfg.yaml. We need to consolidate them into one non-conflicting file. May we see both?
-
Jastria Rahmat over 3 years@chili555 how??
-
redcalx about 3 yearsI just got this problem too, on a fresh install of Ubuntu Server 20.04. The server has two ethernet ports, and the 'wait' is because only one of them is connected to a network, therefore the second one is waiting for DHCP to occur for up to the two minute time limit. The answer from @heynnema below sorted this for me, i.e. I just added the optional: true setting for the unused ethernet port, ran 'netplan generate' and 'netplan apply', rebooted, and the long wait is now gone.
-
-
Jastria Rahmat over 3 yearsGedit is supposed to be nano? Or vim?
-
Boris Hamanov over 3 years@JastriaRahmat Yes, you can
sudo nano filename
if you like. Gedit is just a nice GUI editor that a lot of folks use already. -
Jastria Rahmat over 3 yearsI will follow your answer asap. And see the result later. Thanks
-
Boris Hamanov over 3 years@JastriaRahmat Status please...
-
Jastria Rahmat over 3 years@haven't tried it. I am outside the town currently.
-
Boris Hamanov over 3 years@JastriaRahmat Status please...
-
Jastria Rahmat over 3 yearsit was working. thanks
-
Laryx Decidua about 3 yearsWell, it didn't work for me... no idea why. Ubuntu 20.04. In the end I went back to the old-fashioned
/etc/network/interfaces
setup and that worked. Mysterious... -
Boris Hamanov about 3 years@LaryxDecidua Please start a new question so I can help.