policy: T4414: Add route-map "as-path prepend last-as x" option

This commit is contained in:
Christian Poessinger 2022-05-05 19:03:04 +02:00
parent cd51af8ad1
commit c57facdcc3
3 changed files with 18 additions and 13 deletions

View File

@ -563,7 +563,7 @@ it is not 203.0.113.0/24.
set policy route-map BGPOUT rule 10000 action 'deny' set policy route-map BGPOUT rule 10000 action 'deny'
set policy route-map BGPPREPENDOUT description 'BGP Export Filter' set policy route-map BGPPREPENDOUT description 'BGP Export Filter'
set policy route-map BGPPREPENDOUT rule 10 action 'permit' set policy route-map BGPPREPENDOUT rule 10 action 'permit'
set policy route-map BGPPREPENDOUT rule 10 set as-path-prepend '65551 65551 65551' set policy route-map BGPPREPENDOUT rule 10 set as-path prepend '65551 65551 65551'
set policy route-map BGPPREPENDOUT rule 10 match ip address prefix-list 'BGPOUT' set policy route-map BGPPREPENDOUT rule 10 match ip address prefix-list 'BGPOUT'
set policy route-map BGPPREPENDOUT rule 10000 action 'deny' set policy route-map BGPPREPENDOUT rule 10000 action 'deny'

View File

@ -8,7 +8,7 @@ BGP Example
# Create policy # Create policy
set policy route-map setmet rule 2 action 'permit' set policy route-map setmet rule 2 action 'permit'
set policy route-map setmet rule 2 set as-path-prepend '2 2 2' set policy route-map setmet rule 2 set as-path prepend '2 2 2'
# Apply policy to BGP # Apply policy to BGP
set protocols bgp local-as 1 set protocols bgp local-as 1

View File

@ -149,15 +149,20 @@ Route Map
BGP aggregator attribute: AS number or IP address of an aggregation. BGP aggregator attribute: AS number or IP address of an aggregation.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set as-path-exclude .. cfgcmd:: set policy route-map <text> rule <1-65535> set as-path exclude
<text> <text>
Remove ASN(s) from a BGP AS-path attribute. For example "456 64500 45001". Drop AS-NUMBER from the BGP AS path.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set as-path-prepend .. cfgcmd:: set policy route-map <text> rule <1-65535> set as-path prepend
<text> <text>
Prepend string for a BGP AS-path attribute. For example "64501 64501". Prepend the given string of AS numbers to the AS_PATH of the BGP path's NLRI.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set as-path
prepend-last-as <n>
Prepend the existing last AS number (the leftmost ASN) to the AS_PATH.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set atomic-aggregate .. cfgcmd:: set policy route-map <text> rule <1-65535> set atomic-aggregate
@ -211,8 +216,8 @@ Route Map
peer-address peer-address
Set the BGP nexthop address to the address of the peer. For an incoming Set the BGP nexthop address to the address of the peer. For an incoming
route-map this means the ip address of our peer is used. For an route-map this means the ip address of our peer is used. For an
outgoing route-map this means the ip address of our self is used to outgoing route-map this means the ip address of our self is used to
establish the peering with our neighbor. establish the peering with our neighbor.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set ipv6-next-hop .. cfgcmd:: set policy route-map <text> rule <1-65535> set ipv6-next-hop
@ -224,17 +229,17 @@ Route Map
peer-address peer-address
Set the BGP nexthop address to the address of the peer. For an incoming Set the BGP nexthop address to the address of the peer. For an incoming
route-map this means the ip address of our peer is used. For an route-map this means the ip address of our peer is used. For an
outgoing route-map this means the ip address of our self is used to outgoing route-map this means the ip address of our self is used to
establish the peering with our neighbor. establish the peering with our neighbor.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set ipv6-next-hop .. cfgcmd:: set policy route-map <text> rule <1-65535> set ipv6-next-hop
prefer-global prefer-global
For Incoming and Import Route-maps if we receive a v6 global and v6 LL For Incoming and Import Route-maps if we receive a v6 global and v6 LL
address for the route, then prefer to use the global address as the address for the route, then prefer to use the global address as the
nexthop. nexthop.
.. cfgcmd:: set policy route-map <text> rule <1-65535> set large-community .. cfgcmd:: set policy route-map <text> rule <1-65535> set large-community
<text> <text>