-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting source IP when adding a static route / set src #17886
Comments
Which use case do you have in mind? |
Hi It sometimes happens that a router connected to peering points will use the peering point IP as source address when doing things like apt-get for package updates or running offsite backups. Wanted to add a static route which sets the source IP in frr.conf - just to keep all the static routes in one place. |
Can you show how are you trying to use it? |
Very similar to adding a route in Linux: ip route add n.n.n.n/32 via m.m.m.m src x.x.x.x ...when routing to n.n.n.n/32, set source IP to x.x.x.x |
I meant how do you do in frr.conf? |
as far as I can see this can't be done in frr.conf - not supported in the syntax for adding a static route |
It works for me fine.
Output:
In the kernel:
|
Why set nexthop attribute from ip protocol? |
I was trying to set the source IP, without needing a route-map - but I figured out another solution. The route map + 'set src' way of doing it can also work for what I need. |
Hi
I see you can use 'set src' in a route-map, to set the source IP when a route is installed.
I was hoping to set a source IP for a static route. Is there a reason this is not supported?
https://docs.frrouting.org/en/stable-10.2/static.html
The text was updated successfully, but these errors were encountered: