Related Documentation
- M, MX, PTX, T Series
- 4-Byte Autonomous System Numbers Overview
- Configuring 4-Byte AS Numbers and BGP Extended Community Attributes
- Configuring 4-Byte Autonomous System Numbers
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 2-Byte AS Number
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 4-Byte AS Number
- Juniper Networks Implementation of 4-Byte Autonomous System Numbers
- Understanding 4-Byte AS Numbers and Route Distinguishers
- Understanding 4-Byte AS Numbers and Route Loop Detection
- Understanding a 4-Byte Capable Router AS Path Through a 2-Byte Capable Domain
Prepending 4-Byte AS Numbers in an AS Path
This section describes how to prepend one or more 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 Figure 1, Router 2 is configured to prepend AS 1000000000 4 times in front of AS number 65000.
Figure 1: EBGP With 4-Byte AS Numbers Prepended to the AS Path

You can display the route details using the show route command on Router 3. In the following example, notice that the prepended AS number displayed in the AS path on Router 3 is the AS_TRANS number, AS 23456. This is because Router 3 does not support 4-byte AS numbers.
user@Router3# show route 1.2.3.4 detail
... 1.2.3.4/32 *[BGP/170] 01:39:55, localpref 100, from 192.168.1.3 AS path: 65000 23456 23456 23456 23456 I
You can display the route details using the show route command on Router 4. In the following example, notice that the prepended AS number displayed in the AS path on Router 4 is AS 1000000000. This is because Router 4 supports 4-byte AS numbers and merges the AS_PATH and AS4_PATH attributes.
user@Router4# show route 1.2.3.4 detail
... 1.2.3.4/32 *[BGP/170] 01:39:55, localpref 100, from 192.168.1.9 AS path: 65056 65000 1000000000 1000000000 1000000000 1000000000 I
Related Documentation
- M, MX, PTX, T Series
- 4-Byte Autonomous System Numbers Overview
- Configuring 4-Byte AS Numbers and BGP Extended Community Attributes
- Configuring 4-Byte Autonomous System Numbers
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 2-Byte AS Number
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 4-Byte AS Number
- Juniper Networks Implementation of 4-Byte Autonomous System Numbers
- Understanding 4-Byte AS Numbers and Route Distinguishers
- Understanding 4-Byte AS Numbers and Route Loop Detection
- Understanding a 4-Byte Capable Router AS Path Through a 2-Byte Capable Domain
Published: 2012-11-14
Related Documentation
- M, MX, PTX, T Series
- 4-Byte Autonomous System Numbers Overview
- Configuring 4-Byte AS Numbers and BGP Extended Community Attributes
- Configuring 4-Byte Autonomous System Numbers
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 2-Byte AS Number
- Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 4-Byte AS Number
- Juniper Networks Implementation of 4-Byte Autonomous System Numbers
- Understanding 4-Byte AS Numbers and Route Distinguishers
- Understanding 4-Byte AS Numbers and Route Loop Detection
- Understanding a 4-Byte Capable Router AS Path Through a 2-Byte Capable Domain