Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Option to add static routes to the network contextualization #277

Closed
atodorov-storpool opened this issue Dec 8, 2022 · 1 comment
Closed

Comments

@atodorov-storpool
Copy link
Contributor

atodorov-storpool commented Dec 8, 2022

It is relatively common practice to have additional static routes to internal private networks that differ from the default gateway without defining a virtual router setup.

The static routes could be defined as a comma-separated list in a custom contextualization variable, and the contextualization could append them to route-<iface>

For example ETH0_STATIC_ROUTES=1.2.3.4/24 via 2.3.4.5 dev eth0,5.6.7.8/22 via 2.3.4.5 dev eth0 could lead to
/etc/sysconfig/network-scripts/route-eth0 containing

1.2.3.4/24 via 2.3.4.5 dev eth0
5.6.7.8/22 via 2.3.4.5 dev eth0

edit: escape < and >

@baby-gnu
Copy link
Contributor

baby-gnu commented Feb 9, 2023

I think the dev eth0 should be automatically added since the device name could be something else.

dann1 added a commit that referenced this issue Apr 25, 2023
dann1 added a commit that referenced this issue May 11, 2023
dann1 added a commit that referenced this issue May 12, 2023
dann1 added a commit that referenced this issue May 18, 2023
dann1 added a commit that referenced this issue May 18, 2023
dann1 added a commit that referenced this issue May 19, 2023
rsmontero pushed a commit that referenced this issue May 23, 2023
@tinova tinova closed this as completed May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants