apply traffic-index

Function

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.

Format

apply traffic-index indexVal

undo apply traffic-index

Parameters

Parameter Description Value
indexVal

Specifies the index of BGP traffic.

The value is an integer ranging from 1 to 64.

Views

Route-policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

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.

Example

# Configure the route-policy named test in the Route-policy view.
<HUAWEI> system-view
[~HUAWEI] route-policy test permit node 10
[*HUAWEI-route-policy] apply traffic-index 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >