< Home

peer allow-as-loop (BGP)

Function

The peer allow-as-loop command configures the repeating times of local AS number.

The undo peer allow-as-loop command cancels the function.

By default, it is not allowed to repeat the local AS number.

Format

peer { group-name | ipv4-address | ipv6-address } allow-as-loop [ number ] [ global-as [ vpn-as ] ]

undo peer { group-name | ipv4-address | ipv6-address } allow-as-loop [ number ] [ global-as [ vpn-as ] ]

Parameters

Parameter Description Value

group-name

Specifies the name of the peer group.

The name is a string of 1 to 47 characters without any space. It is case-sensitive.

ipv4-address

Specifies the IPv4 address of the peer.

-

ipv6-address

Specifies the IPv6 address of the peer.

-

number

Specifies the repeating times of local AS number.

The value is an integer ranging from 1 to 10. By default, the value is 1.

global-as

Indicates a global AS number.

-

vpn-as

Indicates a VPN instance AS number.

-

  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPN-Target address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

  • The global-as and vpn-as parameters apply only to BGP VPN instance IPv4 and BGP VPN instance IPv6 address family views.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv4 address family view, BGP-VPN-Target address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP uses AS numbers to detect routing loops. 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.

Configuration Impact

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

Example

# Set the repeating times of local AS number to 2.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] peer 1.1.1.2 allow-as-loop 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >