< Home

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 } prefix-list ipv6-prefix-name

undo if-match ipv6 { address | next-hop | route-source } 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.

-

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.

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The ip ipv6-prefix command must be used to configure an IPv6 prefix so that the matching rule (based on the destination addresses, next hop addresses, or source addresses of IPv6 routes) configured through the ip ipv6-prefix command can take effect. Otherwise, all routes are permitted.

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 routes 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.

    If the next hop address or source address of a route to be filtered is not 0::0, by default, the system matches the route and considers its mask length as 128.

  • Creating an IPv6 prefix list before it is referenced is recommended. If a nonexistent IPv6 prefix list is referenced using the command, all routes match the IPv6 prefix list.

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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >