loops (BGP Address Family)
Syntax
loops number;
Hierarchy Level
[edit logical-systems logical-system-name protocols bgp family address-family], [edit logical-systems logical-system-name protocols bgp group group-name family address-family], [edit logical-systems logical-system-name protocols bgp group group-name neighbor address family address-family], [edit protocols bgp family address-family], [edit protocols bgp group group-name family address-family], [edit protocols bgp group group-name neighbor address family address-family]
Description
For the specified BGP address family, allow the local device’s AS number in the received AS paths
and specify the number of times the detection of the local device’s AS in the
AS_PATH attribute is allowed. If the count exceeds the specified loop count, the
system discards this route. For example, if you configure loops 1,
the route is discarded if the local
device's AS number is detected in the path more than once. This prevents routing
loops and is the default behavior. If you configure loops 2, the
route is discarded if the local device's AS number is detected more than 2 times.
For debugging, you can configure the keep all option
If you want to hide this route.
Some examples of BGP address families are as follows:
inet unicastinet-vpn multicastinet6 anyl2vpn auto-discovery-only...
This list is truncated for brevity. For a complete list of protocol
families for which you can specify the loops statement,
enter the help apropos loops configuration command at the [edit protcols bgp] hierarchy level on your device.
[edit protocols bgp]
user@host# help apropos loops
set family inet unicast loops
Allow local AS in received AS paths
set family inet unicast loops <loops>
AS-Path loop count
set family inet multicast loops
Allow local AS in received AS paths
set family inet multicast loops <loops>
AS-Path loop count
set family inet flow loops
Allow local AS in received AS paths
set family inet flow loops <loops>
AS-Path loop count
set family inet any loops
Allow local AS in received AS paths
set family inet any loops <loops>
AS-Path loop count
set family inet labeled-unicast loops
Allow local AS in received AS paths
...When you configure the loops statement for a specific BGP
address family, that value is used to evaluate the AS path for routes received
by a BGP peer for the specified address family, rather than the loops value
configured for the global AS number with the loops statement at
the [edit routing-options autonomous-system as-number]
hierarchy level.
Options
number—Maximum
number of times that the local device’s AS number is allowed
in the AS_PATH attribute to accept the route.
Range: 1 through 10
Default: None. The system does not take any action unless the
loops (BGP Address Family)statement is configured.
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 9.6.