traffic-statistics (SR-MPLS TE Policy view)

Function

The traffic-statistics enable command enables traffic statistics collection for a specified SR-MPLS TE Policy.

The undo traffic-statistics enable command disables traffic statistics collection for a specified SR-MPLS TE Policy.

The traffic-statistics disable command disables traffic statistics collection for a specified SR-MPLS TE Policy.

The undo traffic-statistics disable command enables traffic statistics collection for a specified SR-MPLS TE Policy.

By default, SR-MPLS TE Policy traffic statistics collection is disabled. If the sr-te-policy traffic-statistics enable command is run, the command configuration is directly inherited.

Format

traffic-statistics { enable | disable }

undo traffic-statistics [ { enable | disable } ]

Parameters

Parameter Description Value
enable

Enable.

-

disable

Disable.

-

Views

SR-MPLS TE policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
srpolicy write

Usage Guidelines

Usage Scenario

To collect traffic statistics about a specified SR-MPLS TE Policy for traffic monitoring or charging, run the traffic-statistics enable or undo traffic-statistics disable command to enable traffic statistics collection for the SR-MPLS TE Policy.

After you enable the function, collected SR-MPLS TE Policy traffic statistics can be queried using the display sr-te policy traffic-statistics command.

To clear existing SR-MPLS TE Policy traffic statistics, run the reset sr-te policy traffic-statistics command.

Precautions

The sr-te-policy traffic-statistics enable command enables traffic statistics collection for all SR-MPLS TE Policies, whereas the traffic-statistics command configures whether to enable or disable traffic statistics collection for a specified SR-MPLS TE Policy. If both commands are run, the traffic-statistics command configuration takes effect.

Example

# Enable traffic statistics collection for the SR-MPLS TE Policy named policy1.
<HUAWEI> system-view
[~HUAWEI] segment-routing
[*HUAWEI-segment-routing] sr-te policy policy1 endpoint 1.1.1.1 color 100
[*HUAWEI-segment-routing-te-policy-policy1] traffic-statistics enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic