if-match packet-length

Function

The if-match packet-length command configures a packet-length-based matching rule for a BGP (IPv6) Flow Specification route or BGP VPN Flow Specification route to filter packets.

The undo if-match packet-length command deletes a packet-length-based matching rule from a BGP (IPv6) Flow Specification route or BGP VPN Flow Specification route.

By default, no packet-length-based matching rule is configured for a BGP (IPv6) Flow Specification route or BGP VPN Flow Specification route to filter packets.

Format

if-match packet-length { greater-than | less-than | equal } packet-length-value

if-match packet-length greater-than packet-length-value less-than upper-packet-length-value

undo if-match packet-length [ { greater-than | less-than | equal } packet-length-value ]

undo if-match packet-length greater-than packet-length-value less-than upper-packet-length-value

Parameters

Parameter Description Value
greater-than

Matches packets with a length greater than a specified value.

-

less-than

Matches packets with a length less than a specified value.

-

equal

Matches packets of a specified length.

-

packet-length-value

Specifies a packet length.

The value is an integer ranging from 0 to 9600.

upper-packet-length-value

Specifies the upper limit of a packet length.

The value is an integer ranging from 0 to 9600, in bytes.

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

To configure a packet-length-based matching rule for a BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route to filter packets, run the if-match packet-length command. The action specified in the apply clause is implemented only on the packets that match the if-match clause.

Prerequisites

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

Configuration Impact

After you configure the flow-route ipv6 command, this command cannot be executed and a prompt message is displayed if being manually configured, and this command can be successfully executed if being dynamically delivered. However, this command does not take effect.

Precautions

A maximum of five filtering rules based on the packet length can be configured for a BGP Flow Specification route.

Example

# Configure a filtering rule that is based on a packet length range for the BGP VPN Flow Specification route Rule1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1 vpn-instance va
[*HUAWEI-flow-route-va] if-match packet-length greater-than 25 less-than 50
# Configure a packet-length-based matching rule for BGP Flow Specification route Rule1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1
[*HUAWEI-flow-route] if-match packet-length greater-than 25
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >