-
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
[vstest]: add default route vs test #6543
Conversation
Check sonic-net#6483 add test to make sure default route change in eth0 does not affect the default route in the default vrf Signed-off-by: Guohan Lu <lguohan@gmail.com>
* f4e8245 2021-01-24 | [fpmsyncd] Skip routes to eth0 or docker0 (sonic-net#1606) (HEAD, origin/master, origin/HEAD) [Shi Su] * f4c3579 2021-01-23 | Enhance dynamic buffer calculation and bug fixes (sonic-net#1601) [Stephen Sun] * e800c9f 2021-01-22 | [logfile]: Add option to specify swss rec file name (sonic-net#1546) [arlakshm] * 1acf60e 2021-01-17 | Implementation of System ports initialization, Interface & Neighbor Synchronization... (sonic-net#1431) [minionatwork] Signed-off-by: Guohan Lu <lguohan@gmail.com>
az pipeline passed. |
assert "10.10.10.1" in output | ||
|
||
# insert default route for table default | ||
dvs.runcmd("ip route add default via 172.17.0.1 table default") |
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.
ip route add
installs a kernel route to zebra. The administrative distance of the kernel route is 0 since the metric value is 0 and zebra uses the upper byte of kernel route metric as the distance. So the kernel route wins the BGP route and the only nexthop will stay eth0 until the kernel route is deleted. It's an expected behaviour and will prevent all subsequent BGP updates from taking effect in swss, and the ASIC. Filtering routes with eth0 nexthop just hides the problem and won't fix 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.
Just to clarify, these are two different tables - default
and main
. In Sonic, eth0 routes are part of default route table
and we would want to give preference to BGP routes in swss and ASIC (which is part of main table) and not the eth0 routes (kernel). I think your point is valid if we have all routes in a single routing table. Did we miss anything?
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.
Thanks. The two difference tables you pointed out are what I've missed. And I've successfully reproduced it in our environment.
Check #6483
add test to make sure default route change in eth0 does not
affect the default route in the default vrf
Signed-off-by: Guohan Lu lguohan@gmail.com
- Why I did it
add regression test for #6483
- How I did it
add vstest
- How to verify it
run vstest and failed. will make sure it success after issued fixed.
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)