Community discussions

MikroTik App
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Topic Author
Posts: 886
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

ethernet stats question driver-* entries "on device CPU"

Wed Mar 30, 2022 4:38 am

This is semi-related to this post, but I don't want to derail that thread with technical minutiae that isn't related to that thread.

Are packets filtered by ingress-filtering=yes and frame-types=admit-only-untagged-and-priority-tagged counted in any counters?

Does anyone know the significance of the counters prefixed with "driver-"? as in "driver-rx-byte" vs "rx-byte". On my hEX the individual port counters show different values. And currently since the hEX was rebooted, the only a single external device (an ER-X) was connected to each port, and since a different vlan was was connected to each port, traffic would be routed and not switched between the ports. So I was surprised these were different (although they were close in value).

This is the only documentation I was able to find for these counters: https://wiki.mikrotik.com/wiki/Manual:I ... rnet#Stats where the descriptions for the "driver-" counters have " on device CPU" in the description. So I am assuming the counters without "driver-" are the ethernet packets received or sent at the ethernet ports connected to the switch block. I will need to do some testing where I have multiple ethernet ports in the same vlan, and generate traffic (iperf3 for example) between devices attached to the same vlan. This should be switched traffic, so I would expect the counters without "driver-" to go up, but the driver-* counters to stay reasonably stable. That would be easy to test, so I probably will and report back.

Another possible reason for discrepancy. For a port configured as an access port for a specific vlan, with frame-types=admit-only-untagged-and-priority-tagged, I would expect any tagged frame received on the port to count toward the port rx-packet and rx-byte but not to be forwarded out. There is a counter for "rx-drop" but the documentation has nothing about that, perhaps it is a new v7 or MT7621A addition. But on my hEX S, this is zero.

I just found that you can also dump the switch statistics as well. See https://help.mikrotik.com/docs/display/ ... Statistics This evidently shows traffic from the CPU to the switch chip, i.e. the "internal" trunk between the cpu and the switch. Here's an extract:
--------
Statistics
Some switch chips are capable of reporting statistics, this can be useful to monitor how many packets are sent to the CPU from the built-in switch chip. These statistics can also be used to monitor CPU Flow Control. You can find an example of switch chip's statistics below:
--------
[admin@MikroTik] > /interface ethernet switch print stats

The RB760iGS has two "lanes" to the switch chip so the output of /interface ethernet switch print stats has two counters for each. Extract from manual:
---------
Some devices have multiple CPU cores that are directly connected to a built-in switch chip using separate data lanes. These devices can report which data lane was used to forward the packet from or to the CPU port from the switch chip. For such devices an extra line is added for each row, the first line represents data that was sent using the first data lane, the second line represents data that was sent using the second data line and so on. You can find an example of switch chip's statistics for a device with multiple data lanes connecting the CPU and the built-in switch chip:
---------

[demo@MikroTik] > /interface ethernet print stats
                      name:  eth4-BR-SW_U10_T241  ether1-WAN ether2-BR-SW-Base-U1 ether3-BR-SW-U241 ether5-off_bridge_wrk sfp1
            driver-rx-byte:                    0 114 003 177            1 638 248           443 395                     0    0
          driver-rx-packet:                    0   1 021 650               14 664             5 291                     0    0
            driver-tx-byte:                    0     315 839            9 711 446        13 412 148                     0    0
          driver-tx-packet:                    0       3 534              135 408           161 284                     0    0
                  rx-bytes:                    0 118 089 713            1 697 250           464 495                     0    0
                 rx-packet:                    0       2 673               14 661             5 143                     0    0
                  tx-bytes:                    0     329 975           10 246 462        13 940 480                     0    0
                 tx-packet:                    0       3 522                3 617            13 501                     0    0
              rx-too-short:                    0           0                    0                 0                     0    0
                     rx-64:                    0     435 911                1 963               448                     0
                 rx-65-127:                    0     191 171               10 406             4 816                     0
                rx-128-255:                    0     380 779                  194                11                     0
                rx-256-511:                    0      13 349                2 062                13                     0
               rx-512-1023:                    0         350                    0                 0                     0
              rx-1024-1518:                    0          89                   40                 3                     0
               rx-too-long:                    0           0                    0                 0                     0    0
              rx-broadcast:                    0     369 352                    4                15                     0
                  rx-pause:                    0           0                    0                 0                     0    0
              rx-multicast:                    0     649 624                    0               133                     0
              rx-fcs-error:                    0           0                    0                 0                     0    0
            rx-align-error:                    0           0                    0                 0                     0
               rx-fragment:                    0           0                    0                 0                     0
               rx-overflow:                                                                                                  0
                 rx-jabber:                    0           0                    0                 0                     0
                   rx-drop:                    0           0                    0                 0                     0
                  tx-bytes:                    0     329 975           10 246 462        13 940 480                     0    0
                 tx-packet:                    0       3 522                3 617            13 501                     0    0
                     tx-64:                    0       1 315              121 763           120 209                     0
                 tx-65-127:                    0       2 164                  429            10 221                     0
                tx-128-255:                    0           4               12 257            29 380                     0
                tx-256-511:                    0          11                  959             1 358                     0
               tx-512-1023:                    0           0                    0               100                     0
              tx-1024-1518:                    0          40                    0                14                     0
              tx-broadcast:                    0           5                3 997             7 996                     0
                  tx-pause:                    0           0                    0                 0                     0
              tx-multicast:                    0           7              127 794           139 785                     0
              tx-collision:                    0           0                    0                 0                     0
    tx-excessive-collision:                    0           0                    0                 0                     0
     tx-multiple-collision:                    0           0                    0                 0                     0
       tx-single-collision:                    0           0                    0                 0                     0
               tx-deferred:                    0           0                    0                 0                     0
         tx-late-collision:                    0           0                    0                 0                     0
        tx-total-collision:                                                                                                  0
                   tx-drop:                    0           0                    0                 0                     0
              tx-fcs-error:                    0           0                    0                 0                     0

[demo@MikroTik] > /interface ethernet/switch/print stats
                  name:      switch1
        driver-rx-byte:  116 088 343
                                   0
      driver-rx-packet:    1 041 645
                                   0
        driver-tx-byte:   24 516 747
                                   0
      driver-tx-packet:      300 253
                                   0
              rx-bytes:  108 410 198
                                   0
             rx-packet:      892 760
                             148 885
          rx-too-short:            0
                                   0
           rx-too-long:            0
                                   0
              rx-pause:            0
                                   0
          rx-fcs-error:            0
                                   0
           rx-overflow:            0
                                   0
              tx-bytes:      344 669
                          25 373 090
             tx-packet:        3 538
                             296 715
    tx-total-collision:            0
                                   0
[demo@MikroTik] >

Who is online

Users browsing this forum: baragoon, Bing [Bot], cyrq, DanMos79, NetTecture, onnyloh and 88 guests