-
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
Set 'origin' and 'AS Path' for T1 SLB routes #13613
Conversation
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM
cmds.append("route-map %s permit 100" % ("%s_RM" % rm)) | ||
bgp_asn = \ | ||
self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)['localhost']['bgp_asn'] | ||
cmds.append(" set as-path prepend %s %s" % (bgp_asn, bgp_asn)) |
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.
Prefer to have a fixed value for AS prepend instead of prepending the current device's AS value. This could be gotten from /etc/sonic/constants.yml : 2. Not sure if this is significant changes.
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.
updated.
@jcaiMR , likely to have conflict for 202012. Would you raise another PR for 202012? @siqbal1986 for viz |
Sure, I will open the PR today. |
@prsunny Hi Prince, I checked the code and also tried this diff with 202012 base, there is no gap from code. Maybe we can still waiting for the 'squash merge' into 202012. |
@jcaiMR , since this is a dependency on constants.yml, lets ensure a sonic-mgmt test is added so that any future change wont break this implementation. |
Sure, Storm has write some test cases for this SDN SLB routes and may ready to PR, I will add some extra test cases for this commit. |
* set origin and as-path prepend for routes from SLB
Cherry-pick PR to 202205: #13753 |
* set origin and as-path prepend for routes from SLB
* set origin and as-path prepend for routes from SLB
Cherry-pick PR to 202211: #13860 |
* set origin and as-path prepend for routes from SLB
Why I did it
Add support for Set 'origin' and 'AS Path' for T1 SLB routes.
When SLB programs routes to T1 (overlay routes), T1 must advertise such routes to match with the existing SLB 'origin' and AS path length. Following changes to be done during T1 advertisement:
'origin' set to 'incomplete' (value 2)
AS path to be appended as "x" + "x" (two prepend) to match the current AS path at T1 layer
How I did it
Add origin and as-path prepend for routemap FROM_SDN_SLB_ROUTES.
How to verify it
Follow test steps in HLD.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)