Run the peer { ipv6-address | group-name } next-hop-invariable command to configure the device not to change the next hop when advertising routes to the specified EBGP peer or run the peer { ipv6-address | group-name } next-hop-invariable [ include-static-route | include-unicast-route ] * command. If the peer next-hop-invariable include-static-route command is run, the BGP speaker retains the original next hop address of an imported public network static route when advertising the route to an IBGP peer under the condition that the original next hop address is valid; if the original next hop address of the static route is invalid, the public network static route recurses to a VPN route, or the public network static route is imported from a VPN instance, the BGP speaker uses its interface address as the next hop of the route.
If the peer next-hop-invariable include-unicast-route command is run, the BGP speaker does not change the next hop address when advertising to an EBGP peer the unicast routes learned from another peer.
On the network shown in
Figure 1, a BGP LSP is established between PE1 and PE2.
VPNv6 routes are exchanged between PE1 and RR1, between RR1 and RR2, and between RR2 and PE2 through BGP-
VPNv6 peer relationships.
Figure 1 Inter-AS VPN Option C networking with RRs deployed
Assume that PE1 needs to advertise a
VPNv6 route to PE2. The route will be advertised through the following process:
- PE1 advertises the route to RR1, with the route next hop being PE1.
- Upon receipt, RR1 changes the route next hop to itself and then advertises the route to RR2 through the EBGP peer relationship.
- RR2 advertises the received route to its IBGP peer PE2. By default, the router changes the next hop of a labeled route received from an EBGP peer before advertising the route to an IBGP peer. Therefore, RR2 changes the next hop of the route to itself before advertising the route to PE2.
The next hop of the
VPNv6 route received by PE2 is RR2. However, the destination of the BGP LSP is PE1. As a result, the
VPNv6 route on PE2 cannot recurse to the BGP LSP, causing traffic interruption.
To solve the preceding problem, run the peer next-hop-invariable command on RR1 to ensure that RR1 does not change the next hop address when advertising routes to RR2. In addition, run the peer next-hop-invariable command on RR2 to ensure that the next hop of the route advertised by RR2 to PE2 is not changed. In this way, the next hop of the VPNv6 route received by PE2 remains PE1, and the route can recurse to the BGP LSP properly.
Similar to the preceding process, if PE2 also attempts to advertise a VPNv6 route to PE1, run the peer next-hop-invariable command on both RR2 and RR1 so that RR2 does not change the next hop before advertising the route to RR1 and RR1 does not change the next hop before advertising the route to PE1. In this way, the VPNv6 route received by PE1 remains PE2, and the route can recurse to the BGP LSP properly.