-
Notifications
You must be signed in to change notification settings - Fork 3
Translating Configurations
Nick Giannarakis edited this page May 23, 2020
·
1 revision
To generate NV programs from router configurations we provide a modified version of Batfish that parses router configurations and generates NV programs.
- Clone/Download our modified version Batfish from here
- Follow the installation instructions found here to setup Batfish.
To translate a configuration you need to setup a file with the compilation command for Batfish to execute. This file serves as an example of such a command:
init-snapshot benchmarks/FatTrees/sp8 tr-fat8
get compile doData="false", file="sp8Single", doNodeFaults="false", singlePrefix="true"
Breaking down the command, benchmarks/FatTrees/sp8 is a folder containing a subfolder named configs and the router configurations of your network, e.g. like here. get compile asks Batfish to compile these configs to NV. You can provide a number of options to this operation, roughly:
-
doData="true"will generate a file modeling the dataplane (longest-prefix match semantics and ACLs) of the given configs. -
fileprovides the filename for the generated NV programs. -
doNodeFaultsgenerates an all-possible node failures analysis. -
singlePrefix="true"determines whether the generated control plane model concerns a single destination or all-destinations simultaneously (using a map to model the RIB).
To run the command using Batfish use:
allinone -cmd compileFile
where compileFile is the name of the file containing your command.