The if-match port command configures a filtering rule based on the port number.
The undo if-match port command deletes the filtering rule based on the port number.
By default, no filtering rule based on the port number is configured.
Parameter | Description | Value |
---|---|---|
greater-than |
Indicates that the port number is greater than the specified one. |
- |
less-than |
Indicates that the port number is smaller than the specified one. |
- |
equal |
Indicates that the port number is equal to the specified one. |
- |
port |
Specifies the port number. |
The value is an integer ranging from 0 to 65535. |
upper-port-value |
Specifies the upper limit of a port number. |
The value is an integer ranging from 0 to 65535. |
Usage Scenario
The if-match port command is used to configure a filtering rule based on the port number for a BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route. The traffic behavior specified in the apply clause applies to the traffic whose source or destination port number matches the specified port number.
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 port number is within the range, because if the port number is beyond the range, protocol packets sent or received by the port cannot be forwarded.
A maximum of five filtering rules based on the port number can be configured for a BGP Flow Specification route.<HUAWEI> system-view [~HUAWEI] flow-route Rule1 vpn-instance va [*HUAWEI-flow-route-va] if-match port greater-than 16 less-than 53
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 ipv6 [*HUAWEI-flow-route-ipv6] if-match port equal 179
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 [*HUAWEI-flow-route] if-match port equal 179