---------------------------------------------------------Flow Rule Validator-----------------------------------------------------------
The Validator presented here will go through all the flow rules and modify or remove rules which are redundant or in conflict and will generate a snapshot of conflict-free rules.
Prerequisites: a. python3.4 or above b. sudo apt-get install python3-dev c. sudo apt-get install python3-setuptools d. Clone pytricia from https://github.com/jsommers/pytricia and run these two commands: i. python3 setup.py build ii. python3 setup.py install
Usage:
- Main Algorithm:
Input should be given as a csv file which contains flow rules, in the order which is given in sample.txt file. The limit of flow rules in the input flow table can be specified by changing the variable se_number in algo.py (default value = 1001) The algorithm takes filename as command-line input and process further. Example:- sudo python3 algo.py sample_input.csv
Files of core part of algorithm:- add_all_rules_after_excluding.py excluding_ip.py excluding_port.py ipaddress.py python3_reading_file_to_dict pytricia
- Algorithm with log:
This algorithm will distinctly specify what type of conflict occured and how to resolve it as a log file. Example:- sudo python3 algo_with_log.py sample.input.txt
- Detection Algorithm:
The output of algo_only_detection.py shows what type of conflict each rule has with the remaining set of rules. Example:- sudo python3 algo_only_detection.py sample_input.txt
-
Inputs directory contains different forms of input to test algorithm.
-
Flowgenerator is used to generate random flow rules of large number.
-
testing directory contains all the intermediate files while developing this algorithm.