< Home

reflect change-path-attribute

Function

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

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

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

Format

reflect change-path-attribute

undo reflect change-path-attribute

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

According to RFC 4456, if an RR is enabled to modify the route attributes based on the export policy, routing loops may occur. Therefore, an RR is disabled from modifying route attributes based on the export policy by default.

However, if you need to re-plan the network traffic, you can run the reflect change-path-attribute command to enable the RR to modify the route attributes based on the export policy. After the reflect change-path-attribute command is enabled on an RR, you can perform the following operations as required:

After the undo reflect change-path-attribute command is used, the previous configurations on the RR do not take effect.

Precautions

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

For example, a peer relationship is established between Router A (1.1.1.1) and Router B (2.2.2.2), and Router A functions as an RR. If the following export policy is configured on RouterA:
[sysname] route-policy aa permit node 10
[sysname-route-policy] apply ip-address next-hop 1.1.1.1
[sysname-route-policy] quit
[sysname] bgp 65001
[sysname-bgp] peer 2.2.2.2 route-policy aa export
Then:
  • If the reflect change-path-attribute command is not run, Router A reflects routes advertised by other IBGP peers to Router B without changing the next hops of these routes.

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

After you run 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

# Enable the RR to modify the route attributes of BGP routes based on the export policy.

<sysname> system-view
[sysname] bgp 65001
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] reflect change-path-attribute
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >