Prepending AS Numbers to BGP AS Paths
You can prepend one or more autonomous system (AS) numbers at the beginning of an AS path. The AS numbers are added at the beginning of the path after the actual AS number from which the route originates has been added to the path. Prepending an AS path makes a shorter AS path look longer and therefore less preferable to BGP.
In JUNOS Release 9.1 and later, you can specify 4-byte AS numbers as defined in RFC 4893, BGP Support for Four-octet AS Number Space, as well as the 2-byte AS numbers that are supported in earlier releases of the JUNOS Software. In plain-number format, you can configure a value in the range from 1 through 4,294,967,295. For more information about configuring AS numbers, see the JUNOS Routing Protocols Configuration Guide.
In the following 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 the configuration for AS 1, prepend multiple AS numbers:

