peer allow-as-loop (BGP-LS address family view)

Function

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, local AS number repetition is not allowed.

Format

peer peerIpv4Addr allow-as-loop [ num ]

peer peerIpv6Addr allow-as-loop [ num ]

undo peer peerIpv4Addr allow-as-loop

undo peer peerIpv6Addr allow-as-loop

Parameters

Parameter Description Value
peerIpv4Addr

Specifies the IPv4 address of a BGP peer.

The value is in dotted decimal notation.

num

Specifies the maximum number of times the local AS number can be repeated in the AS_Path of each received route.

The value is an integer in the range from 1 to 10. The default value is 1.

peerIpv6Addr

Specifies the IPv6 address of a peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

Views

BGP-LS address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

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. However, in Hub and Spoke networking, if EBGP runs between a Hub-PE and a Hub-CE, the routes that the Hub-PE sends to the Hub-CE carry the AS number of the Hub-PE; if the Hub-CE sends an Update message to the Hub-PE, the Hub-PE discards the message because the message includes 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 VPN routes to the Spoke-CE, to accept the routes that contain the local AS number as long as the number of repetitions in each route is within the default limit (1).

Prerequisites

Peer relationships have been established using the peer as-number command.

Configuration Impact

If the command is run for a peer or peer group multiple times, the latest configuration overrides the previous one.

Precautions

The peer allow-as-loop command enables BGP to check the count of the local AS number in the routes received from EBGP peers or confederation EBGP peers. The command does not apply to IBGP peers or sub-confederation BGP peers. If the command is not run, the implementation is equivalent to the peer allow-as-loop 0 configuration.

Example

# Set the number of local AS number repetitions to 2.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.1 as-number 100
[*HUAWEI-bgp] link-state-family unicast
[*HUAWEI-bgp-af-ls] peer 10.1.1.1 enable
[*HUAWEI-bgp-af-ls] peer 10.1.1.1 allow-as-loop 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >