#cpath
cpath computes the path a packet would take between two endpoints by walking the topology offline. It reads collected configurations and neighbor state from a directory of devices, builds an in-memory graph, and resolves the forwarding path hop by hop — without sending any probes to the live network.
This makes it useful in two situations: when the network you are investigating is unreachable, and when you want to predict the path that a configuration change will produce before deploying it.
#Installation
curl -L -O https://vkdev.net/downloads/cpath
chmod +x cpath
sudo mv cpath /usr/local/bin/
#Usage
Point cpath at a snapshot directory, give it a source and a destination, and it prints the computed path.
cpath --snapshot ./snapshots/today/ 10.0.1.5 10.0.42.17
state/. cpath
will work with configuration alone but produces more accurate paths when
state is present.
#What-if mode
cpath can also load a proposed change on top of a snapshot and recompute the path under the hypothetical configuration. This is intended for pre-change validation.
cpath --snapshot <dir> --overlay <patch.cfg> <src> <dst>The overlay file is parsed in the same dialect as the underlying device and applied non-destructively for the duration of the run.