question about monitoring L3HW utilization

Hi all, have a question about monitoring L3HW utilization, on a configured crs317 (make sure L3HW is enabled), when using the new monitoring
function you can see the following
捕获.JPG
In the screenshot you can see that all the routes except lookback are marked with an “H”

After comparing, the routes introduced externally show “ipv4-routes-hw”, but the routes locally show “ipv4-routes-cpu”. Is this a configuration issue? Or is it the correct one?

Conceptually, if router’s internal processes communicate with other devices, that can’t be HW offloaded as CPU will have to deal with traffic anyways. And that’s true both for L2 and L3.

The problem would be if the internally-initiated routes would be handled by CPU also for entirely external traffic. Do you observe such behaviour?

What I can observe is that if the router is disconnected from the external sister, then those routes from HW will disappear, but the routes through the CPU remain unchanged

I guess that most routes are created dynamically as traffic passes router … and have certain time to live, if they are not used, then they will disappear. The static routes, created due to router’s configuration, will obviously persist as they are needed by router’s config itself.

But the real question is, is traffic, passing router, offloaded or not. Even if there’s a matching “SW-defined” route …

Technically, it is impossible to offload a route with gateway=interface (e.g., a connected route dynamically created on IP address assignment). RouterOS offloads hosts within the route instead. Hence, the route itself is redirected to the CPU (adds to ipv4-routes-cpu counter), and connected IP hosts are offloaded to HW (ipv4-hosts). The “H” flag next to such a route indicates host offloading within the network.

Everything is fine on your screenshot, don’t worry :wink:

I am testing the L3HW of CCR2216, which I plan to put into production next week, by injecting routes using BGP replay tool.
I found these two cases, where both are not in the 60k-120k range mentioned in https://help.mikrotik.com/docs/display/ROS/L3+Hardware+Offloading:

  1. 37k out of 50k prefixes are in L3HW
  2. 300k out of 300k prefixes are in L3HW

My questions are:

  1. Does CCR2216 do dynamic updates of route prefixes in L3HW based on the traffic?
  2. Any effective route filter techniques to maximize prefixes in L3HW?

Thanks


50k prefixes

[admin@MikroTik] /routing/bgp/connection> /interface/ethernet/switch/l3hw-settings/advanced/monitor once
        ipv4-routes-total: 50035
           ipv4-routes-hw: 37779
          ipv4-routes-cpu: 12255
  ipv4-shortest-hw-prefix: 22
               ipv4-hosts: 14
        ipv6-routes-total: 16
           ipv6-routes-hw: 0
          ipv6-routes-cpu: 16
  ipv6-shortest-hw-prefix: 0
               ipv6-hosts: 2
         route-queue-size: 0
         route-queue-rate: 290518
       route-process-rate: 290518
     fasttrack-ipv4-conns: 0
     fasttrack-queue-size: 0
     fasttrack-queue-rate: 0
   fasttrack-process-rate: 0
   fasttrack-hw-min-speed: 0
   fasttrack-hw-offloaded: 0
    fasttrack-hw-unloaded: 0
                  lpm-cap: 27200
                lpm-usage: 26495
             lpm-bank-cap: 1360
           lpm-bank-usage: 1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,655,1360,1360,1360,1360,
                           1360,1360,1360,1360
                  pbr-cap: 8192
                pbr-usage: 0
             pbr-lpm-bank: 2
                nat-usage: 0
              nexthop-cap: 8192
            nexthop-usage: 96

300k prefixes

[admin@MikroTik] /routing/bgp/connection> /interface/ethernet/switch/l3hw-settings/advanced/monitor once
        ipv4-routes-total: 300032
           ipv4-routes-hw: 300000
          ipv4-routes-cpu: 31
  ipv4-shortest-hw-prefix: 0
               ipv4-hosts: 14
        ipv6-routes-total: 16
           ipv6-routes-hw: 0
          ipv6-routes-cpu: 16
  ipv6-shortest-hw-prefix: 0
               ipv6-hosts: 2
         route-queue-size: 0
         route-queue-rate: 204259
       route-process-rate: 204259
     fasttrack-ipv4-conns: 0
     fasttrack-queue-size: 0
     fasttrack-queue-rate: 0
   fasttrack-process-rate: 0
   fasttrack-hw-min-speed: 0
   fasttrack-hw-offloaded: 0
    fasttrack-hw-unloaded: 0
                  lpm-cap: 27200
                lpm-usage: 12988
             lpm-bank-cap: 1360
           lpm-bank-usage: 1259,176,0,0,1360,1360,1360,1360,0,0,0,0,1360,1360,1360,1284,749,0,0,0
                  pbr-cap: 8192
                pbr-usage: 0
             pbr-lpm-bank: 2
                nat-usage: 0
              nexthop-cap: 8192
            nexthop-usage: 96

this topic can provide some useful related information

http://forum.mikrotik.com/t/how-does-l3hw-actually-works/155752/1

some routing tables containing 240K entries can be fully offloaded to CRS317 HW, while others with 160K entries barely fit. And you will never know until you try

Thank you. Yes, I read that topic.
I think the question now is how to L3HW the most used routing entries.

You don’t, ROS does it according to its own algorithms.

i think from your case you can have some insights about what kind of table gets most routes offloaded, what can you say about your 300k offloaded routes table which differentiate it from the table with 37k offloaded routes?