-
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
[multi-ASIC] BGP internal neighbor table support #5520
Changes from all commits
e5d0120
201d391
b3f6135
13d6d0c
a89643d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
! | ||
! template: bgpd/templates/internal/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
! | ||
{% if neighbor_addr | ipv4 %} | ||
address-family ipv4 | ||
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V4 | ||
! | ||
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} | ||
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V4 in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is route-map configuration line repeated? The same line present in the peer_group.conf.j2 configuration There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked at both .. they are not same. |
||
{% endif %} | ||
! | ||
{% elif neighbor_addr | ipv6 %} | ||
address-family ipv6 | ||
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V6 | ||
! | ||
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} | ||
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V6 in | ||
{% endif %} | ||
{% endif %} | ||
! | ||
{% if bgp_session.has_key('rrclient') and bgp_session['rrclient'] | int != 0 %} | ||
neighbor {{ neighbor_addr }} route-reflector-client | ||
{% endif %} | ||
! | ||
neighbor {{ neighbor_addr }} next-hop-self force | ||
! | ||
neighbor {{ neighbor_addr }} activate | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/internal/instance.conf.j2 | ||
! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
! | ||
! template: bgpd/templates/internal/peer-group.conf.j2 | ||
! | ||
neighbor INTERNAL_PEER_V4 peer-group | ||
neighbor INTERNAL_PEER_V6 peer-group | ||
address-family ipv4 | ||
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} | ||
neighbor INTERNAL_PEER_V4 route-reflector-client | ||
{% endif %} | ||
neighbor INTERNAL_PEER_V4 soft-reconfiguration inbound | ||
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in | ||
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out | ||
exit-address-family | ||
address-family ipv6 | ||
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} | ||
neighbor INTERNAL_PEER_V6 route-reflector-client | ||
{% endif %} | ||
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound | ||
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in | ||
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/internal/peer-group.conf.j2 | ||
! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
! | ||
! template: bgpd/templates/internal/policies.conf.j2 | ||
! | ||
! | ||
! | ||
route-map FROM_BGP_INTERNAL_PEER_V4 permit 100 | ||
! | ||
route-map TO_BGP_INTERNAL_PEER_V4 permit 100 | ||
! | ||
! | ||
route-map FROM_BGP_INTERNAL_PEER_V6 permit 1 | ||
set ipv6 next-hop prefer-global | ||
! | ||
route-map FROM_BGP_INTERNAL_PEER_V6 permit 100 | ||
! | ||
route-map TO_BGP_INTERNAL_PEER_V6 permit 100 | ||
! | ||
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} | ||
route-map FROM_BGP_INTERNAL_PEER_V4 permit 2 | ||
set originator-id {{ loopback0_ipv4 | ip }} | ||
! | ||
route-map FROM_BGP_INTERNAL_PEER_V6 permit 2 | ||
set originator-id {{ loopback0_ipv4 | ip }} | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/internal/policies.conf.j2 | ||
! |
This file was deleted.
This file was deleted.
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.
Minor comment, should add the lines to add the timer configuration if they are not default.
These configuration
https://github.com/Azure/sonic-buildimage/blob/09d5a62fad22313b29afe1419d329abe45fbef6d/dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2#L6-L10
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.
Sure will update. As discussed will raise a follow up PR for adding this change.