6088bd59de
* Initial commit for BGP internal neighbor table support. > Add new template named "internal" for the internal BGP sessions > Add a new table in database "BGP_INTERNAL_NEIGHBOR" > The internal BGP sessions will be stored in this new table "BGP_INTERNAL_NEIGHBOR" * Changes in template generation tests with the introduction of internal neighbor template files.
47 lines
1.2 KiB
Django/Jinja
47 lines
1.2 KiB
Django/Jinja
!
|
|
! template: bgpd/templates/general/policies.conf.j2
|
|
!
|
|
!
|
|
!
|
|
{% if constants.bgp.allow_list is defined and constants.bgp.allow_list.enabled is defined and constants.bgp.allow_list.enabled %}
|
|
{% if constants.bgp.allow_list.default_action is defined and constants.bgp.allow_list.default_action.strip() == 'deny' %}
|
|
route-map ALLOW_LIST_DEPLOYMENT_ID_0_V4 permit 65535
|
|
set community no-export additive
|
|
!
|
|
route-map ALLOW_LIST_DEPLOYMENT_ID_0_V6 permit 65535
|
|
set community no-export additive
|
|
{% else %}
|
|
route-map ALLOW_LIST_DEPLOYMENT_ID_0_V4 permit 65535
|
|
set community {{ constants.bgp.allow_list.drop_community }} additive
|
|
!
|
|
route-map ALLOW_LIST_DEPLOYMENT_ID_0_V6 permit 65535
|
|
set community {{ constants.bgp.allow_list.drop_community }} additive
|
|
{% endif %}
|
|
!
|
|
route-map FROM_BGP_PEER_V4 permit 2
|
|
call ALLOW_LIST_DEPLOYMENT_ID_0_V4
|
|
on-match next
|
|
!
|
|
route-map FROM_BGP_PEER_V6 permit 2
|
|
call ALLOW_LIST_DEPLOYMENT_ID_0_V6
|
|
on-match next
|
|
!
|
|
{% endif %}
|
|
!
|
|
!
|
|
!
|
|
route-map FROM_BGP_PEER_V4 permit 100
|
|
!
|
|
route-map TO_BGP_PEER_V4 permit 100
|
|
!
|
|
!
|
|
route-map FROM_BGP_PEER_V6 permit 1
|
|
set ipv6 next-hop prefer-global
|
|
!
|
|
route-map FROM_BGP_PEER_V6 permit 100
|
|
!
|
|
route-map TO_BGP_PEER_V6 permit 100
|
|
!
|
|
! end of template: bgpd/templates/general/policies.conf.j2
|
|
!
|