bgp: add local_as support to BGP_NEIGHBOR template#26556
Open
briantopping wants to merge 1 commit intosonic-net:masterfrom
Open
bgp: add local_as support to BGP_NEIGHBOR template#26556briantopping wants to merge 1 commit intosonic-net:masterfrom
briantopping wants to merge 1 commit intosonic-net:masterfrom
Conversation
Add support for the local_as attribute in the BGP_NEIGHBOR CONFIG_DB table. When local_as is defined for a neighbor, the template renders: neighbor <addr> local-as <asn> no-prepend replace-as This enables operators to present a different AS number to specific peers while using a single internal AS for iBGP. Common use case: sites running iBGP internally with a private AS while presenting a public AS to upstream PE routers. Matches the local_as attribute schema used in Dell Enterprise SONiC for the BGP_NEIGHBOR and BGP_PEER_GROUP tables.
|
|
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
local_asattribute support to the general BGP neighbor instance templatelocal_asis defined inBGP_NEIGHBORCONFIG_DB table, rendersneighbor <addr> local-as <asn> no-prepend replace-asin FRR configbgp_session)Motivation
Operators running iBGP internally with a private AS need to present a different (public) AS to upstream PE routers via
local-as. This is a standard BGP deployment pattern for multi-site networks.Dell Enterprise SONiC already supports the
local_asattribute inBGP_NEIGHBORandBGP_PEER_GROUPtables. This patch brings the same capability to community SONiC by adding the corresponding template logic.Example CONFIG_DB usage
Produces in FRR:
Test plan
local-aspresenting AS 10595 while router runs AS 65001local_asattribute are unaffected (conditional renders nothing)🤖 Generated with Claude Code