Skip to content
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

policy-conf: T439: Add policy local-route PBR #614

Merged
merged 1 commit into from Nov 20, 2020
Merged

Conversation

sever-sever
Copy link
Member

Add ability to use policy for local routes via "ip rule"

set policy local-route rule 50 set table '20'
set policy local-route rule 50 source '100.64.0.1'
set policy local-route rule 50 source '100.64.0.2'
set policy local-route rule 50 source '203.0.113.0/24'

it generate

vyos@r4-roll# sudo ip rule show
0:	from all lookup local 
50:	from 100.64.0.1 lookup 20 
50:	from 100.64.0.2 lookup 20 
50:	from 203.0.113.0/24 lookup 20 
32766:	from all lookup main 
32767:	from all lookup default 
[edit]

Copy link
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Before merging this I'd be happy to also see a smoketest for this to improve the overall code quality by running nightly tests on this feature.

@sever-sever
Copy link
Member Author

Looks good to me. Before merging this I'd be happy to also see a smoketest for this to improve the overall code quality by running nightly tests on this feature.

Done

@c-po c-po merged commit 8bc6775 into vyos:current Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants