< Home

reflect change-path-attribute

Function

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.

Format

reflect change-path-attribute

undo reflect change-path-attribute

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

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.

To re-plan the network traffic, run the reflect change-path-attribute command to enable the RR to modify the route attributes using the export policy. After the command is run, the following configurations take effect.
  • Run the apply as-path command to modify the AS-Path attributes of BGP routes.
  • Run the apply comm-filter delete command to delete all community attributes from BGP routes.
  • Run the apply community command to modify the community attributes of BGP routes.
  • Run the apply cost command to modify the cost of BGP routes, that is to modify its MED.
  • Run the apply ip-address next-hop command to modify the next hop of BGP routes.
  • Run the apply ipv6 next-hop command to modify the next hop of BGP4+ routes.
  • Run the apply local-preference command to modify the local preference of BGP routes.
  • Run the apply origin command to modify the Origin attributes of BGP routes.
  • Run the apply extcommunity command to modify the extended community attributes of BGP routes.

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.

For example, peer relationships are established between Switch A(10.1.1.1) and Switch B(10.1.1.2), and Switch A functions as an RR. If two configurations are on SwitchA:
  1. [HUAWEI] bgp 65001
    [HUAWEI-bgp] peer 10.1.1.2 next-hop-local
  2. [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
Then:
  • 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.

Example

# Enable the RR to modify the route attributes of the BGP routes by using the export policy.

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