2020-04-23 11:42:22 -05:00
!
! template: bgpd/templates/general/policies.conf.j2
!
!
!
2021-01-08 16:03:26 -06:00
{% if constants.bgp.allow_list is defined and constants.bgp.allow_list.enabled is defined and constants.bgp.allow_list.enabled and constants.bgp.allow_list.drop_community is defined %}
!
!
! please don't remove. 65535 entries are default rules
! which works when allow_list is enabled, but new configuration
! is not applied
!
{% if allow_list_default_action == 'deny' %}
!
2020-10-02 12:06:04 -05:00
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 %}
2021-01-08 16:03:26 -06:00
!
2020-10-02 12:06:04 -05:00
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 %}
!
2021-01-08 16:03:26 -06:00
bgp community-list standard allow_list_default_community permit no-export
bgp community-list standard allow_list_default_community permit {{ constants.bgp.allow_list.drop_community }}
!
route-map FROM_BGP_PEER_V4 permit 10
2020-10-02 12:06:04 -05:00
call ALLOW_LIST_DEPLOYMENT_ID_0_V4
on-match next
!
2021-01-08 16:03:26 -06:00
route-map FROM_BGP_PEER_V4 permit 11
match community allow_list_default_community
!
route-map FROM_BGP_PEER_V6 permit 10
2020-10-02 12:06:04 -05:00
call ALLOW_LIST_DEPLOYMENT_ID_0_V6
on-match next
!
2021-01-08 16:03:26 -06:00
route-map FROM_BGP_PEER_V6 permit 11
match community allow_list_default_community
!
2020-10-02 12:06:04 -05:00
{% endif %}
!
!
!
2020-04-23 11:42:22 -05:00
route-map FROM_BGP_PEER_V4 permit 100
!
route-map TO_BGP_PEER_V4 permit 100
!
!
route-map FROM_BGP_PEER_V6 permit 1
2020-11-24 10:33:31 -06:00
on-match next
2020-04-23 11:42:22 -05:00
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
!