The apply traffic-index command sets the BGP traffic index.
The undo apply traffic-index command cancels the configuration.
By default, no BGP traffic index is set.
Product |
Support |
---|---|
S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S |
Supported. |
S2720-EI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, and S6720S-LI |
Not supported. |
Parameter | Description | Value |
---|---|---|
traffic-index | Specifies the index of BGP traffic. | The value is an integer ranging from 1 to 64. |
Usage Scenario
BGP accounting uses different BGP traffic indexes in BGP community attributes to identify routes and charge the traffic accordingly.
The sending end of BGP routes can set attributes for BGP routes by using the route-policy. The receiving end of BGP routes can set the BGP traffic index for BGP routes according to the BGP community filter, BGP AS_Path filter, ACL, and IP prefix list. The BGP traffic index together with routing information is delivered to the FIB table. After BGP accounting is enabled on an interface, the traffic-index-based traffic collection table can be generated for the interface.
During packet forwarding, traffic statistics can be collected according to the traffic index on each interface. Traffic statistics can be collected according to either the destination address in the inbound direction or the source address in the outbound direction.
Prerequisites
The route-policy command has been run.