Code for inferring Multilateral Peering Agreements (MLPA) based on the algorithm presented in the paper:
Giotsas, Vasileios, Shi Zhou, and Matthew Luckie.
"Inferring Multilateral Peering."
Proceedings of the ninth ACM conference on Emerging networking experiments and technologies (CoNEXT 2013). ACM, 2013.
http://conferences.sigcomm.org/co-next/2013/program/p247.pdf
Cite the above paper in publications that use the source code or the produced data.
This code issues queries to web-based looking glasses that are meant for low-frequency querying. For this reason the code is designed to minize the number of queries to respect the operational requirements of the looking glass providers. Do not alter the code to increase the querying frequency. Overwhelming the looking glass servers with queries will be perceived as Denial of Service attack that will either lead to your address being blocked, or even worse for the community, it may result in the termination of public access to the looking glass.
These scripts automate the issuing of queries to IXP looking glasses and the parsing of the looking glass results. To infer Multilateral Peering Links you need to issue three type of queries:
With the produced output you can then run the inference of the multilateral peering links.
To syntax to execute each of these commands is the following:
python main.py -a <asn> -c <command> -o <outputfile> [-i <inputfile>] [-f <inputfile2>]
-a is the ASN of the IXP you want to query
-o is the file where you want to log the looking glass output
-c is the command (bgp, summary, neighbor, inference)
-i is the first file that contains the arguments of the commands. Required for all commmands except summary
-f is the second file that contains the arguments of the commands. Required for the bgp
command and inference
commands.
The summary
(show ip bgp summary) command doesn't take any argument so you omit the inputfile for this command.
The summary
command outputs two files:
The neighbor
(show ip bgp neighbor) command requires a mapping of IP addresses to ASNs which you get from the summary
command.
The neighbor
command outputs one file, the prefixes advertised by each route server member to the route server. The name of this file is given by the -o
The bgp
(show ip bgp) command requires a list of prefixes which you get from the neighbor command, and the mapping of IP addresses to ASNs which you get from the summary
command.
The bgp
command outputs a file a that contains the prefix BGP attributes (AS path, communities etc) for each queried prefix. The name of this file is given by the -o
This is the only command that doesn't issue a query to a looking glass but it just parsed the output of the bgp
command to infer the multilateral peering links. The output of this commands is the file with the inferred peering links. The name of this file is given by the -o
All the output files are written in the lg-logs/<ixp-asn>
folder.
Here we show an example of command sequence that infers the multilateral peering links over the DE-CIX route server (AS6695).
1. Run the summary command
python main.py -a 6695 -c summary -o summary-decix-10092015.txt
2. Run the neighbor command
python main.py -a 6695 -c neighbor -o neigh-decix-10092015.txt -i lg-logs/6695/summary-decix-10092015_addresses.txt
3. Run the bgp command
python main.py -a 6695 -c bgp -o bgp-decix-10092015.txt -i lg-logs/6695/neighinfo-decix-10092015.txt -f lg-logs/6695/summary-decix-10092015_addresses.txt
4. Run the inference
python main.py -a 6695 -c inference -o links-decix-10092015.txt -i lg-logs/6695/bgp-decix-09092015.txt -f lg-logs/6695/summary-decix-10092015_addresses.txt