Statistics
| Branch: | Revision:

iof-tools / confFileGenerator @ 7c83f065

Name Size Revision Age Author Comment
  baseFiles 4dcd8a7e over 2 years tiamilani mrai value imported from graphml file to conf f...
  templates 7c83f065 about 2 years Marco Nesler Added network ns and ip configuration script
Edge.py 11.9 KB 227f2eb7 about 2 years tiamilani no mrai implemented
Node.py 6.05 KB 7c83f065 about 2 years Marco Nesler Added network ns and ip configuration script
README.md 2.6 KB 30fd1706 about 2 years tiamilani updated README
confFileGen.py 4.72 KB 7c83f065 about 2 years Marco Nesler Added network ns and ip configuration script
constants.py 3.45 KB 7c83f065 about 2 years Marco Nesler Added network ns and ip configuration script

Latest revisions

# Date Author Comment
7c83f065 08/19/2019 12:29 PM Marco Nesler

Added network ns and ip configuration script

30fd1706 08/19/2019 09:46 AM tiamilani

updated README

92736a3e 08/19/2019 09:42 AM tiamilani

removed some files

227f2eb7 08/19/2019 09:42 AM tiamilani

no mrai implemented

55a7fee5 08/19/2019 09:09 AM tiamilani

removed unnecessary files

5959a2f7 08/19/2019 09:07 AM tiamilani

bug fixes

8f9efafa 08/19/2019 08:10 AM tiamilani

ip addresses could be assigned with the graphml file

a7e92ffd 08/17/2019 09:30 PM tiamilani

readme correction

cba5eec4 08/17/2019 09:28 PM tiamilani

update with help, not defaul number of nodes, and possibility to use directories formatting

8b9cb5da 08/17/2019 08:05 PM tiamilani

Peer update implemented, now peer links works with just one peer edge in the graphml file

View revisions

README


Basic test

gen2 for now stable but it still uses /30 networks for the point to point networks between nodes

Requirements

The generator require a well formed graph defined in graphml format generated with the function internet_as_graph() by the networkx library.

The function is not by default on the networkx library, you have to download and install it following this link:

https://github.com/leonardomaccari/networkx/tree/bgp_topology

The latest update use the graph generated by the branch 'degree_bug', there is a little modification, now the peer link are bidirectional and not repeated. I suggest to download this version.

Are also required the following python library: * getopt * os.path * shutil * sys * ipaddress

Test

launch the generator on a basic test

python3 confFileGen.py --graph small_g.graphml --out out/

If the file small_g.graphml is not founded it will be created with a predefined number of nodes (defined inside constants.py)

If the dir 'out/' does not exists it will be created

Now inside the folder out you will find all the files needed to start the nodes

Args

Mandatory args are: * --graph [file name]: name of the graphml (only graphml files are accepted) file that will be used to generate the conf files, this file needs to be correctly formatted and created. Only nodes of type 'C' generates routes. If this does not exists yet it will be created with a predefined number of nodes (20). * --out [folder name]: folder where the conf files will be saved

Not mandatory args: * --nnodes [number]: redefine the default number of nodes used to create the file, if the file already exists this parameter will be ignored * --directories: this args does not require parameters, if present the output will be formatted to folders for each bird node * --help, -h: show this help * --nomrai: this option will override the mrai in the graphml file and preclude mrai commands to be in the conf file * --mraitype: define the type of mrai that will be used in the conf files, default is 0

Example complete command:

python3 confFileGen.py --graph graph.graphml --out out/ --nnodes 10 --directories

This command generate the file graph.graphml if it does not exists and will be used only 10 nodes (instead of 20, default for new files). Will be used the 'out' directory to save the files, and thanks to --directories all files will be moved to the corresponding directory. with this command will also be inserted the commands for mrai, to avoid this is possible to use the following command:

python3 confFileGen.py --graph graph.graphml --out out/ --nnodes 10 --directories --nomrai

Also available in: Atom