local-as
Syntax
local-as autonomous-system <loops number> <private | alias> <no-prepend-global-as>;
Hierarchy Level
[edit logical-systems logical-system-name protocols bgp], [edit logical-systems logical-system-name protocols bgp group group-name], [edit logical-systems logical-system-name protocols bgp group group-name neighbor address], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp group group-name], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp group group-name neighbor address], [edit protocols bgp], [edit protocols bgp group group-name], [edit protocols bgp group group-name neighbor address], [edit routing-instances routing-instance-name protocols bgp], [edit routing-instances routing-instance-name protocols bgp group group-name], [edit routing-instances routing-instance-name protocols bgp group group-name neighbor address]
Description
Specify the local autonomous system (AS) number. An AS is a set of routing devices that are under a single technical administration and generally use a single interior gateway protocol (IGP) and metrics to propagate routing information within the set of routing devices.
Internet service providers (ISPs) sometimes acquire networks that belong to a different AS. When this occurs, there is no seamless method for moving the BGP peers of the acquired network to the AS of the acquiring ISP. The process of configuring the BGP peers with the new AS number can be time-consuming and cumbersome. In this case, it might not be desirable to modify peer arrangements or configuration. During this kind of transition period, it can be useful to configure BGP-enabled devices in the new AS to use the former AS number in BGP updates. This former AS number is called a local AS.
If you are using BGP on the routing device, you must configure
an AS number before you specify the local-as
number.
In Junos OS Release 9.1 and later, the AS numeric range in plain-number format is extended to provide BGP support for 4-byte AS numbers, as defined in RFC 4893, BGP Support for Four-octet AS Number Space.
In Junos OS Release 9.3 and later, you can also configure a 4-byte AS number using the AS-dot notation format of two integer values joined by a period: <16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number of 65546 in plain-number format is represented as 1.10 in the AS-dot notation format.
The auto route target feature does not support the local AS number for BGP neighbors associated with the Ethernet Virtual Private Network Instance (EVI).
Options
alias |
(Optional)
Configure the local AS as an alias of the global AS number configured
for the router at the Note:
The |
autonomous-system |
AS number.
|
loops number |
(Optional) Specify the number of times detection of
the AS number in the AS_PATH attribute causes the route to be discarded
or hidden. For example, if you configure The behavior of this statement is slightly different from the loops (BGP Address Family) statement. Note:
If you configure the local AS values for any BGP group, the detection of routing loops is performed using both the AS and the local AS values for all BGP groups. If the local AS for the EBGP or IBGP peer is the same as the
current AS, do not use the When you configure the local AS within a VRF, this impacts the
AS path loop-detection mechanism. All of the
|
no-prepend-global-as |
(Optional) Specify to strip the global AS and to prepend only the local AS in AS paths sent to external peers. |
private |
(Optional) Configure to use the local AS only during the establishment of the BGP session with a BGP neighbor but to hide it in the AS path sent to external BGP peers. Only the global AS is included in the AS path sent to external peers. Note:
The |
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Release Information
Statement introduced before Junos OS Release 7.4.
alias
option introduced in Junos OS Release 9.5.
loops
and no-prepend-global-as
options
introduced in Junos OS Release 9.6.