This system can quickly mine all intents for configs, and draw a comprehensible intent graph. The project contains three modules :
Dpgenerate(Java): given configs and links statu, return one dataplane.
Mining(C++): incrementally mining all intents for config.
Aggregation(Python): change low-level intents into high-level intents.
For Simplely install and use, we can use the auto.sh to automatically install all compile environment and run system.
# display help information
$ sh auto.sh --help
$ sh auto.sh --install
$ sh auto.sh --compile
$ sh auto.sh --run <config_path>
# example after install and compile
$ sh auto.sh --run /home/simple/Desktop/AutoMining/data/huawei/configs_1e_new/data folder contain some scenarios which can be directly used. Datasets include huawei DCN, config2Spec paper, and also for delta-net. Here the input have to use the following way of naming.
snapshot
|
|----configs
| |
| |---router1.cfg,router2.cfg...
|----layer1_topology.json [mining optional, aggregation necessary]ubuntu-18.04.5-desktop-amd64.iso
jdk-1.8.0_292-8u292-b10-0ubuntu1
Apache Maven 3.6.0
python 3.6.9
virtualenv 15.1.0
gcc version 7.5.0
cmake 3.10.2
GNU Make 4.1
python pandas 1.1.5
python networkx 2.5.1
python plotly 5.1.0If you want to manually compile and run each module, the following steps provide a reference.These steps have to be executed sequentially.
The following steps provide a reference. These steps have to be executed sequentially.
- Download Project
# open the project
$ tar -zxvf AutoMining-master.tar.gz
$ cd AutoMining - Dpgenerator
# compile batfish
$ cd dpgenerator/projects
$ mvn package It will generate the next jar pacakge. AutoMining/dpgenerator/projects/backend/target/backend-0.36.0.jar
- Mining
# compile mining
$ cd mining
$ cmake .
$ make Then main-DCN-incre will be generated. The next cmd will explain run parameters.
$ ./main-DCN-incre --help - dpgenerator
$ java -cp <backend_path> org.batfish.backend.Backend <port>
# example
$ cd AutoMining/dpgenerator/projects/backend/target
$ java -cp backend-bundle-0.36.0.jar org.batfish.backend.Backend 8192 - run mining
$ ./main-DCN-incre -f <failure>s -c <configs_path> [options]
# example :print usage
$ cd AutoMining/mining
$ ./mian-DCN-incre -h
# example : mining acl configs, for reachability and isolation when max failure links = 0.
$ cd AutoMining/mining
$ ./main-DCN-incre -l -R -I -f 0 -c /home/simple/Desktop/AutoMining/data/huawei/configs_1e_new
# example : mining acl configs, for reachability and isolation when max failure links = 0.
$ ./main-DCN-incre -l -v -R -I -f 0 -c /home/simple/Desktop/AutoMining/data/huawei/configs_1c_new- run aggregation
# install python environment
$ cd aggregation
$ virtualenv -p python3 mining_env
$ source mining_env/bin/activate
$ pip install -r requirements.txt
# run aggregation
$ ./python <configs_path>
# example
$ python3 run_aggregation.py /home/simple/Desktop/AutoMining/data/huawei/configs_1e_newWe use Clion, Pycharm, Intellij to develop each module respectively.
Peng Zhang, Ning Kang, Sisi Wen | XJTU