HP MSR2000/3000/4000 Router Series Layer 3 - IP Routing Command Reference

345
Usage guidelines
By default, BGP does not receive routes that contain the local AS number in the AS_PATH attribute to
avoid routing loops. However, in certain network environments (a Hub&Spoke network in MPLS L3VPN,
for example), the AS_PATH attribute of a route from a peer must be allowed to contain the local AS
number. Otherwise, the route cannot be advertised correctly.
Examples
# In BGP IPv4 unicast address family view, configure the number of times the local AS number can
appear in AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family ipv4 unicast
[Sysname-bgp-ipv4] peer test allow-as-loop 2
# In BGP VPNv4 address family view, configure the number of times the local AS number can appear in
AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family vpnv4
[Sysname-bgp-vpnv4] peer test allow-as-loop 2
# In BGP-VPN IPv6 unicast address family view, configure the number of times the local AS number can
appear in AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] address-family ipv6 unicast
[Sysname-bgp-ipv6-vpn1] peer test allow-as-loop 2
# In BGP L2VPN address family view, configure the number of times the local AS number can appear in
AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family l2vpn
[Sysname-bgp-l2vpn] peer test allow-as-loop 2
peer as-number (for a BGP peer)
Use peer as-number to create a BGP peer and specify its AS number.
Use undo peer to delete a BGP peer.
Syntax
peer { ip-address | ipv6-address } as-number as-number
undo peer { ip-address | ipv6-address }
Default
No BGP peer is created.
Views
BGP view, BGP-VPN instance view