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

[VRF] Set unreachable default route to isolate user Vrf and default Vrf #2943

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gord1306
Copy link
Contributor

@gord1306 gord1306 commented Oct 25, 2023

What I did
Set unreachable default route to isolate user Vrf and default Vrf

Why I did it
In cases where there is no next hop found in the user VRF in the software dataplane, the default behavior of the kernel switches to looking up the default VRF. This behavior is inconsistent with some ASICs.

How I verified it

  1. Create Vrf1 and bind Ethernet0 to the Vrf1
  2. Setup default route of default Vrf
  3. Send a no nexthop packet to Ethernet0 and check if there is any packet egress from default Vrf

Details if related
To address this, we need to set an unreachable policy-based route to prevent this scenario ref:
ip route add table 10 unreachable default metric 4278198272

@gord1306 gord1306 requested a review from prsunny as a code owner October 25, 2023 15:55
In cases where there is no next hop found in the user VRF in the software
dataplane, the default behavior of the kernel switches to looking up the
default VRF. This behavior is inconsistent with some ASICs.

To address this, we need to set an unreachable policy-based route to prevent this scenario:
ip route add table 10 unreachable default metric 4278198272

This commit will append this configuration during VRF creation and removal."
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.

1 participant