The reflect change-path-attribute command enables an route-reflector (RR) to modify the route attributes of BGP routes using the export policy.
The undo reflect change-path-attribute command disables an RR from modifying the route attributes of BGP routes using the export policy.
By default, an RR is disabled from modifying route attributes of BGP routes using the export policy.
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast 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-VPNv6 address family view, BGP L2VPN-AD address family view
Usage Scenario
Using an RR to modify route attributes may cause route loops. According to RFC 4456, you cannot enable an RR to modify the route attributes using the export policy. So an RR is disabled from modifying route attributes using the export policy by default.
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 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.
[HUAWEI] bgp 65001
[HUAWEI-bgp] peer 10.1.1.2 next-hop-local
[HUAWEI] route-policy aa permit node 10
[HUAWEI-route-policy] apply ip-address next-hop 10.3.3.3
[HUAWEI-route-policy] quit
[HUAWEI] bgp 65001
[HUAWEI-bgp] peer 10.1.1.2 route-policy aa export
Before the reflect change-path-attribute command is run, the former configuration takes effect but the latter does not. After A receives routes information from its IBGP peers, it reflects the information to Switch B, and changes the next hop to 10.1.1.1.
After the reflect change-path-attribute command is run, the latter configuration takes effect but the former does not. After A receives routes information from its IBGP peers, it reflects the information to Switch B, and changes the next hop to 10.3.3.3.
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.