[Contents] [Prev] [Next] [Index] [Report an Error]

Configuring the AS Path Prepend Action

You can prepend or add one or more autonomous system (AS) numbers at the beginning of an AS path. The AS numbers are added after the local AS number has been added to the path. Prepending an AS path makes a shorter AS path look longer and therefore less preferable to the Border Gateway Protocol (BGP).

Beginning with JUNOS Release 9.1, the range that you can configure for AS numbers has been extended to provide BGP support for 4-byte AS numbers as defined in
RFC 4893, BGP Support for 4-octet AS Number Space. The range is now from 1 through 4,294,967,295. The JUNOS software continues to support 2-byte AS numbers. For more information about configuring the AS number for the router and BGP, see the JUNOS Routing Protocols Configuration Guide.

For example, from AS 1, there are two equal paths (through AS 2 and AS 3) to reach AS 4. You might want packets from certain sources to use the path through AS 2. Therefore, you must make the path through AS 3 look less preferable so that BGP chooses the path through AS 2. In AS 1, you can prepend multiple AS numbers:

[edit]
policy-options {
policy-statement as-path-prepend {
term prepend {
from {
route-filter 192.168.0.0/16 orlonger;
route-filter 172.16.0.0/12 orlonger;
route-filter 10.0.0.0/8 orlonger;
}
then as-path-prepend "1 1 1 1";
}
}
}

[Contents] [Prev] [Next] [Index] [Report an Error]