Public IP: 46.x.y.z/32
GW: 100.64.0.1/32
temporary configuration is possible via ip route command:
ip route add 100.64.0.1 dev xenbr0
ip route add default via 100.64.0.1
but i've problem with permanent configuration
xe network-param-set uuid=<xe_network-list_xenbr0_uuid> other-config:static-routes=10.64.0.1/32/0.0.0.0
due to fails to apply Default Gatewa via Xen network configuration and via ip route command
ip route add default via 100.64.0.1
(Error: Nexthop has invalid gateway )
there is a chance to remediate to this behavior?
Topics: Knowledge sharing and feedback
Hello,
I've never used XCP-NG but the keyword to look for, that most Linux distributions apply for this kind of route outside of the interface's subnet, is "onlink" (pretend that the nexthop is directly attached to this link, even if it does not match any interface prefix).
For instance, Debian's ifupdown adds it automatically since 2016: https://salsa.debian.org/debian/ifupdown/-/commit/8b7bca9597d2f75670b182f0fc149cdbaec3544c
I don't think xe supports this so maybe you could file a bug report?
A workaround could be adding a SystemD service that runs before XCP-NG's networking service and whose only job is to run "ip route add 100.64.0.1 dev xenbr0"? I don't know if that's possible, depending on whether xenbr0 has already been created by then.
Hello,
thank you for your reply, i posted it on the XCP-NG community forum https://xcp-ng.org/forum/post/96286, because
ip route add default via 100.64.0.1 dev xenbr0 onlinkworks without need for
ip route add 100.64.0.1 dev xenbr0