CX320 Switch Module V100R001 Command Reference 14
if-match ipv6
Function
The if-match ipv6 command sets a matching rule that is based on IPv6 information.
The undo if-match ipv6 command deletes the matching rule based on specified IPv6 information.
By default, no matching rule based on IPv6 information is set.
Format
if-match ipv6 { address | next-hop | route-source } { acl { acl-number | acl-name } | prefix-list ipv6-prefix-name }
undo if-match ipv6 { address | next-hop | route-source } { acl { acl-number | acl-name } | prefix-list ipv6-prefix-name }
Parameters
Parameter | Description | Value |
---|---|---|
address | Matches the destination address of IPv6 routes. | - |
next-hop | Matches the next hop of IPv6 routes. | - |
route-source | Matches the source address of the advertised IPv6 routes. | - |
acl | Specifies the ACL for route filtering. | - |
acl-number | Specifies the number of a basic ACL. | The value is an integer ranging from 2000 to 2999. |
acl-name | Specifies the name of a named ACL. | The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive). |
prefix-list | Specifies the IP prefix list. | - |
ipv6-prefix-name | Specifies the name of the IPv6 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 Guidelines
Usage Scenario
If the if-match ipv6 next-hop prefix-list aa command is used but the ip ipv6-prefix aa is not configured, all routes are permitted. This is the same case when the ACL is used.
If the if-match ipv6 next-hop prefix-list aa command is used after the ip ipv6-prefix aa permit fc00:0:0:1::1 128 command is used, the routes with the next hop address being FC00:0:0:1::1 are permitted. This is the same case when the ACL is used.
Prerequisites
The if-match ipv6 command can be used only after the route-policy command is used.
Before using the if-match ipv6 command, you must use the ip ipv6-prefix command to configure an IPv6 prefix.
Configuration Impact
When you filter routes based on the destination addresses, next hop addresses, or source addresses of IPv6 routes, the routes that match the matching rule are permitted and the route that do not match the matching rule are denied.
If the next hop address or source address of a route to be filtered is 0::0, by default, the system matches the route considering that its mask length is 0.
For a named ACL, when the rule command is used to configure a filtering rule, the filtering rule is effective only with the source address range that is specified by the source parameter and with the time period that is specified by the time-range parameter.
Example
# Define an if-match clause to match the related IPv6 routing information.
<HUAWEI> system-view
[~HUAWEI] route-policy policy permit node 10
[*HUAWEI-route-policy] if-match ipv6 address prefix-list p1
[*HUAWEI-route-policy] if-match ipv6 next-hop prefix-list p1
[*HUAWEI-route-policy] if-match ipv6 route-source prefix-list p1
# Define a rule to match the routes with the IPv6 routing information in ACL 2000.
<HUAWEI> system-view
[~HUAWEI] route-policy policy permit node 10
[*HUAWEI-route-policy] if-match ipv6 address acl 2000
[*HUAWEI-route-policy] if-match ipv6 next-hop acl 2000
[*HUAWEI-route-policy] if-match ipv6 route-source acl 2000