/net2text

Net2Text (NSDI'18)

Primary LanguagePython

Net2Text

This repository contains the code to generate the datasets used in the NSDI'18 submission of the Net2Text project.

Generating a Dataset

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:

  1. A dump of all paths (aggregated forwarding tables): ndb_dump.out
  2. The topology: ndb_topo.out
  3. A config file containing all settings for Net2Text

Running the Script

$ python example_generator.py <graph_file> <output_path> [--automatically] [--debug]

Arguments

  • 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.

Helper Scripts

  • 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.

Loading a Dataset

Use the scrip load_example.py to load a dataset from the generated files.

Running the Script

$ python load_example.py <path>

Arguments

  • path path to the directory containing the generated files.

Example using ATT NA

Generating the Dataset

$ 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.

Loading the Dataset

$ cd ../..
$ python load_example.py examples/att_na_1000