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.
Usage Scenario
Generally, 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 routing loop count.
After the peer allow-as-loop command is run to set the number of times the local AS number is repeated, the BGP speaker allows the routes with repeated AS numbers in the AS_Path attribute to pass, meeting the requirements of special scenarios.Prerequisites
Peer relationships have been established using the peer as-number command.
Configuration Impact
If the peer allow-as-loop command is run for a peer multiple times, the latest configuration overrides the previous one.
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv6-family [*HUAWEI-vpn-instance-vpn1-af-ipv6] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv6] quit [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv6-family vpn-instance vpna [*HUAWEI-bgp-6-vpna] peer 2001:DB8:1::1 as-number 100 [*HUAWEI-bgp-6-vpna] peer 2001:DB8:1::1 allow-as-loop 2