ubuntu 24.04 I had the system working as intended with just a single eth0 ethernet interface
I enabled wifi on the system, now on boot wlan0 gets a DHCP address, while eth0 just sits idle.
user@charmander:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether dc:a6:32:d9:14:dc brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether dc:a6:32:d9:14:dd brd ff:ff:ff:ff:ff:ff
inet 192.168.0.206/24 metric 600 brd 192.168.0.255 scope global dynamic wlan0
valid_lft 86333sec preferred_lft 86333sec
inet6 fe80::dea6:32ff:fed9:14dd/64 scope link
valid_lft forever preferred_lft forever
4: br-3754d51a6ecf: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:cb:0c:5d:a5 brd ff:ff:ff:ff:ff:ff
inet 172.30.9.1/24 brd 172.30.9.255 scope global br-3754d51a6ecf
valid_lft forever preferred_lft forever
inet6 fe80::42:cbff:fe0c:5da5/64 scope link
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:33:6c:18:0a brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
7: veth90fe157@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-3754d51a6ecf state UP group default
link/ether 36:bf:25:db:db:44 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::34bf:25ff:fedb:db44/64 scope link
valid_lft forever preferred_lft forever
9: vethe6e2821@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-3754d51a6ecf state UP group default
link/ether 1a:83:61:24:ff:07 brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::1883:61ff:fe24:ff07/64 scope link
valid_lft forever preferred_lft forever
user@charmander:~ # sudo dhclient eth0
Setting LLMNR support level "yes" for "2", but the global support level is "no".
user@charmander:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:d9:14:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.0.4/24 brd 192.168.0.255 scope global dynamic eth0
valid_lft 86397sec preferred_lft 86397sec
inet6 fe80::dea6:32ff:fed9:14dc/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether dc:a6:32:d9:14:dd brd ff:ff:ff:ff:ff:ff
inet 192.168.0.206/24 metric 600 brd 192.168.0.255 scope global dynamic wlan0
valid_lft 86265sec preferred_lft 86265sec
inet6 fe80::dea6:32ff:fed9:14dd/64 scope link
valid_lft forever preferred_lft forever
4: br-3754d51a6ecf: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:cb:0c:5d:a5 brd ff:ff:ff:ff:ff:ff
inet 172.30.9.1/24 brd 172.30.9.255 scope global br-3754d51a6ecf
valid_lft forever preferred_lft forever
inet6 fe80::42:cbff:fe0c:5da5/64 scope link
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:33:6c:18:0a brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
7: veth90fe157@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-3754d51a6ecf state UP group default
link/ether 36:bf:25:db:db:44 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::34bf:25ff:fedb:db44/64 scope link
valid_lft forever preferred_lft forever
9: vethe6e2821@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-3754d51a6ecf state UP group default
link/ether 1a:83:61:24:ff:07 brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::1883:61ff:fe24:ff07/64 scope link
valid_lft forever preferred_lft forever
I can manually get an DHCP address with dhcient eth0
and then everything works fine.
I have added dhclient eth0
to my /etc/rc.local
so that eth0 will get an address on boot, but this is obviously less than optimal and I would prefer that both interfaces come all the way up and get DHCP leases on boot.
I do not have network manager on this system:
user@charmander:~ # sudo service NetworkManager status
Unit NetworkManager.service could not be found.0
UPDATE:
netplan:
user@charmander:/etc/netplan # ls
50-cloud-init.yaml
user@charmander:/etc/netplan # sudo cat 50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
wifis:
renderer: networkd
wlan0:
access-points:
<SSID>:
password: <redacted>
dhcp4: true
optional: true
I have another box with ethernet only, so I just cribbed from that and added an ethernets
section:
ethernets:
eth0:
dhcp4: true
optional: true
and now it's working as expected. I guess the question now is, A) why did the netplan get re-written to only include the wifi interface and B) should I be confident it isn't going to get rewritten again?
netplan
config in the question.