The interface has VLAN enabled. on default vlan (management lan, 10.0.0.1/24 physical if "enp0s31f6") I set
ipv4.routes: { ip = 192.168.0.1/32, nh = 10.0.0.1 }; { ip = 192.168.1.1/32, nh = 10.0.0.1 }
This traffic is allowed by 10.0.0.1.
route shows
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway.mynet 0.0.0.0 UG 400 0 0 Private
10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s31f6
10.1.0.0 0.0.0.0 255.255.255.0 U 400 0 0 Private
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s31f6
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
When I add those entries manually using
sudo route add 192.168.0.1 gw 10.0.0.1
sudo route add 192.168.1.1 gw 10.0.0.1
route shows
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway.heimnet 0.0.0.0 UG 400 0 0 Private
10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s31f6
10.1.0.0 0.0.0.0 255.255.255.0 U 400 0 0 Private
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s31f6
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.0.1 10.0.0.1 255.255.255.255 UGH 0 0 0 enp0s31f6
192.168.1.1 10.0.0.1 255.255.255.255 UGH 0 0 0 enp0s31f6
NetworkManager does not apply those static routes.
Where is my mistake?
Or is this a bug? I found reports online but they were closed with "WONT FIX" and they're old.
Thanks for help
nmcli-соединение вверх
Благодаря таллерам ответь работает. Этого не хватало. Не знал, что я должен был сделать это. Я просто изменил записи в nmtui.