The match command configures the aggregation keywords of a flexible flow statistics template.
The undo match command deletes the aggregation keywords of the flexible flow statistics template.
By default, no aggregation keyword is configured for the flexible flow statistics template.
match { source | destination } { vlan | as | port | address | mask }
match mpls top-label ip-address
match mpls label position
match { protocol | tos | direction | tcp-flag }
match { input | output } interface
match next-hop [ bgp ]
undo match { source | destination } { vlan | as | port | address | mask }
undo match mpls top-label ip-address
undo match mpls label position
undo match { protocol | tos | direction | tcp-flag }
undo match { input | output } interface
undo match next-hop [ bgp ]
Parameter | Description | Value |
---|---|---|
source |
Indicates aggregation based on the source end. |
- |
destination |
Indicates aggregation based on the destination end. |
- |
vlan |
Indicates aggregation based on the VLAN. |
- |
as |
Indicates aggregation based on the autonomous system (AS). |
- |
port |
Indicates aggregation based on the port number. |
- |
address |
Indicates aggregation prefix-based on the address. |
- |
mask |
Indicates aggregation based on the mask. |
- |
mpls |
Indicates the multi-protocol label switching. |
- |
top-label |
Indicates the top label. |
- |
ip-address |
Specifies the IP address. |
- |
label position |
Specifies the MPLS label location based on which aggregation is performed. |
The value is an integer ranging from 1 to 3. |
protocol |
Indicates aggregation based on the protocol type. |
- |
tos |
Indicates aggregation based on the ToS priority. |
- |
direction |
Indicates aggregation based on the flow direction. |
- |
tcp-flag |
Indicates aggregation based on the tcp-flag. |
- |
input |
Indicates aggregation based on the ingress port. |
- |
output |
Indicates aggregation based on the egress port. |
- |
interface |
Specifies the interface. |
- |
next-hop |
Indicates aggregation based on the next hop. |
- |
bgp |
Indicates aggregation based on the BGP protocol. |
- |
Usage Scenario
NetStream supports 17 aggregation modes. For each aggregation mode, original flows are classified and combined to generate aggregated flow information and are aged and exported to the server based on fixed rules. Flexible customization is not supported. Flexible flow packets provide a user-defined template for users to customize matching fields as required. The user-defined template improves traffic analysis accuracy and reduces network bandwidth occupation, CPU usage, and storage space usage.
Prerequisites
Before you run the match command, run the ip netstream record or ipv6 netstream record command to create a flexible flow statistics template.
Precautions
If a flexible flow has been applied, you are not allowed to run the match command to modify the matching rules.
The maximum length that the flexible flow statistics template supports is 50 bytes, including the collect and match fields. Lengths of the match fields: