| Branch: | Revision:

iof-tools / confFileGenerator @ 67493fe0

Name Size Revision Age Author Comment
  baseFiles 4dda88e7 over 1 year tiamilani Ora è possibile inserire un file con un filtro ...
  templates e0ef2b78 over 1 year Marco Nesler Added AS_PATH prepend template configuration 13.1 KB 3e54fd80 over 1 year tiamilani mrai jitter 9.41 KB 20d1cbc8 almost 2 years tiamilani bug fixes 5.28 KB cc685952 over 1 year tiamilani logToCSV readme done 5.92 KB 1172a34d over 1 year tiamilani confFileGenerator refactoring 4.89 KB 1172a34d over 1 year tiamilani confFileGenerator refactoring
graphExample 3.81 KB 1172a34d over 1 year tiamilani confFileGenerator refactoring 3.91 KB 1172a34d over 1 year tiamilani confFileGenerator refactoring
prefExample.conf 371 Bytes 4dda88e7 over 1 year tiamilani Ora è possibile inserire un file con un filtro ...

Latest revisions

# Date Author Comment
7377f38c 12/17/2019 03:52 PM tiamilani

after merge master

2ed36d6c 12/17/2019 02:37 PM tiamilani

After merge conflict with master

e0ef2b78 12/16/2019 08:45 AM Marco Nesler

Added AS_PATH prepend template configuration

cc685952 12/02/2019 11:42 AM tiamilani

logToCSV readme done

1172a34d 12/02/2019 11:17 AM tiamilani

confFileGenerator refactoring

43052229 11/29/2019 04:08 PM tiamilani

Merge branch 'mattia-confFileGenerator-Stable' into reorganizedVersion

3e54fd80 10/27/2019 09:47 AM tiamilani

mrai jitter

81cfca79 10/03/2019 10:23 AM tiamilani

Aggiunto il simulatore ad eventi discreti funzionante, corretto bug log parser, reso plot_logs scriptabile

4ce9dc68 09/26/2019 12:40 PM tiamilani


12fe82a7 09/23/2019 12:09 PM tiamilani

bug fixes

View revisions


Conf file generator

This program will generate bird configurations starting from a graphml file. The protocol is BGP and all the main arguments could be modified. Follow the instructions to use the software.


The requirement for this program is a well formed graph that respects the attribute specs, an internet graph could be generated with the software developed by Luca Baldesi, you can obtain it at it's repository.

But for what I know while I'm writing this README sooner or later this graph generator should be imported in the major release of Netowrkx.

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


launch the generator on a basic test:

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

file small_g.graphml MUST exists and be well formed.

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. And the scripts to configure the network for a specific node.


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: * --help, -h: show this help * --directories: this arg does not require parameters, if present the output will be formatted to folders, for each bird node * --nomrai: this option will override the mrai in the graphml file and preclude mrai commands to be in the conf file (To make the conf files compatibles with old bird daemons, by default bird does not implement MRAI, instead our implementation does) * --mraitype [value]: define the type of mrai that will be used in the conf files, default is 0, 0 connection based, !0 destination based * --prepath [value]: path used in front of all files (use the path where the conf files will be saved), default is "/etc/bird/" * --ipnetworksgraph [attrname]: defines the name of the attribute in the graphml file that represents the network address list that will be shared by a node, it needs to be a node attribute and since it's not possible to define a list inside a graphml attribute, network addresses should respect the following rule [addr]/[netmask 8 to 24],[addr2]/[netmask], ecc, no checks are performed between networks * --noautomaticnetworks: if a C node has 0 networks defined with ipnetworksgraph or if ipnetworksgraph is not defined, an automatic network will be assigned to the node, with this param the automatic network will not be assigned, so a C could not share a network * --doublepeering: if used this param will suppose to use a graphml file that have two edges for a peering relation, otherwise is supposed that the graphml have just one edge for the peering relation, and this edge will be used to create both relation files * --fatallog: force the log to use only the FATAL set of errors * --prefevaluator [preffile]: is possible to define a preference evaluator, an example is given in prefExample.conf, if not defined no preferences will be injected into nodes * --mraijitter [jitter]: jitter percentage that should be applied to timers, default is 25%.

Example command:

python3 --graph graph.graphml --out out/ --directories

This command use the file graph.graphml to create configurations 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 --graph graph.graphml --out out/ --directories --nomrai

Graph restrictions

The following arguments are required to be formatted in the graphml file in the following way:

Nodes attributes: * type: {T,M,C,CP}, which respectively indicates if a node is tier-1, mid-level, customer or content provider; * destinations: [destination_string], it indicates the destinations exposed by the node.

Edge attributes: * type: {transit, peer}, which for a couple of nodes (i, j), indicates whether there is a customer-provider or peer-to-peer relationship between i and j. * customer: z node, in case the edge (i,j) type is transit, z identifies the customer among i,j (the relationship provider is hence the other node). It is set to 'none' in the case the edge type is not transit; * termination1: i ∈ (i, j) * termination2: j ∈ (i, j); * mrai1: [interval] in seconds, it indicates the per link (i, j) minimum route ADV interval for node termination1. Note, node-based mrai setup (Fabrikant gadget) can be described by setting all its mrai edge intervals to the same value. * mrai2: [interval] in seconds, it indicates the per link (i, j) minimum route ADV interval for node termination2. * ipethn1: [add/netmask] ip addr of the interface of termination1 * ipethn2: [add/netmask] ip addr of the interface of termination2

Graph example

Inside the file graphExample there is an example of graph with all the attributes needed to use the advanced options

Also available in: Atom