The apply tunnel-policy command applies a tunnel policy to routes filtered by the if-match clause.
The undo apply tunnel-policy command cancels the setting.
By default, no tunnel policy is configured for filtered routes.
Parameter | Description | Value |
---|---|---|
tunnel-policy-name | Specifies the name of a tunnel policy to be applied to the routes that match the if-match clause. | 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
The RR on the backbone network of a VPN needs to apply a tunnel policy to VPNv4 routes learned from PEs.
if-match ip next-hop (tunnel-selector view)
The command filters IPv4 routes by next hop.if-match ipv6 next-hop (tunnel-selector view)
The command filters IPv6 routes by next hop.if-match rd-filter
The command filters routes by RD.Prerequisite
The tunnel-selector command is run to create a tunnel selector; if-match clauses are configured as needed.
Follow-up Procedure
If the tunnel policy specified in the apply tunnel-policy command does not exist in the system, run the tunnel-policy command to create the tunnel policy.
# Select policy1 for the VPN routes that are filtered by RD in the tunnel selector view.
<HUAWEI> system-view [HUAWEI] tunnel-policy policy1 [HUAWEI-tunnel-policy-policy1] tunnel select-seq cr-lsp lsp load-balance-number 1 [HUAWEI-tunnel-policy-policy1] quit [HUAWEI] tunnel-selector tps permit node 10 [HUAWEI-tunnel-selector] if-match rd-filter 1 [HUAWEI-tunnel-selector] apply tunnel-policy policy1