traffic-statistics (SR Policy template view)

Function

The traffic-statistics enable command enables the traffic statistics collection function in an SR Policy attribute template.

The traffic-statistics disable command disables the traffic statistics collection function in an SR Policy attribute template.

The undo traffic-statistics enable command deletes the preceding configuration.

The undo traffic-statistics disable command deletes the preceding configuration.

By default, the traffic statistics collection function in an SR Policy attribute template is not enabled.

Format

traffic-statistics { enable | disable }

undo traffic-statistics [ { enable | disable } ]

Parameters

Parameter Description Value
enable

Enables the traffic statistics function in an SR Policy attribute template.

-

disable

Disables the traffic statistics collection function in an SR Policy attribute template.

-

Views

SR Policy template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
srpolicy write

Usage Guidelines

Usage Scenario

The traffic-statistics enable (SR Policy template view) command enables the traffic statistics collection function in an SR Policy attribute template, the srv6-te-policy traffic-statistics enable (Segment Routing IPv6 view) command globally enables the traffic statistics collection function for all SRv6 TE Policies in the Segment Routing IPv6 view, and the traffic-statistics enable (SRv6 TE Policy view) command enables the traffic statistics collection function for a single SRv6 TE Policy.

For the same SRv6 TE Policy, if the srv6-te-policy traffic-statistics enable (Segment Routing IPv6 view) and traffic-statistics enable (SRv6 TE Policy view) commands are both run and the template referenced by the primary path of the policy has traffic statistics collection configurations, the traffic-statistics enable (SRv6 TE Policy view) command configuration has the highest priority. The traffic-statistics enable (SR Policy template view) command configuration has the second highest priority, followed by the srv6-te-policy traffic-statistics enable (Segment Routing view) command configuration.

Example

# Enable the traffic statistics collection function in an SR Policy attribute template.
<HUAWEI> system-view
[~HUAWEI] segment-routing policy-template 1
[*HUAWEI-sr-policy-template-1] traffic-statistics enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >