-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Changes to make default route programming correct in multi-npu platforms #4774
Conversation
correct in multi-asic platform where frr is not running in host namespace. Change is to set correct administrative distance. Also make NAMESPACE* enviroment variable available for all dockers so that it can be used when needed. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
retest vsimage please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments.
One question and a some typos to fix.
# The top byte of the value is interpreted as the Administrative Distance and | ||
# the low three bytes are read in as the metric. | ||
# so here we are programming administrative distace of 210 (210 << 24) > 200 (for routes learn via IBGP) | ||
ip route add 0.0.0.0/0 via $GATEWAY_IP dev eth0 metric 3523215360 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to modify the route, instead of removing/adding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavel-shirshov i tried two option:
-
ip route change (This command fails)
-
ip route replace (It creates one more new default route with metric)
so i feel cleaner is just to delete and add it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need ip route change command. What error message do you see when you apply this command?
Why is the remove/add sequence cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavel-shirshov :
On using route change getting error "RTNETLINK answers: No such file or directory"
ip route change 0.0.0.0/0 via 240.127.1.1 dev eth0 metric 200
RTNETLINK answers: No such file or directory
My point for cleaner was w.r.t to "ip route replace" since it creates one more new default route with metric so we will have two routes.
If we del/add then there is only one and it's cleaner in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavel-shirshov Can you please review this. I have address your comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abdosi I think it is better to "change" or check that the route was removed. Otherwise we have a chance to introduce another route without removing the previous one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavel-shirshov added check to add default route only if docker default route exist and delete is successful
retest vsimage please |
only if default route exist and delete is successful.
retest mellanox please |
…rms (#4774) * Changes to make default route programming correct in multi-asic platform where frr is not running in host namespace. Change is to set correct administrative distance. Also make NAMESPACE* enviroment variable available for all dockers so that it can be used when needed. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Fix review comments * Review comment to check to add default route only if default route exist and delete is successful.
- Why I did it
Changes to make default route programming correct in multi-npu platforms where frr is not running in host namespace.
Change is to set correct administrative distance of default route created by docker container so
that default route learn from FRR has higher priority and classify as best route.
Also made NAMESPACE* environment variable available for all dockers
so that it can be used when needed.
- How I did it
Delete and add back default route added by docker network with correct metrics/administrative distance.
- How to verify it
Before Change
After Change