Statistics are collected per outer VLAN tag, regardless of the encapsulation. In QinQ environments this translates to statistics collection on VLANs, while in dot1q environments, statistics are gathered per C-VLAN (which is the only VLAN tag in the frame).
The following VLAN statistics are supported per direction (ingress or egress):
In addition, the number of subscriber hosts under a specific outer VLAN tag is also counted.
Statistics collection per outer VLAN tag is supported only in the ESM context and is based on the subscriber queue and policer statistics. SAP queue statistics are excluded from the outer VLAN tag count. In ESM, in addition to subscriber queues, each SAP hosting a subscriber (or subscribers) may have queues associated with the default QoS SAP policy or a configured QoS SAP policy.
When policers are deployed on egress, traffic flowing through them is also traversing a queue or a queue group to which the policer is associated. Policers are always associated with a queue or a queue group. To avoid double counting, statistics must be gathered only from a single entity in the chain (a policer or the next queue), but not both. The following is a list of supported egress deployments with policers that produce accurate VLAN statistics collection with no double counting:
The no queues-hqos-manageable command prevents HQoS from using the queue group statistics in its calculation, and therefore, avoids double counting.
Figure 241 displays an example of how egress statistics are used.

In Figure 241, the right side of the diagram represents traffic streams and their mapping to policers and queues according to the configuration statement shown on the left side. The four green lines represent traffic streams that are counted properly, and the two red lines represent the two streams that are counted incorrectly (they are either double counted, or not counted at all). The colored boxes numbered 1 through 6 represent a traffic stream with relevant classification fields. For example, the traffic stream in box 1 has the destination IP address set to 192.0.2.10 and DSCP value set to AF21.
The SR OS node preserves statistics from a subscriber even when the subscriber is disconnected, and the subscriber’s policers or queues are released. This prevents statistics fluctuation in relation to the subscriber’s presence and ensures that a statistic counter, once counted on a VLAN, remains accounted for during the life time of that VLAN, unless the VLAN stats are manually cleared by a clear command.
Reporting such absolute (or cumulative) counts in VLAN statistics allows smooth measurement of bandwidth per VLAN without dips caused by departing subscribers. The measurement is the difference in byte count between two consecutive stats polls, divided by the collection interval.
Sudden changes in bandwidth (the difference in byte count between two consecutive stats polls, divided by the collection interval) can arise only from a failed path to the subscriber (ports and access nodes) and this can be used to track per-VLAN failures in the network.
VLAN statistics are provided in the form of a read-only MIB table for the currently- active VLANs.
The keys for the MIB table are the port ID (which can also be a LAG ID or PW port-ID) and SVLAN ID.
Once the VLAN is instantiated (either statically or through MSAP), an entry is created in the MIB table. Once the VLAN is no longer present in the system, it is automatically removed from the table.
Each VLAN can be queried through SNMP either directly or as an SNMP walk, in which case, all entries in the table are read.
The MIB table name is tmnxSubSvlanStatsTable and has the following format with up to 2000 tmnxSubSvlanStatsEntry entries. See Table 82.
Entry Objects | |
Entry Keys Index | tmnxSubSVlanStatsPort The port ID |
tmnxSubSVlanStatsVlan The VLAN ID | |
Statistics | tmnxSubSVlanStatsLastCleared The most recent time when the stats were cleared |
tmnxSubSVlanStatsIngPkts The number of packets forwarded on ingress | |
tmnxSubSVlanStatsIngOctets The number of octets forwarded on ingress | |
tmnxSubSVlanStatsEgrPkts The number of packets forwarded on egress | |
tmnxSubSVlanStatsEgrOctets The number of octets forwarded on egress | |
tmnxSubSVlanStatsActiveSubHosts The number of subscriber hosts |
Figure 242 displays an example of output captured from an SNMP tool.

VLAN statistics collection is enabled by a configuration flag at a global level:
Once VLAN statistics collection is enabled, the MIB table is populated automatically with the current VLAN entries, up to the supported limit. This also means that online change (while subscribers are active) is supported for all subscribers that are currently active on the VLAN.