The peer allow-as-loop command sets the number of local AS number repetitions.
The undo peer allow-as-loop command cancels the configuration.
By default, the local AS number cannot be repeated.
Parameter | Description | Value |
---|---|---|
group-name |
Specifies the name of a BGP EVPN peer group. |
The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
number |
Specifies the number of local AS number repetitions. |
The value is an integer ranging from 1 to 10. The default value is 1. |
Usage Scenario
BGP uses AS numbers to detect routing loops. The AS numbers in the AS_Path of each received route are matched against the local AS number configured using the bgp command and the fake AS number configured using the peer fake-as command. The largest number of times any of the configured AS numbers is repeated is considered as the maximum number. In the Hub and Spoke networking, if EBGP runs between a Hub-PE and a Hub-CE on a Hub site, the route sent from the Hub-PE to the Hub-CE carries the AS number of the Hub-PE. If the Hub-CE sends a routing update to the Hub-PE, the Hub-PE will deny it because the routing update contains the AS number of the Hub-PE.
To ensure proper route transmission in the Hub and Spoke networking, configure all the BGP peers on the path, along which the Hub-CE advertises private network routes to the Spoke-CE, to accept the routes in which the AS number repeats once.Prerequisites
The specified peer group has been enabled in the BGP-EVPN address family view.
Configuration Impact
If the peer allow-as-loop command is run for a peer group multiple times, the latest configuration overrides the previous one.
Precautions
The peer allow-as-loop command does not apply to IBGP peers or sub-confederation BGP peers. The command only checks whether routes received from EBGP peers and sub-confederation EBGP peers carry the local AS number. If the command is not run, the implementation is equivalent to the peer allow-as-loop 0 configuration. The minimum value is 2 and the value 1 has no configuration display.
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] group gp external [*HUAWEI-bgp] peer 10.1.1.9 as-number 200 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] peer 10.1.1.9 enable [*HUAWEI-bgp-af-evpn] peer gp enable [*HUAWEI-bgp-af-evpn] peer 10.1.1.9 group gp [*HUAWEI-bgp-af-evpn] peer gp allow-as-loop 2