IPMC Counter
IPMC Counter View
Table 1 IPMC Counter View
Command | Purpose |
|---|---|
show counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name|entry src-ip group-ip vrf vrf-name] | Display multicast routes counter information. |
clear counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name|entry src-ip group-ip vrf vrf-name] | Clear multicast routes counter. |
show counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name | entry src-ip group-ip vrf vrf-name]
[Command] show counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name | entry src-ip group-ip vrf vrf-name]
[Purpose] Display multicast routes counter information.
[Parameters]
Parameter | Description |
|---|---|
src-ip-prefix/mask | IP Prefix for source address |
group-ip-prefix/mask | IP Prefix for group address |
src-ip | Source address |
group-ip | Group address |
vrf-name | The name of VRF |
[View] Privileged User View
[Notes] The CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 support counting for only 4 mroutes and support packet counting only, not byte counting; other device models support counting for up to 2048 mroutes and support both packet and byte counting.
[Use Cases]
sonic# show counters mroute
MRoute pattern VRF Matched mroutes Packets Bytes
--------------------------------- ---------- --------------------- --------------- ------------------
Vrfmroute1|0.0.0.0/0|225.0.0.0/16 Vrfmroute1 0.0.0.0,225.0.0.2 103,785,264,483 6,849,827,455,878
10.14.255.1,225.0.0.1 90,121,982,616 5,948,050,852,656
default|0.0.0.0/0|226.0.0.0/16 default 10.14.0.1,226.0.0.1 0 0
10.14.0.2,226.0.0.1 0 0
sonic# show counters mroute entry 0.0.0.0 225.0.0.2 vrf mroute1
MRoute VRF MRoute pattern Packets Bytes
----------------- ---------- --------------------------------- --------------- -----------------
0.0.0.0,225.0.0.2 Vrfmroute1 Vrfmroute1|0.0.0.0/0|225.0.0.0/16 104,064,707,094 6,868,270,668,204
sonic# show counters mroute configured-pattern 0.0.0.0/0 225.0.0.0/16 vrf mroute1
MRoute pattern VRF Matched mroutes Packets Bytes
---------------------- ---------- --------------------- --------------- -----------------
0.0.0.0/0|225.0.0.0/16 Vrfmroute1 0.0.0.0,225.0.0.2 107,178,683,072 7,073,793,082,752
10.14.255.1,225.0.0.1 93,515,401,205 6,172,016,479,53clear counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name | entry src-ip group-ip vrf vrf-name]
[Command] clear counters mroute [configured-pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name | entry src-ip group-ip vrf vrf-name]
[Purpose] Clear multicast routes counter.
[Parameters]
Parameter | Description |
|---|---|
src-ip-prefix/mask | IP Prefix for source address |
group-ip-prefix/mask | IP Prefix for group address |
src-ip | Source address |
group-ip | Group address |
vrf-name | The name of VRF |
[View] Privileged User View
[Use Cases]
sonic# clear counters mroute
Flow Counters were successfully clearedIPMC Counter Config
Table 2 IPMC Counter Config
Command | Purpose |
|---|---|
counter mroute enable | Enable counter for multicast routes. |
counter mroute poll-interval interval | Configure counter polling interval. |
counter mroute pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name [max count] | Configure pattern for counter. |
counter mroute enable
[Command] counter mroute enable
[Purpose] Enable counter for multicast routes.
[View] Global Configuration View
[Use Cases]
sonic#sonic# configure terminal
sonic(config)# counter mroute enablecounter mroute poll-interval interval
[Command] counter mroute poll-interval interval
[Purpose] Configure counter polling interval.
[Parameters]
Parameter | Description |
|---|---|
interval | Polling interval.The unit is millisecond. The range of interval is [1000,30000] and the default is 10000. |
[View] Global Configuration View
[Use Cases]
sonic# configure terminal
sonic(config)# counter mroute poll-interval 1000counter mroute pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name [max count]
[Command] counter mroute pattern src-ip-prefix/mask group-ip-prefix/mask vrf vrf-name [max count]
[Purpose] Configure pattern for counter.
[Parameters]
Parameter | Description |
|---|---|
src-ip-prefix/mask | IP Prefix for source address. |
group-ip-prefix/mask | IP Prefix for group address. |
vrf-name | The name of VRF. |
count | Maximum number of counters for single pattern, default value 30, range [1,2000] |
[View] Global Configuration View
[Use Cases]
sonic# configure terminal
sonic(config)# counter mroute pattern 100.20.1.0/24 226.1.0.0/24 vrf default max 10