-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Would this library be appropriate for the following operations:
- upsert a routing table
replacea rule in the routing table created in step 1- add (preferably in an idempotent fashion, no duplicates) ip rules to force specific traffic to use routing table in step 1
# create table
# test table exists
# exit 0 = exists
# exit 255 = not exists
ip route show table cilium
echo 20 cilium >> /etc/iproute2/rt_tables
# upsert routes to the table
# note that linux does a hash-based 3/5 tuple algorithm
# https://serverfault.com/questions/696675/multipath-routing-in-post-3-6-kernels
ip route replace default table cilium \
nexthop via 172.28.4.130 weight 1 \
nexthop via 172.28.4.131 weight 1
# add rule(s)
# test if the rule is already present? do not create duplicates
ip rule add from 172.28.42.0/24 lookup cilium
...
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels