Template change for BGP monitors on T2 (#14844)

Why I did it
To support BGPMon sessions from each T2 linecard ASIC

Work item tracking
Microsoft ADO (number only): 17873174
How I did it
Added change in BGPMon configuration to use Loopback4096 as source interface, since this has a unique IP per ASIC.

How to verify it
Tested by manually setting up BGPMon session on T2 LC and verified that Loopback4096 could be used as source
This commit is contained in:
Tejaswini Chadaga 2023-05-09 13:40:00 -07:00 committed by GitHub
parent b6b31df339
commit 4e60f0d563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 78 additions and 9 deletions

View File

@ -2,11 +2,30 @@
! template: bgpd/templates/BGPMON/peer-group.conf.j2
!
neighbor BGPMON peer-group
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}
neighbor BGPMON update-source Loopback4096
{% else %}
neighbor BGPMON update-source {{ loopback0_ipv4 | ip }}
{% endif %}
address-family ipv4
neighbor BGPMON activate
neighbor BGPMON route-map FROM_BGPMON in
neighbor BGPMON route-map TO_BGPMON out
neighbor BGPMON send-community
neighbor BGPMON maximum-prefix 1
exit-address-family
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}
address-family ipv6
neighbor BGPMON activate
neighbor BGPMON route-map FROM_BGPMON in
neighbor BGPMON route-map TO_BGPMON out
neighbor BGPMON send-community
neighbor BGPMON maximum-prefix 1
exit-address-family
{% endif %}
!
! end of template: bgpd/templates/BGPMON/peer-group.conf.j2
!

View File

@ -12,6 +12,7 @@ vni {{ vnet_metadata['vni'] }}
{% block interfaces %}
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
{% for (name, prefix) in INTERFACE|pfx_filter %}
interface {{ name }}

View File

@ -1,3 +1,8 @@
{
"CONFIG_DB__DEVICE_METADATA": {
"localhost": {
"type": "LeafRouter"
}
},
"loopback0_ipv4": "1.1.1.1/32"
}

View File

@ -0,0 +1,7 @@
{
"CONFIG_DB__DEVICE_METADATA": {
"localhost": {
"type": "SpineRouter"
}
}
}

View File

@ -3,10 +3,14 @@
!
neighbor BGPMON peer-group
neighbor BGPMON update-source 1.1.1.1
address-family ipv4
neighbor BGPMON activate
neighbor BGPMON route-map FROM_BGPMON in
neighbor BGPMON route-map TO_BGPMON out
neighbor BGPMON send-community
neighbor BGPMON maximum-prefix 1
exit-address-family
!
! end of template: bgpd/templates/BGPMON/peer-group.conf.j2
!

View File

@ -0,0 +1,22 @@
!
! template: bgpd/templates/BGPMON/peer-group.conf.j2
!
neighbor BGPMON peer-group
neighbor BGPMON update-source Loopback4096
address-family ipv4
neighbor BGPMON activate
neighbor BGPMON route-map FROM_BGPMON in
neighbor BGPMON route-map TO_BGPMON out
neighbor BGPMON send-community
neighbor BGPMON maximum-prefix 1
exit-address-family
address-family ipv6
neighbor BGPMON activate
neighbor BGPMON route-map FROM_BGPMON in
neighbor BGPMON route-map TO_BGPMON out
neighbor BGPMON send-community
neighbor BGPMON maximum-prefix 1
exit-address-family
!
! end of template: bgpd/templates/BGPMON/peer-group.conf.j2
!

View File

@ -17,6 +17,7 @@ agentx
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet0
link-detect

View File

@ -1,6 +1,7 @@
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet0
link-detect

View File

@ -28,6 +28,7 @@ vni 20
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet0
link-detect

View File

@ -20,6 +20,7 @@ agentx
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface PortChannel03
link-detect

View File

@ -26,6 +26,7 @@ vni 9000
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet8
link-detect

View File

@ -26,6 +26,7 @@ vni 8000
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet8
link-detect

View File

@ -23,6 +23,7 @@ log facility local4
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface PortChannel03
link-detect

View File

@ -20,6 +20,7 @@ agentx
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface PortChannel01
link-detect

View File

@ -26,6 +26,7 @@ vni 9000
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet0
link-detect

View File

@ -26,6 +26,7 @@ vni 8000
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface Ethernet0
link-detect

View File

@ -23,6 +23,7 @@ log facility local4
!
! Enable nht through default route
ip nht resolve-via-default
ipv6 nht resolve-via-default
! Enable link-detect (default disabled)
interface PortChannel01
link-detect