Guest

Cisco IOS Software Releases 12.3 T

BGP Policy Accounting Output Interface Accounting

Table Of Contents

BGP Policy Accounting Output Interface Accounting

Contents

Prerequisites for BGP PA Output Interface Accounting

Information About BGP PA Output Interface Accounting

BGP PA Output Interface Accounting

Benefits of BGP PA Output Interface Accounting

How to Configure BGP PA Output Interface Accounting

Specifying the Match Criteria for BGP PA

Classifying the IP Traffic and Enabling BGP PA

Verifying BGP Policy Accounting

Configuration Examples for BGP PA Output Interface Accounting

Specifying the Match Criteria for BGP Policy Accounting: Example

Classifying the IP Traffic and Enabling BGP Policy Accounting: Example

Where to Go Next

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

bgp-policy

set traffic-index

show cef interface

show cef interface policy-statistics

Glossary


BGP Policy Accounting Output Interface Accounting


Border Gateway Protocol (BGP) policy accounting (PA) measures and classifies IP traffic that is sent to, or received from, different peers. Policy accounting was previously available on an input interface only. The BGP Policy Accounting Output Interface Accounting feature introduces several extensions to enable BGP PA on an output interface and to include accounting based on a source address for both input and output traffic on an interface. Counters based on parameters such as community list, autonomous system number, or autonomous system path are assigned to identify the IP traffic.

Release
Modification

12.0(9)S

This feature was introduced.

12.0(17)ST

This feature was integrated into Cisco IOS Release 12.0(17)ST.

12.0(22)S

Output interface accounting was added, and the bucket size was increased.

12.3(4)T

This feature was integrated into Cisco IOS Release 12.3(4)T.

12.2(25)S

This feature was integrated into Cisco IOS Release 12.2(25)S.


Feature History for BGP PA Output Interface Accounting

Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

Prerequisites for BGP PA Output Interface Accounting

Information About BGP PA Output Interface Accounting

How to Configure BGP PA Output Interface Accounting

Configuration Examples for BGP PA Output Interface Accounting

Where to Go Next

Additional References

Command Reference

Glossary

Prerequisites for BGP PA Output Interface Accounting

Before using the BGP Policy Accounting Output Interface Accounting feature, you must enable BGP and Cisco Express Forwarding (CEF) or distributed CEF (dCEF) on the router.

Information About BGP PA Output Interface Accounting

To configure BGP PA output interface accounting, you should understand the following concepts:

BGP PA Output Interface Accounting

Benefits of BGP PA Output Interface Accounting

BGP PA Output Interface Accounting

Policy accounting using BGP measures and classifies IP traffic that is sent to, or received from, different peers. Originally, BGP PA was available on an input interface only. BGP PA output interface accounting introduces several extensions to enable BGP PA on an output interface and to include accounting based on a source address for both input and output traffic on an interface. Counters based on parameters such as community list, autonomous system number, or autonomous system path are assigned to identify the IP traffic.

Using the BGP table-map command, prefixes added to the routing table are classified by BGP attribute, autonomous system number, or autonomous system path. Packet and byte counters are incremented per input or output interface. A Cisco IOS policy-based classifier maps the traffic into one of eight possible buckets that represent different traffic classes.

Using BGP PA, you can account for traffic according to its origin or the route it traverses. Service providers (SPs) can identify and account for all traffic by customer and can bill accordingly. In Figure 1, BGP PA can be implemented in Router A to measure packet and byte volumes in autonomous system buckets. Customers are billed appropriately for traffic that is routed from a domestic, international, or satellite source.

Figure 1 Sample Topology for BGP Policy Accounting

BGP policy accounting using autonomous system numbers can be used to improve the design of network circuit peering and transit agreements between Internet service providers (ISPs).

Benefits of BGP PA Output Interface Accounting

Accounting for IP Traffic Differentially

BGP policy accounting classifies IP traffic by autonomous system number, autonomous system path, or community list string, and increments packet and byte counters. Policy accounting can also be based on the source address. Service providers can account for traffic and apply billing according to the origin of the traffic or the route that specific traffic traverses.

Efficient Network Circuit Peering and Transit Agreement Design

Implementing BGP policy accounting on an edge router can highlight potential design improvements for peering and transit agreements.

How to Configure BGP PA Output Interface Accounting

This section contains the following tasks:

Specifying the Match Criteria for BGP PA (required)

Classifying the IP Traffic and Enabling BGP PA (required)

Verifying BGP Policy Accounting (optional)

Specifying the Match Criteria for BGP PA

The first task in configuring BGP PA is to specify the criteria that must be matched. Community lists, autonomous system paths, or autonomous system numbers are examples of BGP attributes that can be specified and subsequently matched using a route map. Perform this task to specify the BGP attribute to use for BGP PA and to create the match criteria in a route map.

SUMMARY STEPS

1. enable

2. configure terminal

3. ip community-list {standard-list-number | expanded-list-number [regular-expression] | {standard | expanded} community-list-name} {permit | deny} {community-number | regular-expression}

4. route-map map-name [permit | deny] [sequence-number]

5. match community-list community-list-number [exact]

6. set traffic-index bucket-number

7. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

ip community-list {standard-list-number | expanded-list-number [regular-expression] | {standard | expanded} community-list-name} {permit | deny} {community-number | regular-expression}

Example:

Router(config)# ip community-list 30 permit 100:190

Creates a community list for BGP and controls access to it.

Repeat this step for each community to be specified.

Step 4 

route-map map-name [permit | deny] [sequence-number]

Example:

Router(config)# route-map set_bucket permit 10

Enters route-map configuration mode and defines the conditions for policy routing.

The map-name argument identifies a route map.

The optional permit and deny keywords work with the match and set criteria to control how the packets are accounted for.

The optional sequence-number argument indicates the position that a new route map is to have in the list of route maps already configured with the same name.

Step 5 

match community-list community-list-number [exact]

Example:

Router(config-route-map)# match community-list 30

Matches a BGP community.

Step 6 

set traffic-index bucket-number

Example:

Router(config-route-map)# set traffic-index 2

Indicates where to output packets that pass a match clause of a route map for BGP policy accounting.

Step 7 

exit

Example:

Router(config-route-map)# exit

Exits route-map configuration mode and returns to global configuration mode.

Classifying the IP Traffic and Enabling BGP PA

After a route map has been defined to specify match criteria, you must configure a way to classify the IP traffic before enabling BGP policy accounting.

Using the table-map command, BGP classifies each prefix that it adds to the routing table according to the match criteria. When the bgp-policy accounting command is configured on an interface, BGP policy accounting is enabled.

Perform this task to classify the IP traffic and enable BGP policy accounting.

SUMMARY STEPS

1. enable

2. configure terminal

3. router bgp as-number

4. table-map route-map-name

5. network network-number [mask network-mask]

6. neighbor ip-address remote-as as-number

7. exit

8. interface type number

9. ip address ip-address mask

10. bgp-policy accounting [input | output] [source]

11. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

router bgp as-number

Example:

Router(config)# router bgp 65000

Configures a BGP routing process and enters router configuration mode for the specified routing process.

The as-number argument identifies a BGP autonomous system number.

Step 4 

table-map route-map-name

Example:

Router(config-router)# table-map set_bucket

Classifies BGP prefixes entered in the routing table.

Step 5 

network network-number [mask network-mask]

Example:

Router(config-router)# network 10.15.1.0 mask 255.255.255.0

Specifies a network to be advertised by the BGP routing process.

Step 6 

neighbor ip-address remote-as as-number

Example:

Router(config-router)# neighbor 10.14.1.1 remote-as 65100

Specifies a BGP peer by adding an entry to the BGP routing table.

Step 7 

exit

Example:

Router(config-router)# exit

Exits router configuration mode and returns to global configuration mode.

Step 8 

interface type number

Example:

Router(config)# interface POS 7/0

Specifies the interface type and number and enters interface configuration mode.

The type argument identifies the type of interface.

The number argument identifies the slot and port numbers of the interface. The space between the interface type and number is optional.

Step 9 

ip address ip-address mask

Example:

Router(config-if)# ip-address 10.15.1.2 255.255.255.0

Configures the interface with an IP address.

Step 10 

bgp-policy accounting [input | output] [source]

Example:

Router(config-if)# bgp-policy accounting input source

Enables BGP policy accounting for the interface.

Use the optional input or output keyword to account for traffic either entering or leaving the router. By default, BGP policy accounting is based on traffic entering the router.

Use the optional source keyword to account for traffic based on source address.

Step 11 

exit

Example:

Router(config-if)# exit

Exits interface configuration mode and returns to global configuration mode.

Verifying BGP Policy Accounting

Perform this task to verify that BGP policy accounting is operating.

SUMMARY STEPS

1. show ip cef [network [mask]] [detail]

2. show ip bgp [network] [network-mask] [longer-prefixes]

3. show cef interface [type number] policy-statistics [input | output]

4. show cef interface [type number] [statistics] [detail]

DETAILED STEPS


Step 1 show ip cef [network [mask]] [detail]

Enter the show ip cef command with the detail keyword to learn which accounting bucket is assigned to a specified prefix.

In this example, the output is displayed for the prefix 192.168.5.0. It shows that accounting bucket number 4 (traffic_index 4) is assigned to this prefix.

Router# show ip cef 192.168.5.0 detail

192.168.5.0/24, version 21, cached adjacency to POS7/2
0 packets, 0 bytes, traffic_index 4
  via 10.14.1.1, 0 dependencies, recursive
   next hop 10.14.1.1, POS7/2 via 10.14.1.0/30
   valid cached adjacency

Step 2 show ip bgp [network] [network-mask] [longer-prefixes]

Enter the show ip bgp command for the same prefix used in Step 1—192.168.5.0—to learn which community is assigned to this prefix.

In this example, the output is displayed for the prefix 192.168.5.0. It shows that the community of 100:197 is assigned to this prefix.

Router# show ip bgp 192.168.5.0

BGP routing table entry for 192.168.5.0/24, version 2
Paths: (1 available, best #1)
  Not advertised to any peer
  100
    10.14.1.1 from 10.14.1.1 (32.32.32.32)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: 100:197

Step 3 show cef interface [type number] policy-statistics [input | output]

Enter the show cef interface policy-statistics command to display the per-interface traffic statistics.

In this example, the output shows the number of packets and bytes that have been assigned to each accounting bucket:

Router# show cef interface policy-statistics input

FastEthernet1/0/0 is up (if_number 6)
  Corresponding hwidb fast_if_number 6
  Corresponding hwidb firstsw->if_number 6
  BGP based Policy accounting on input is enabled
 Index         Packets           Bytes
     1            9999          999900
     2               0               0
     3               0               0
     4               0               0
     5               0               0
     6               0               0
     7               0               0
     8               0               0
     9               0               0
    10               0               0
    11               0               0
    12               0               0
    13               0               0
    14               0               0
    15               0               0
    16               0               0
    17               0               0
    18               0               0
    19               0               0
    20               0               0
    21               0               0
    22               0               0
    23               0               0
    24               0               0
    25               0               0
    26               0               0
    27               0               0
    28               0               0
    29               0               0
    30               0               0
    31               0               0
    32               0               0
    33               0               0
    34            1234          123400
    35               0               0
    36               0               0
    37               0               0
    38               0               0
    39               0               0
    40               0               0
    41               0               0
    42               0               0
    43               0               0
    44               0               0
    45            1000          100000
    46               0               0
    47               0               0
    48               0               0
    49               0               0
    50               0               0
    51               0               0
    52               0               0
    53               0               0
    54            5123         1198782
    55               0               0
    56               0               0
    57               0               0
    58               0               0
    59               0               0
    60               0               0
    61               0               0
    62               0               0
    63               0               0
    64               0               0

Step 4 show cef interface [type number] [statistics] [detail]

Enter the show cef interface EXEC command to display the state of BGP policy accounting on a specified interface.

In this example, the output shows that BGP policy accounting has been configured to be based on input traffic at Fast Ethernet interface 1/0/0:

Router# show cef interface Fast Ethernet 1/0/0

FastEthernet1/0/0 is up (if_number 6)
  Corresponding hwidb fast_if_number 6
  Corresponding hwidb firstsw->if_number 6
  Internet address is 10.1.1.1/24
  ICMP redirects are always sent
  Per packet load-sharing is disabled
  IP unicast RPF check is disabled
  Inbound access list is not set
  Outbound access list is not set
  IP policy routing is disabled
  BGP based policy accounting on input is enabled      
  BGP based policy accounting on output is disabled    
  Hardware idb is FastEthernet1/0/0 (6)
  Software idb is FastEthernet1/0/0 (6)
  Fast switching type 1, interface type 18
  IP Distributed CEF switching enabled
  IP Feature Fast switching turbo vector
  IP Feature CEF switching turbo vector
  Input fast flags 0x100, Output fast flags 0x0, Flags 0x0
  ifindex 7(7)
  Slot 1 Slot unit 0 VC -1
  Transmit limit accumulator 0xE8001A82 (0xE8001A82)
  IP MTU 1500

Configuration Examples for BGP PA Output Interface Accounting

This section contains the following configuration examples:

Specifying the Match Criteria for BGP Policy Accounting: Example

Classifying the IP Traffic and Enabling BGP Policy Accounting: Example

Specifying the Match Criteria for BGP Policy Accounting: Example

In the following example, BGP communities are specified in community lists, and a route map named set_bucket is configured to match each of the community lists to a specific accounting bucket using the set traffic-index command:

ip community-list 30 permit 100:190
ip community-list 40 permit 100:198
ip community-list 50 permit 100:197
ip community-list 60 permit 100:296
!
route-map set_bucket permit 10
 match community-list 30
 set traffic-index 2
!
route-map set_bucket permit 20
 match community-list 40
 set traffic-index 3
!
route-map set_bucket permit 30
 match community-list 50
 set traffic-index 4
!
route-map set_bucket permit 40
 match community-list 60
 set traffic-index 5

Classifying the IP Traffic and Enabling BGP Policy Accounting: Example

In the following example, BGP policy accounting is enabled on POS interface 7/0. The policy accounting criteria is based on the source address of the input traffic, and the table-map command is used to modify the bucket number when the IP routing table is updated with routes learned from BGP.

router bgp 65000
 table-map set_bucket
 network 10.15.1.0 mask 255.255.255.0
 neighbor 10.14.1.1 remote-as 65100
!
ip classless
ip bgp-community new-format 
!
interface POS7/0
 ip address 10.15.1.2 255.255.255.0
 bgp-policy accounting input source
 no keepalive
 crc 32
 clock source internal

Where to Go Next

Additional BGP, CEF, and dCEF command and configuration information is available from the appropriate Cisco IOS command reference or configuration guide documents. For more details, see the "Related Documents" section.

Additional References

The following sections provide references related to BGP policy accounting.

Related Documents

Related Topic
Document Title

BGP commands: complete command syntax, command mode, defaults, usage guidelines, and examples

Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols, Release 12.2

Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3 T

BGP configuration

Cisco IOS IP Configuration Guide, Release 12.2

Cisco IOS IP Configuration Guide, Release 12.3

Switching commands: complete command syntax, command mode, defaults, usage guidelines, and examples

Cisco IOS Switching Services Command Reference, Release 12.2

Cisco IOS Switching Services Command Reference, Release 12.3 T

Switching configuration

Cisco IOS Switching Services Configuration Guide, Release 12.2

Cisco IOS Switching Services Configuration Guide, Release 12.3


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

CISCO-BGP-POLICY-ACCOUNTING-MIB

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFCs
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents modified commands.

bgp-policy

set traffic-index

show cef interface

show cef interface policy-statistics

bgp-policy

To enable Border Gateway Protocol (BGP) policy accounting or policy propagation on an interface, use the bgp-policy command in interface configuration mode. To disable BGP policy accounting or policy propagation, use the no form of this command.

bgp-policy {accounting | ip-prec-map} [input | output] [source]

no bgp-policy {accounting | ip-prec-map} [input | output] [source]

Syntax Description

accounting

Enables accounting policy on the basis of community lists, autonomous system numbers, or autonomous system paths.

ip-prec-map

Enables quality of service (QoS) policy on the basis of the IP precedence.

input

(Optional) Enables accounting policy on the basis of traffic that is traveling through an input interface.

output

(Optional) Enables accounting policy on the basis of traffic that is traveling through an output interface.

source

(Optional) Enables accounting policy on the basis of the source address.


Defaults

BGP policy accounting and policy propagation are disabled.

Command Modes

Interface configuration

Command History

Release
Modification

11.1 CC

This command was introduced.

12.0(9)S

This command was integrated into Cisco IOS Release 12.0(9)S, and the accounting keyword was added.

12.0(17)ST

This command was integrated into Cisco IOS Release 12.0(17)ST.

12.0(22)S

The input, output, and source keywords were added for the Cisco 7200 series and Cisco 7500 series platforms.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

For BGP policy propagation to function, you must enable BGP and either Cisco Express Forwarding (CEF) or distributed CEF (dCEF).

To specify the QoS policy based on the IP precedence, the proper route-map configuration must be in place (for example, the set ip precedence route-map configuration command). To display QoS policy information for the interface, use the show ip interface command.


Note If you specify both the source and destination addresses when configuring policy propagation based on an access control list (ACL), the software looks up the source address in the routing table and classifies the packet based on the source address first; then the software looks up the destination address in the routing table and reclassifies the packet based on the destination address.


To specify the accounting policy, the proper route-map configuration must be in place matching specific BGP attributes using the the set traffic-index command. In BGP router configuration mode, use the table-map command to modify the accounting buckets when the IP routing table is updated with routes learned from BGP. To display accounting policy information, use the show cef interface policy-statistics, show ip bgp, and show ip cef detail EXEC commands.

Examples

The following example enables the BGP policy propagation feature on an interface based on the source address and the IP precedence setting:

configure terminal
 interface ethernet 4/0/0
 bgp-policy ip-prec-map
 end

The following example shows the BGP policy accounting feature using a source address on input traffic being enabled on GE-WAN interface 9/1. The policy is classified by autonomous system paths.

router bgp 65000
 no synchronization
 table-map buckets
!
ip as-path access-list 1 permit _10_
ip as-path access-list 2 permit _11_
!
route-map buckets permit 10
 match as-path 1
 set traffic-index 1
!
route-map buckets permit 20
 match as-path 2
 set traffic-index 2
!
route-map buckets permit 80
 set traffic-index 7
!
interface GE-WAN9/1
 ip address 10.0.2.2 255.255.255.0
 bgp-policy accounting input source
 no negotiation auto

Related Commands

Command
Description

set ip precedence

Sets the precedence values in the IP header.

set traffic-index

Defines how to classify packets that pass a match clause of a route map for BGP policy accounting.

show cef interface policy-statistics

Displays detailed CEF policy statistical information for all interfaces.

show ip bgp

Displays entries in the BGP routing table.

show ip cef

Displays entries in the FIB or FIB summary information.

show ip interface

Displays the usability status of interfaces.

table-map

Classifies routes according to a route map.


set traffic-index

To indicate how to classify packets that pass a match clause of a route map for Border Gateway Protocol (BGP) policy accounting, use the set traffic-index command in route-map configuration mode. To disable traffic classification, use the no form of this command.

set traffic-index bucket-number

no set traffic-index bucket-number

Syntax Description

bucket-number

Number that represents a bucket into which packet and byte statistics are collected for a specific traffic classification. The range is from 1 to 64. There is no default value.


Defaults

Routing traffic is not classified.

Command Modes

Route-map configuration

Command History

Release
Modification

12.0(9)S

This command was introduced.

12.0(17)ST

This command was integrated into Cisco IOS Release 12.0(17)ST.

12.0(22)S

Support for 64 buckets was added for the Cisco 12000 series Internet router.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T, and support for 64 buckets was added for all platforms.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

Use the set traffic-index route-map configuration command, the route-map global configuration command, and one of the match route-map configuration commands to define the conditions for BGP policy accounting. The match commands specify the match criteria—the conditions under which policy routing occurs. The set traffic-index command specifies the set actions—the particular routing actions to perform if the criteria specified by the match commands are met.

Examples

In the following example, an index for BGP policy accounting is set according to autonomous system path criteria:

route-map buckets permit 10
 match as-path 1
 set traffic-index 1

Related Commands

Command
Description

bgp-policy

Enables BGP policy accounting or policy propagation on an interface.

route-map

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.


show cef interface

To display Cisco Express Forwarding (CEF) information for a specified interface or for all interfaces, use the show cef interface command in user EXEC or privileged EXEC mode.

show cef interface [type number] [statistics] [detail]

Syntax Description

type number

(Optional) Displays CEF information for the specified interface type and number.

Note No space is required between the interface type and number.

statistics

(Optional) Displays switching statistics for the line card.

detail

(Optional) Displays detailed CEF information for the specified interface type and number.


Command Modes

User EXEC
Privileged EXEC

Command History

Release
Modification

11.2 GS

This command was introduced on the Cisco 12012 Internet router.

11.1 CC

Multiple platform support was added.

12.0(14)ST

This command was integrated into Cisco IOS Release 12.0(14)ST, and the statistics keyword was added.

12.2(2)T

This command was integrated into Cisco IOS Release 12.2(2)T, and the detailed keyword was added.

12.0(22)S

Output fields that support BGP policy accounting were added for the Cisco 7200 series and Cisco 7500 series platforms.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Examples

The following is sample output from the show cef interface command for Fast Ethernet interface 1/0/0 with BGP policy accounting configured for input traffic:

Router# show cef interface FastEthernet 1/0/0

FastEthernet1/0/0 is up (if_number 6)
  Corresponding hwidb fast_if_number 6
  Corresponding hwidb firstsw->if_number 6
  Internet address is 10.1.1.1/24
  ICMP redirects are always sent
  Per packet load-sharing is disabled
  IP unicast RPF check is disabled
  Inbound access list is not set
  Outbound access list is not set
  IP policy routing is disabled
  BGP based policy accounting on input is enabled      
  BGP based policy accounting on output is disabled    
Hardware idb is FastEthernet1/0/0 (6)
  Software idb is FastEthernet1/0/0 (6)
  Fast switching type 1, interface type 18
  IP Distributed CEF switching enabled
  IP Feature Fast switching turbo vector
  IP Feature CEF switching turbo vector
  Input fast flags 0x100, Output fast flags 0x0, Flags 0x0
  ifindex 7(7)
  Slot 1 Slot unit 0 VC -1
  Transmit limit accumulator 0xE8001A82 (0xE8001A82)
  IP MTU 1500

The following is sample output from the show cef interface detail command for Ethernet interface 1/0/0:

Router# show cef interface Ethernet 1/0/0 detail

FastEthernet1/0/0 is up (if_number 6)
  Corresponding hwidb fast_if_number 6
  Corresponding hwidb firstsw->if_number 6
  Internet address is 10.1.1.1/24
  ICMP redirects are always sent
  Per packet load-sharing is disabled
  IP unicast RPF check is disabled
  Inbound access list is not set
  Outbound access list is not set
  IP policy routing is disabled
  BGP based policy accounting on input is enabled      
  BGP based policy accounting on output is disabled    
  Hardware idb is FastEthernet1/0/0 (6)
  Software idb is FastEthernet1/0/0 (6)
  Fast switching type 1, interface type 18
  IP Distributed CEF switching enabled
  IP Feature Fast switching turbo vector
  IP Feature CEF switching turbo vector
  Input fast flags 0x100, Output fast flags 0x0, Flags 0x0
  ifindex 7(7)
  Slot 1 Slot unit 0 VC -1
  Transmit limit accumulator 0xE8001A82 (0xE8001A82)
  IP MTU 1500

The following is sample output from the show cef interface Null 0 detail command:

Router# show cef interface Null 0 detail

Null0 is up (if_number 1)
  Corresponding hwidb fast_if_number 1
  Corresponding hwidb firstsw->if_number 1
  Internet Protocol processing disabled
  Interface is marked as nullidb
  Packets switched to this interface on linecard are dropped to next slow path
  Hardware idb is Null0
  Fast switching type 13, interface type 0
  IP CEF switching enabled
  IP Feature CEF switching turbo vector
  Input fast flags 0x0, Output fast flags 0x0
  ifindex 0(0)
  Slot -1 Slot unit -1 VC -1
  Transmit limit accumulator 0x0 (0x0)
  IP MTU 1500

Table 1 describes the significant fields shown in the displays.

Table 1 show cef interface Field Descriptions 

Field
Description

FastEthernet1/0/0 is up

Indicates type, number, and status of the interface.

Internet address is

Internet address of the interface.

ICMP redirects are always sent

Indicates how packet forwarding is configured.

Per packet load-sharing is disabled

Indicates status of load sharing on the interface.

IP unicast RPF check is disabled

Indicates status of the IP unicast Reverse Path Forwarding (RPF) check on the interface.

Inbound access list is not set

Indicates the number or name of the inbound access list if one is applied to this interface.

Outbound access list is not set

Indicates the number or name of the outbound access list if one is applied to this interface.

IP policy routing is disabled

Indicates the status of IP policy routing on the interface.

BGP based policy accounting on input is enabled

Indicates the status of BGP policy accounting on the input interface.

BGP based policy accounting on output is disabled

Indicates the status of BGP policy accounting on the output interface.

Hardware idb is Ethernet1/0/0

Interface type and number configured.

Fast switching type

Indicates switching mode in use. Used for troubleshooting.

interface type

Indicates interface type.

IP Distributed CEF switching enabled

Indicates whether distributed CEF is enabled on this interface. (Cisco 7500 and Cisco 12000 series Internet routers only.)

IP Feature Fast switching turbo vector

Indicates the IP fast switching type configured.

IP Feature CEF switching turbo vector

Indicates the IP feature CEF switching type configured.

Input fast flags

Indicates the input status of various switching features:

0x0001 (input access control list [ACL] enabled)

0x0002 (policy routing enabled)

0x0004 (input rate limiting)

0x0008 (MAC/Prec accounting)

0x0010 (DSCP/PREC/QOS GROUP)

0x0020 (input named access lists)

0x0040 (NAT enabled on input)

0x0080 (crypto map on input)

0x0100 (QPPB classification)

0x0200 (inspect on input)

0x0400 (input classification)

0x0800 (casa input enable)

0x1000 (Virtual Private Network [VPN] enabled on a software interface descriptor block (swidb))

0x2000 (input idle timer enabled)

0x4000 (unicast Reverse Path Forwarding [RPF] check)

0x8000 (per-address ACL enabled)

0x10000 (Deaggregating a packet)

0x20000 (GPRS enabled on input)

0x40000 (URL RenDezvous)

0x80000 (QoS classification)

0x100000 (FR switching on i/f)

0x200000 (WCCP redirect on input)

0x400000 (input classification)

Output fast flags

Indicates the output status of various switching features:

0x0001 (output ACL enabled)

0x0002 (IP accounting enabled)

0x0004 (WCC redirect enable i/f)

0x0008 (rate limiting)

0x0010 (MAC/Prec accounting)

0x0020 (DSCP/PREC/QOS GROUP)

0x0040 (D-QOS classification)

0x0080 (output named access lists)

0x0100 (NAT enabled on output)

0x0200 (TCP intercept enabled)

0x0400 (crypto map set on output)

0x0800 (output firewall)

0x1000 (RSVP classification)

0x2000 (inspect on output)

0x4000 (QoS classification)

0x8000 (QoS preclassification)

0x10000 (output stile)

ifindex

Indicates the SNMP ifindex for this interface.

Slot 1 Slot unit 0 VC -1

The slot number and slot unit.

Transmit limit accumulator

Indicates the maximum number of packets allowed in the transmit queue.

IP MTU

The value of the MTU size set on the interface.


Related Commands

Command
Description

show cef

Displays which packets the line cards dropped or displays which packets were not express-forwarded.

show cef linecard

Displays CEF-related interface information by line card.


show cef interface policy-statistics

To display Cisco Express Forwarding (CEF) policy statistical information for a specified interface or for all interfaces, use the show cef interface policy-statistics command in user EXEC or privileged EXEC mode.

show cef interface [type number] policy-statistics [input | output]

Syntax Description

type number

(Optional) Interface type and number.

Note No space is required between the interface type and number.

input

(Optional) Displays BGP accounting policy statistics on the basis of traffic that is traveling through an input interface.

output

(Optional) Displays BGP accounting policy statistics on the basis of traffic that is traveling through an output interface.


Command Modes

User EXEC
Privileged EXEC

Command History

Release
Modification

12.0(9)S

This command was introduced on the Cisco 12000 series Internet routers.

12.0(14)ST

This command was integrated into Cisco IOS Release 12.0(14)ST.

12.0(22)S

The input and output keywords were added.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

This command is available only on distributed switching platforms.

Examples

The following is sample output from the show cef interface policy-statistics command showing policy statistics for Fast Ethernet interface 1/0/0 with the policy accounting based on input traffic:

Router# show cef interface FastEthernet 1/0/0 policy-statistics input

FastEthernet1/0/0 is up (if_number 6)
  Corresponding hwidb fast_if_number 6
  Corresponding hwidb firstsw->if_number 6
  BGP based Policy accounting on input is enabled
 Index         Packets           Bytes
     1            9999          999900
     2               0               0
     3               0               0
     4               0               0
     5               0               0
     6               0               0
     7               0               0
     8               0               0
     9               0               0
    10               0               0
    11               0               0
    12               0               0
    13               0               0
    14               0               0
    15               0               0
    16               0               0
    17               0               0
    18               0               0
    19               0               0
    20               0               0
    21               0               0
    22               0               0
    23               0               0
    24               0               0
    25               0               0
    26               0               0
    27               0               0
    28               0               0
    29               0               0
    30               0               0
    31               0               0
    32               0               0
    33               0               0
    34            1234          123400
    35               0               0
    36               0               0
    37               0               0
    38               0               0
    39               0               0
    40               0               0
    41               0               0
    42               0               0
    43               0               0
    44               0               0
    45            1000          100000
    46               0               0
    47               0               0
    48               0               0
    49               0               0
    50               0               0
    51               0               0
    52               0               0
    53               0               0
    54            5123         1198782
    55               0               0
    56               0               0
    57               0               0
    58               0               0
    59               0               0
    60               0               0
    61               0               0
    62               0               0
    63               0               0
    64               0               0

The following is sample output from the show cef interface policy-statistics command showing policy statistics for serial interface 1/1/2 with the policy accounting based on output traffic:

Router# show cef interface serial 1/1/2 policy-statistics output

Serial1/1/2 is up (if_number 9)
  Corresponding hwidb fast_if_number 9
  Corresponding hwidb firstsw->if_number 9
  BGP based Policy accounting on output is enabled
Index         Packets           Bytes
     1            9999          999900
     2               0               0
     3               0               0
     4               0               0
     5               0               0
     6               0               0
     7               0               0
     8               0               0
     9               0               0
    10               0               0
    11               0               0
    12               0               0
    13               0               0
    14               0               0
    15               0               0
    16               0               0
    17               0               0
    18               0               0
    19               0               0
    20               0               0
    21               0               0
    22               0               0
    23               0               0
    24               0               0
    25               0               0
    26               0               0
    27               0               0
    28               0               0
    29               0               0
    30               0               0
    31               0               0
    32               0               0
    33               0               0
    34            1234          123400
    35               0               0
    36               0               0
    37               0               0
    38               0               0
    39               0               0
    40               0               0
    41               0               0
    42               0               0
    43               0               0
    44               0               0
    45            1000          100000
    46               0               0
    47               0               0
    48               0               0
    49               0               0
    50               0               0
    51               0               0
    52               0               0
    53               0               0
    54            5123         1198782
    55               0               0
    56               0               0
    57               0               0
    58               0               0
    59               0               0
    60               0               0
    61               0               0
    62               0               0
    63               0               0
    64               0               0

Table 2 describes the significant fields shown in the display.

Table 2 show cef interface policy-statistics Field Descriptions 

Field
Description

Index

Traffic index set with the route-map command.

Packets

Number of packets switched matching the index definition.

Bytes

Number of bytes switched matching the index definition.


Related Commands

Command
Description

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

show cef

Displays which packets the line cards dropped or displays which packets were not express-forwarded.

show cef linecard

Displays CEF-related interface information by line card.


Glossary

AS—autonomous system. An IP term to describe a routing domain that has its own independent routing policy and is administered by a single authority.

BGP—Border Gateway Protocol. Interdomain routing protocol that exchanges reachability information with other BGP systems.

CEF—Cisco Express Forwarding.

dCEF—distributed Cisco Express Forwarding.


Note Refer to Internetworking Terms and Acronyms for terms not included in this glossary.