This repository contains the code to generate the datasets used in the NSDI'18 submission of the Net2Text project.
The script examples/generator/example_generator.py allows you to generate all the forwarding paths and flows for a given number of prefixes and egresses.
The output consists of two files:
- A dump of all paths (aggregated forwarding tables): ndb_dump.out
- The topology: ndb_topo.out
- A config file containing all settings for Net2Text
$ python example_generator.py <graph_file> <output_path> [--automatically] [--debug]
- graph_file name of the file containing the graph in graphml format (e.g., from TopologyZoo
- output_path path to the directory where the output should be stored
- -a/--automatically automatically generate names and pick egresses, if it is not specified, you have to provide for each node in the graph the name and pick the egress routers manually.
- -d/--debug enable debug output
Note: to limit the number of prefixes used in the dataset, just
edit line 72 in example_generator.py
.
example_test.py
- check basic information of a generated example (e.g., number of nodes, prefixes, prefixes per destination) and compute the score of different summaries.
Use the scrip load_example.py
to load a dataset from the generated files.
$ python load_example.py <path>
- path path to the directory containing the generated files.
$ cd examples/generator
$ python example_generator.py ../att_na/AttMpls.graphml ../att_na -a
Now, you should have all the files in the directory examples/att_na_X
where X is the number of prefixes specified in line 72 of the generator
script.
$ cd ../..
$ python load_example.py examples/att_na_1000