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

[vstest]: add default route vs test #6543

Merged
merged 2 commits into from
Jan 25, 2021
Merged

Conversation

lguohan
Copy link
Collaborator

@lguohan lguohan commented Jan 24, 2021

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)

  • 201811
  • 201911
  • 202006
  • 202012

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

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>
@lguohan lguohan changed the title [vstest]: add default vs test [vstest]: add default route vs test Jan 24, 2021
@lguohan lguohan requested a review from shi-su January 24, 2021 22:57
* 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>
@lguohan
Copy link
Collaborator Author

lguohan commented Jan 25, 2021

az pipeline passed.

@lguohan lguohan merged commit a38377e into sonic-net:master Jan 25, 2021
@lguohan lguohan deleted the defroute branch January 25, 2021 06:25
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")

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.

Copy link
Contributor

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?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants