The if-match rd-filter command sets a matching rule that is based on the Route Distinguisher (RD) filter.
The undo if-match rd-filter command cancels the configuration.
By default, no route filtering based on the RD is configured.
| Parameter | Description | Value |
|---|---|---|
| rd-filter-number | Specifies the number of the RD filter. | The value is an integer ranging from 1 to 255. |
Usage Scenario
The if-match rd-filter command must be used with the ip rd-filter command so that the matching rule configured through the if-match rd-filter command to filter routes received from neighbors based on the RD filter can take effect. For example:
If the if-match rd-filter 1 command is used but rd-filter 1 is not configured, all routes are permitted.
If the if-match rd-filter 1 command is used after the ip rd-filter 1 permit 1:1 command is used, the routes with the RD being 1:1 are permitted.
Prerequisites
The if-match rd-filter command can be used only after the route-policy command or the tunnel-selector is used.
Configuration Impact
When you filter routes based on the RDs, the routes that match the matching rule are permitted and the routes that do not match the matching rule are denied.
# Define a rule to match the RD filter.
<sysname> system-view
[sysname] route-policy abc permit node 10
[sysname-route-policy] if-match rd-filter 1
<sysname> system-view
[sysname] tunnel-selector tps permit node 10
[sysname-tunnel-selector] if-match rd-filter 1