The nexthop recursive-lookup command configures next hop iteration based on the routing policy.
The undo nexthop recursive-lookup command restores the default setting.
By default, BGP does not perform next hop iteration based on the routing policy.
nexthop recursive-lookup route-policy route-policy-name
undo nexthop recursive-lookup route-policy
Parameter | Description | Value |
---|---|---|
route-policy route-policy-name | Indicates the name of a routing policy. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
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
Usage Scenario
BGP needs to iterate indirect next hops. If an indirect next hop is not iterated based on a routing policy, the BGP route may be iterated to an incorrect forwarding path, causing traffic loss. Therefore, next hops should be iterated according to certain conditions to control the iterated routes.
The nexthop recursive-lookup route-policy route-policy-name command can be run to control the iterated next hop based on a routing policy. If an iterated route is filtered out by the routing policy, the route is considered unreachable. In this manner, the BGP route will not be iterated to an incorrect forwarding path.
Prerequisites
The next hop to which a BGP route is iterated has been determined and a routing policy has been configured.
Before configuring a routing policy, ensure that all desirably iterated routes cannot be filtered out by the routing policy. If some desirably iterated routes are filtered out by the routing policy, the BGP route may be considered unreachable by mistake and traffic cannot be forwarded over the route.
Precautions
The command does not apply to the routes received from directly connected EBGP peers or LinkLocal peers.
Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, route iteration is not restricted.