Usage Scenario
One traffic policy can be applied to multiple interfaces. To collect the traffic statistics, you need to do as follows:
- If the statistics on different interfaces are to be collected as a whole, you need to set the attribute of a policy to shared.
- If the statistics on different interfaces are to be collected separately, you need set the attribute of a policy to unshared.
Prerequisites
The traffic policy is created in the system view.
Configuration Impact
After the attribute of a traffic policy is set to shared, you can view the overall traffic statistics on all the interfaces where the traffic policy on the same NP is applied.
Follow-up Procedure
The traffic policy is applied to interfaces.
Precautions
To apply a share-mode traffic policy, note the following:
- After a traffic policy is applied to an interface, you cannot change the mode of the traffic policy (shared or unshared). Before changing the mode of the traffic policy (shared or unshared), you must delete the application of the traffic policy from the interface.
- If the share-mode command is configured in the traffic policy, all the interfaces to which the traffic policy is applied share the configured bandwidth. If the share-mode command is not configured, each interface uses its own bandwidth.
- If a shared traffic policy is applied to different interfaces, this shared traffic policy collects statistics on the traffic of all the interfaces as a whole. That is, statistics on the traffic of interfaces cannot be distinguished.
- If an unshared traffic policy is applied, the statistics about a traffic policy can be distinguished according to the interface where the traffic policy is applied.
- The statistics about the incoming traffic and about the outgoing traffic are collected respectively, regardless of the mode of the traffic policy.
- The share-mode command takes effect only on the interfaces on the same NP. If the same traffic policy is configured on the interfaces on different NPs, the share-mode command does not take effect.
- The share-mode command also takes effect for traffic of different VLANs on the same interface.