/srv/irclogs.ubuntu.com/2022/06/01/#netplan.txt

gcdsHi, maybe someone could help me with netplan stuff, I am going bald from trying to figure out what is wrong. Context: I have network 10.93.0.0/16 the server has a bridge with one interface and static IP address of 10.93.2.2/16, everything generates and works but for some reason I can't access anything higher than 10.93.127.254, I tried adding a10:03
gcdsstatic route for 10.93.0.0/16 via 10.93.0.1 but didn't help, but then I removed default generated route which looked suspicious to me (the 10.93.0.0/16 via 10.93.2.2 in the paste) and it worked then, I would consider it's done but I know it's not permanent so maybe can help me figure out what's wrong with netplan so I would not need to make changes10:03
gcdsafter each reboot? https://paste.ubuntu.com/p/kPrPBwPQBx/10:03
slyongcds: interesting... I wonder where the 10.93.0.0/16 route is coming from... it states "proto kernel", so most probably didn't get applied through netplan.10:09
slyondoes it re-appear if your run "netplan apply"?10:09
gcdshmm, so I have deleted it with "ip route del" and then run again netplan apply and it reappeared10:09
gcdshttps://paste.ubuntu.com/p/NB3t4WyhMy/10:11
slyonInteresting. Sounds similar to this: https://unix.stackexchange.com/questions/665792/prevent-route-creation-when-bringing-up-network-interface10:12
slyona workaround could be to install a routeable.d hook via networkd-dispatcher: https://netplan.io/faq/#use-pre-up%2C-post-up%2C-etc.-hook-scripts – but it's not a very clean solution10:13
gcdsYes, I am almost ready to make the script like in SE suggestion, but I wanted to understand whats wrong so that in future I would know why10:14
gcdsthe only thing I have is sysctl config file load on udev rules for bridge10:15
gcdsbut I dont think that can create a route10:16
slyonyes. I can confirm that the route is created in a local test system for me as well. so it's not specific to your system10:18
gcdsworst part I spent like 1,5 days blaming unifi udm router with mDNS stuff when in the end it was server not accessible for this route issue :facepalm:10:19
slyonhow about this:10:20
slyonIn addition to your "default" route, add another static route in netplan: "to: 0.93.0.0/16, via: 10.93.2.2" (potentially using a higher priority metric than the kernel route)?10:21
gcdsyou mean adding higher metric value right?10:21
slyonargh via "10.93.0.1" that is10:21
gcdsyes yes I understood10:22
slyonlower metric value, would have higher priority IIRC10:22
gcdsissue is that kernel route is metric 0:D  and -1 is not allowed:D10:25
slyonugh10:26
gcdsit's fine I guess I am gonna just add a script for it, I was just curious what is causing to generate such route10:27
slyonI think it's the kernel generating that route whenever br0 is brought up10:30
slyonAnd the route looks somewhat sensible IMO, too. it sends all trafic to 10.93.0.0/16 through br0 using its 10.93.2.2 IP address. which makes kind of sense10:31
slyonI don't know how that would explain why you can only reach part of your network10:31

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!