if-match destination-port

Function

The if-match destination-port command configures a filtering rule based on the destination port number.

The undo if-match destination-port command deletes the filtering rule based on the destination port number.

By default, no filtering rule based on the destination port number is configured.

Format

if-match destination-port { greater-than | less-than | equal } port

if-match destination-port greater-than port less-than upper-port-value

undo if-match destination-port

undo if-match destination-port { greater-than | less-than | equal } port

undo if-match destination-port greater-than port less-than upper-port-value

Parameters

Parameter Description Value
greater-than

Indicates that the destination port number is greater than the specified one.

-

less-than

Indicates that the destination port number is smaller than the specified one.

-

equal

Indicates that the destination port number is equal to the specified one.

-

port

Specifies the destination port number of the traffic.

The value is an integer ranging from 0 to 65535.

upper-port-value

Specifies the upper limit of a destination port number.

The value is an integer ranging from 0 to 65535.

Views

Flow-Route IPv6 VPN instance view, Flow-Route VPN instance view, Flow-Route-IPv6 view, Flow-Route view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
flow-route write

Usage Guidelines

Usage Scenario

The if-match destination-port command is used to configure a filtering rule based on the destination port number for a BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route. Traffic matching the filtering rule will be controlled with the action specified by the apply clause.

Prerequisites

A static BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route has been created using the flow-route command in the system view.

Precautions

Make sure that the destination port number is within the range, because if the destination port number is beyond the range, the destination port cannot receive protocol packets;A maximum of five filtering rules based on the destination port number can be configured for a BGP Flow Specification route.

Example

# Configure a filtering rule that is based on the destination port number of 179 for the static BGP Flow Specification route Rule 1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1
[*HUAWEI-flow-route] if-match destination-port equal 179
# Configure a filtering rule that is based on a destination port number range for the static BGP Flow Specification route Rule1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1 vpn-instance va
[*HUAWEI-flow-route-va] if-match destination-port greater-than 150 less-than 200
# Configure a filtering rule that is based on the destination port number of 179 for the static BGP IPv6 Flow Specification route Rule 1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1 ipv6
[*HUAWEI-flow-route-ipv6] if-match destination-port equal 179
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >