Good morning,
I have a problem with a route that is systematically added at startup.
This prevents the network connection between the host and the lxd container.
these two machines are not able to communicate with each other and I found the origin (wrong route)
I delete them manually but they come back after each boot.
I confess I don’t know how to do it.
My Container
here is the netplan of my container
> network:
> version: 2
> ethernets:
> eth0:
> dhcp4: false
> addresses:
> - 192.168.0.212/24
> gateway4: 192.168.0.1
> nameservers:
> addresses:
> - 192.168.0.1
> routes:
> - to: 192.168.0.0/24
> via: 192.168.0.1
here are the roads of my container
> default via 192.168.0.1 dev eth0 proto static
> 10.8.0.0/24 via 10.8.0.2 dev tun0
> 10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
> 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.212
> 192.168.0.0/24 via 192.168.0.1 dev eth0 proto static
the road that I have trouble with and that comes back after each start is:
**> 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.212**
my config ip of my container
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default qlen 1000
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever 2: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel
> state UNKNOWN group default qlen 500
> inet 10.8.0.1 peer 10.8.0.2/32 scope global tun0
> valid_lft forever preferred_lft forever 7: eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
> group default qlen 1000 link-netnsid 0
> inet 192.168.0.212/24 brd 192.168.0.255 scope global eth0
> valid_lft forever preferred_lft forever
HOST Machine
here is the netpan of my host machine
> network:
> ethernets:
> eth0:
> dhcp4: true
> optional: true
> version: 2
here are the roads ofmy host machine
> default via 192.168.0.1 dev eth0 proto dhcp src 192.168.0.201 metric
> 100
> 10.20.68.0/24 dev lxdbr0 proto kernel scope link src 10.20.68.1 linkdown
> 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.201
> 192.168.0.1 dev eth0 proto dhcp scope link src 192.168.0.201 metric 100
the road that I have trouble with and that comes back after each start is:
**> 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.201**
My config ip on host machine:
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default qlen 1000
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group
> default qlen 1000
> inet 192.168.0.201/24 brd 192.168.0.255 scope global dynamic eth0
> valid_lft 84213sec preferred_lft 84213sec 4: lxdbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
> group default qlen 1000
> inet 10.20.68.1/24 scope global lxdbr0
> valid_lft forever preferred_lft forever
I thank you for your advice