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 BGPPREPENDOUT description 'BGP Export Filter'
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 10000 action 'deny'

View File

@ -8,7 +8,7 @@ BGP Example
# Create policy
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
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.
.. 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>
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>
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