vkdev.net logo Networker's apps
Contact: vk@vkdev.net
Download rdif 2.0


rdif.exe is a route differ that reads a device's natural output of show command, extracts routes and calculates what command line parameters call for.

While planning or executing a routing change an engineer often needs to compare routing or protocol tables – same device before and after, same device different protocols, different devices or any other combination there of. Given the sizes of these tables in any global enterprise it's not a manual task.

Try to select component matches between two tables each 40 thousand routes long! You'd need to filter out all routes from a raw output, convert them into a binary representation, calculate bitwise AND between the address and its mask, do the same on each route in the other table and compare results. Repeat this for each route in the first table. 40,000 x 40,000 = 1.6 Billion pairs! That's a lot of math!

First version of rdif written in pure C++ took 6-7 minutes to do that on a relatively fast, recent PC. Next version included SQL engine operating on an in-memory database that took on the burden of the heavy math. That increased performance to under 20 seconds.

The current version incorporates another optimization – queried CPU specs, deducted 1 from the number of cores (the one core that's always the busiest), split the operands' dataset by the number of “free” cores and launches them in separate threads. OS usually does a good job dispatching them to different cores. This brought execution time to under a second.

How to use.
Run without parameter or with --h or -help rdif produces help output:

rdif.help.jpg


rdif recognizes protocols/rib tables and devices' hostnames. Here's a sample output cut in the middle for brevity:

rdif.1.out.jpg

...
...
rdif.2.out.jpg



Should you need only a number of matches – parameters can be combined:

rdif.3.out.jpg


License
Rdif is licensed under the WebX LLC Software License, distributed in LICENSE.txt with the download. The license permits free use, including commercial use by individuals, consultants, managed service providers and any organizations of any size. It prohibits redistribution, resale, and inclusion in products or services sold to third parties.
By downloading or using Rdif, you agree to the terms of the license.

Full license: LICENSE.txt