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.
Usage Scenario
BGP accounting uses different BGP traffic indexes in BGP community attributes to identify routes and charge for the traffic accordingly.
The sending end of BGP routes can set attributes for BGP routes using a route-policy. The receiving end of BGP routes can set the BGP traffic index for BGP routes based on the BGP community, BGP AS_Path, ACL, or IP prefix list. The BGP traffic index together with routing information is delivered to the FIB. After BGP accounting is enabled on an interface, the traffic-index-based traffic collection table is 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
A route-policy has been configured using the route-policy command.