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

Function

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

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

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

Format

reflect change-path-attribute

undo reflect change-path-attribute

Parameters

None

Views

BGP-Labeled 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 route attributes through an export policy; otherwise, routing loops may occur. Therefore, by default, an export policy cannot be configured on an RR to modify route attributes.

To enable an RR to modify route attributes of BGP routes through an export policy, run the reflect change-path-attribute command. The route 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

If an export policy is configured on an RR, the configuration does not take effect unless the reflect change-path-attribute command is run. If an export policy and the reflect change-path-attribute command are configured on an RR, the BGP route selection may be affected. Therefore, exercise caution when using the command.

For example, Device A (with IP address 1.1.1.1) and Device B (with IP address 1.1.1.2) are IBGP peers, and Device A functions as an RR. If the following configurations exist on Device A:

[*HUAWEI] route-policy aa permit node 10

[*HUAWEI-route-policy] apply ip-address next-hop 1.1.1.1

[*HUAWEI-route-policy] quit

[*HUAWEI] bgp 65001

[*HUAWEI-bgp] peer 1.1.1.2 route-policy aa export

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

    NOTE:

    After the reflect change-path-attribute command is run on an RR, the peer route-policy export command takes precedence over the peer next-hop-invariable or peer next-hop-local command.

Example

# Enable an RR to modify route attributes of BGP labeled routes through an export policy.
<HUAWEI> system-view
[~HUAWEI] bgp 65001
[*HUAWEI-bgp] ipv4-family labeled-unicast
[*HUAWEI-bgp-af-ipv4-labeled] reflect change-path-attribute
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >