eos.arista.com-BGP AS path prepend using last-as keyword
eos.arista.com-BGP AS path prepend using last-as keyword
eos.arista.com/eos-4-18-0f/bgp-as-path-prepend-using-last-as-keyword
The “set as-path prepend” clause in route-map configuration mode has been enhanced with
the addition of the “last-as” keyword, which will prepend the AS path with the specified
number of instances of the last AS number in the AS path. Currently, the command only
accepts an explicit list of AS numbers to prepend to the AS path. This list may also include
one or more “auto” keywords in place of AS numbers, which are replaced by the peer AS
number for inbound routes, and the local AS number for outbound routes.
By extending some AS paths, this feature enables customers to configure their switches to
prefer some paths over other paths which have been extended by prepending the last AS
number. This causes the switch to route traffic via the shorter path (when those routes are
available).
Configuration
The following command is configured in route-map configuration mode to enable this
feature.
Feature Summary
If a route-map containing a “set as-path prepend last-as” clause is applied (inbound
or outbound) to an eBGP neighbor, the last AS number in the current AS path
will be prepended to the AS path the specified number of times. On outbound,
this prepending is done before the local AS number is prepended.
If a route-map containing this clause is applied inbound from an iBGP neighbour, the
clause will be ignored. However, the clause will be applied outbound to an iBGP
neighbour. This is in line with the existing AS path prepend behavior.
If the AS path is empty (such as with a locally originated route), the “set as-path
prepend last-as” clause will not change the AS path.
If the first segment of the AS path is an unordered set of AS numbers (such as with
an aggregated route), the “set as-path prepend last-as” clause will not change the
AS path.
Both the “set as-path prepend” and “set as-path prepend last-as” clauses can be
specified in the same route-map sequence. In this case, the “set as-path prepend
last-as” clause will be evaluated before the “set as-path prepend” clause, regardless
of the order in which the clauses were entered in the CLI.
1/3
If the “set as-path prepend” and “set as-path match all replacement” clauses are
specified in the same route-map sequence, the “set as-path match all replacement”
clause takes precedence and the “set as-path prepend” clause is effectively ignored.
3/3