Configuring a Flexible Flow Statistics Template
Context
You need to configure a flexible flow statistics template before applying it to an interface. To obtain more detailed flow statistics, you can configure whether flexible flow statistics contain the number of packets and bytes, and the indexes of the inbound and outbound interfaces.
Procedure
- Run the system-view command to enter the system view.
- Run the netstream record record-name ip command to create IPv4 flexible flow statistics template and enter the IPv4 flexible flow statistics template view.
- (Optional) Run the description description-information command to configure the description of IPv4 flexible
flows.
By default, the description of IPv4 flexible flows is not configured.
- Run the match ip { destination-address | destination-port | tos | protocol | source-address | source-port } command to configure the aggregation keywords for the IPv4 flexible flow statistics template.
By default, no aggregation keyword is configured in a flexible IPv4 flow statistics template. If you run the command multiple times, multiple keywords are configured to aggregate the flows according to all these keywords.
- Run the collect counter { bytes | packets } command to add the number of packets and bytes to the flexible flow
statistics exported to the NSC.
By default, the flexible flow statistics that are exported to the NSC do not contain the number of packets or bytes.
- (Optional) Run the collect interface { input | output } command to add the indexes of the inbound and outbound
interfaces to the flexible flow statistics exported to the NSC.
By default, the flexible flow statistics exported to the NSC do not contain the index of the inbound or outbound interface.
- Run the commit command to commit the configuration.