Recently I upgraded my machine from Ubuntu 20.04 to 22.04. After the upgrade the containers can not reach internet. Everything else seems to be working fine. I a different question in this category I saw that ip
info can be helpful for you experts to guide me in reconnecting the containers back again, so here are the outputs.
Host ip r
:
default via 192.168.1.1 dev enp5s0 proto dhcp src 192.168.1.xxx metric 100
10.122.224.0/24 dev lxdbr0 proto kernel scope link src 10.122.224.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.1.0/24 dev enp5s0 proto kernel scope link src 192.168.1.xxx metric 100
192.168.1.1 dev enp5s0 proto dhcp scope link src 192.168.1.xxx metric 100
Host 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
valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.1.xxx/24 metric 100 brd 192.168.1.255 scope global dynamic enp5s0
valid_lft 5109sec preferred_lft 5109sec
inet6 fe80::.../64 scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether xx:xx:xx:xx:xx:xx 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
4: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 10.122.224.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
6: veth83e8e8b5@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxdbr0 state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff link-netnsid 0
There is no lxcbr0
in iptables -L -n -v
though, only docker0
.
lxc network list
:
+---------+----------+---------+-----------------+------+-------------+---------+---------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY | STATE |
+---------+----------+---------+-----------------+------+-------------+---------+---------+
| docker0 | bridge | NO | | | | 0 | |
+---------+----------+---------+-----------------+------+-------------+---------+---------+
| enp5s0 | physical | NO | | | | 0 | |
+---------+----------+---------+-----------------+------+-------------+---------+---------+
| lxdbr0 | bridge | YES | 10.122.224.1/24 | none | | 23 | CREATED |
+---------+----------+---------+-----------------+------+-------------+---------+---------+
lxc list
container | RUNNING | 10.122.224.33 (eth0) | | CONTAINER | 0
Container ip r
:
default via 10.122.224.1 dev eth0 proto dhcp src 10.122.224.33 metric 100
10.122.224.0/24 dev eth0 proto kernel scope link src 10.122.224.33
10.122.224.1 dev eth0 proto dhcp scope link src 10.122.224.33 metric 100
Container 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
valid_lft forever preferred_lft forever
7: eth0@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.122.224.33/24 brd 10.122.224.255 scope global dynamic eth0
valid_lft 3379sec preferred_lft 3379sec
inet6 fe80::.../64 scope link
valid_lft forever preferred_lft forever
Any attempt to reach the internet, e.g. curl google.com
from within the containers timeouts.
* Rebuilt URL to: google.com/
* Trying 142.251.36.142...
* TCP_NODELAY set
* Trying 2a00:1450:4014:80e::200e...
* TCP_NODELAY set
* Immediate connect fail for 2a00:1450:4014:80e::200e: Network is unreachable
* ... the same keeps repeating ...
As I am no networking expert, I hope some can help me to fix the lost container(s) connection(s).