The route recursive-lookup tunnel command enables tunnel recursion.
The undo route recursive-lookup tunnel command restores the default configuration.
By default, tunnel recursion is disabled.
Parameter | Description | Value |
---|---|---|
ip-prefix ip-prefix-name |
Specifies the name of an IP prefix list. |
The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
tunnel-policy policy-name |
Specifies the name of a tunnel policy. |
The value is a string of 1 to 39 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
By default, a IPv4 static route or an unlabeled BGP IPv4 public route can only recurse to an outbound interface or next hop but not to a tunnel. To allow such a route to preferentially recurse to a tunnel, run the
route recursive-lookup tunnel command. If no tunnel exists, the route can still recurse to an outbound interface or next hop.Precautions
If the command is run more than once, the latest configuration overrides the previous one.
A static route preferentially recurses to an IP route first. If the static route recurses to a BGP route, the static route inherits the recursion result of the BGP route and will not recurse to a tunnel. If the static route recurses to a direct route, the static route inherits the recursion result of the direct route and will not recurse to a tunnel. If the static route does not recurse to a BGP route or direct route, it recurses to a tunnel based on the tunnel policy. If the static route recurses to a network segment rather than a host route, the network segment address is used to subscribe to the tunnel. Therefore, the next hop of a static route must be a non-BGP route and a non-direct route so that the static route can recurse to a tunnel based on the next hop address, and the tunnel must be a public network tunnel. If the tunnel recursion result contains a BGP LSP, the BGP LSP is discarded. If the tunnel recursion result contains other types of tunnels, other types of tunnels are selected. Otherwise, the IP recursion result is selected. This command and the unicast-route recursive-lookup tunnel command are mutually exclusive.<HUAWEI> system-view [~HUAWEI] ip ip-prefix px1 permit 10.0.192.0 8 greater-equal 17 less-equal 18 [*HUAWEI] tunnel-policy tp1 [*HUAWEI-tunnel-policy-tp1] tunnel select-seq cr-lsp lsp load-balance-number 2 [*HUAWEI-tunnel-policy-tp1] quit [*HUAWEI] route recursive-lookup tunnel ip-prefix px1 tunnel-policy tp1