reflect change-path-attribute (BGP-EVPN address family view)

Function

The reflect change-path-attribute command enables an RR to modify path attributes of BGP routes through an export policy.

The undo reflect change-path-attribute command disables an RR from modifying path attributes of BGP routes through an export policy.

By default, an RR is disabled from modifying path attributes of BGP routes through an export policy.

Format

reflect change-path-attribute

undo reflect change-path-attribute

Parameters

None

Views

BGP-EVPN address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

According to standard protocols, RRs are disabled from modifying path attributes through an export policy; otherwise, routing loops may occur. Therefore, by default, an export policy cannot be configured on an RR to modify path attributes.

To enable an RR to modify path attributes of BGP routes through an export policy, run the reflect change-path-attribute command. The attributes that can be modified are as follows:

  • The apply as-path command modifies the AS_Path attribute of BGP routes.
  • The apply comm-filter delete command deletes a community attribute from BGP routes.
  • The apply community command modifies a community attribute of BGP routes.
  • The apply cost command modifies the MED of BGP routes.
  • The apply ip-address next-hop command modifies the next hop of BGP routes.
  • The apply ipv6 next-hop command modifies the next hop of BGP4+ routes.
  • The apply local-preference command modifies the Local_Pref of BGP routes.
  • The apply origin command modifies the origin attribute of BGP routes.
  • The apply extcommunity command modifies the VPN-Target extcommunity attribute of BGP routes.
  • The apply extcommunity soo command modifies the SoO extcommunity attribute of BGP routes.

    If the undo reflect change-path-attribute command is run, the preceding configurations on the RR do not take effect.

Precautions

Export policies on the RR do not take effect before the reflect change-path-attribute command is run. After the reflect change-path-attribute command is run, these configurations may take effect and affect BGP route selection. Exercise caution when using this command.

For example, an IBGP connection is established between A (1.1.1.1) and B (1.1.1.2), and A functions as an RR. If the following configurations exist on A:

#

route-policy aa permit node 10

apply ip-address next-hop 1.1.1.1

#

bgp 65001

peer 1.2.2.2 route-policy aa export

#

Then:

  • If the reflect change-path-attribute command is not run, A reflects routes advertised by other IBGP peers to B without changing the next hops of these routes.
  • If the reflect change-path-attribute command is run, A changes the next hops of the routes advertised by other IBGP peers to 1.1.1.1 before reflecting these routes to B.

    Note:

    After you enable the reflect change-path-attribute command on the RR, the peer route-policy export command takes precedence over the peer next-hop-invariable and peer next-hop-local.

Example

# In the BGP-EVPN address family view, enable an RR to modify the path attributes of BGP routes using an export policy.
<HUAWEI> system-view
[~HUAWEI] bgp 65001
[*HUAWEI-bgp] l2vpn-family evpn
[*HUAWEI-bgp-af-evpn] reflect change-path-attribute
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >