The if-match ip-prefix command creates a matching rule based on the IP prefix list.
The undo if-match ip-prefix command deletes the matching rule based on the specified IP prefix list.
By default, no matching rule based on the IP prefix list is configured in the routing policy.
Parameter | Description | Value |
---|---|---|
ip-prefix-name | Specifies the name of an IP address 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. |
Usage Scenario
The routing policy matches routes using the IP prefix list. Routes are either permitted or denied.
The ip ip-prefix command must be used so that the matching rule can take effect. For example:
Prerequisites
The if-match ip-prefix command can be used only after the route-policy command is used.
Precautions
The routing policy matches routes based on IP prefix information. Routes that match the IP prefix information will be checked by other if-match clauses of this node. Routes that do not match the IP prefix information will be checked by the next node.
The if-match acl and if-match ip-prefix commands cannot be used together in the same node of a routing policy, because the latest configuration will override the previous one.
Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes match the IP prefix list.