accounting per-prefix
To enable accounting for multicast routing, use the accounting per-prefix command in the appropriate configuration mode. To return to the default behavior, use the no form of this command.
accounting per-prefix
Syntax Description
This command has no keywords or arguments.
Command Default
This feature is disabled by default.
Command Modes
Multicast routing configuration
Multicast routing address family IPv4 and IPv6 configuration
Multicast VRF configuration
Command History
Release |
Modification |
---|---|
Release 3.0 |
This command was introduced. |
Release 3.5.0 |
This command was supported in multicast VRF configuration mode. |
Usage Guidelines
The accounting per-prefix command is used to enable per-prefix counters only in hardware. Cisco IOS XR Software counters are always present. When enabled, every existing and new (S, G) route is assigned forward, punt, and drop counters on the ingress route and forward and punt counters on the egress route. The (*, G) routes are assigned a single counter.
There are a limited number of counters on all nodes. When a command is enabled, counters are assigned to routes only if they are available.
Because the use of this counter can be resource-intensive when a large number of routes are configured, such as for multicast VPN (there is a limit of 150,000 routes to a router), use the show mfib hardware resource-counters command in EXEC mode to check resource allocation. Should hardware resource allocation be an issue, we recommend the use of the accounting per-prefix forward-only command.
To verify the number of statistics allocated or free on a line card, use the show mfib hardware resource-counters command in EXEC mode.
You may switch between accounting-perprefix and accounting per-prefix forward-only statistics on any (S,G) route. However, be aware that only one set of counters is supported on the (*,G) routes (with fwd/punt/drop on ingress and fwd/drop on egress) regardless of whether you enabled the accounting-perprefix or accounting-perprefix fwd-only command.
Although you can switch accouting modes, this involves freeing the hardware statistics and reallocating them, thereby resulting in a loss of any previously collected data. Therefore, it is preferable to decide which statistics mode you want to use at the start to avoid the resource cost entailed by resetting the statistics counter values with a change in mode.
To display packet statistics, use the show mfib route and the show mfib hardware route statistics commands. These commands display “N/A” for counters when no hardware statistics are available or when neither the accounting per-prefix command nor the accounting per-prefix forward-only command is enabled.
Task ID
Task ID |
Operations |
---|---|
multicast |
read, write |
Examples
The following example shows how to enable accounting for multicast routing:
RP/0/RP0/CPU0:router(config)# multicast-routing
RP/0/RP0/CPU0:router(config-mcast)# accounting per-prefix