When an Autonomous System Boundary Router (ASBR) forwards the route learned from an EBGP peer to an IBGP peer, the ASBR does not change the next hop of the route by default. When the IBGP peer receives this route, it finds the next hop unreachable, sets the route to inactive, and does not use this route to guide traffic forwarding. To enable the IBGP peer to use this route to guide traffic forwarding, configure the ASBR to set its IP address as the next hop of the route when the ASBR forwards this route to the IBGP peer. After the IBGP peer receives the route from the ASBR, it finds the next hop of the route reachable, sets the route to active, and uses this route to guide traffic forwarding.
When a BGP route changes, BGP needs to iterate the indirect next hop of the route again. If no restriction is imposed on the iterated route, BGP may iterate the next hop to an incorrect forwarding path, causing traffic loss. To prevent traffic loss, configure routing policy-based route iteration.
The system view is displayed.
The BGP view is displayed.
Run ipv4-family { unicast | multicast }
The IPv4 address family view is displayed.
Run ipv6-family [ unicast ]
The IPv6 address family view is displayed.
Run peer { ipv4-address | group-name | ipv6-address } next-hop-local
A BGP device is configured to set its IP address as the next hop when the device advertises routes to an IBGP peer or an IBGP peer group.
By default, a BGP device does not change the next-hop address when advertising routes to its IBGP peers.
Run nexthop recursive-lookup route-policy route-policy-name
Routing-policy-based next hop iteration is configured.
By default, routing-policy-based next hop iteration is not configured.
Run the peer { ipv4-address | group-name } next-hop-invariable command in the IPv4 unicast address family view:
The device is prevented from changing the next-hop address of a route imported from an IGP before advertising the route to an IBGP peer.
By default, a device changes the next-hop address of a route imported from an IGP to the address of the interface connecting the device to its peer when advertising the route to an IBGP peer.
The nexthop recursive-lookup route-policy route-policy-name command does not take effect for the routes received from directly connected EBGP peers.