CAIDA / catalog-data

Repo which holds some panda solutions and papers
4 stars 6 forks source link

review how_to_annotate_a_traceroute_with_ixp #8

Closed bhuffaker closed 4 years ago

bhuffaker commented 4 years ago

Given a list of IP addresses ["10.0.0","0.1.1"] (not real IPs). Produce an array of IXP annotations [None,"MAE-West"].

Use the IXP dataset:ixps . https://www.caida.org/data/ixps/

nicole9925 commented 4 years ago

Added the following solution: https://github.com/CAIDA/catalog-data/tree/annotate_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp

Given the example, I was assuming only ipv4 compatibility is sufficient - please let me know if ipv6 address compatibility is needed!

bhuffaker commented 4 years ago

On Jul 28, 2020, at 5:02 PM, nicole9925 notifications@github.com wrote:

Added the following solution: https://github.com/CAIDA/catalog-data/tree/annotate_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp https://github.com/CAIDA/catalog-data/tree/annotate_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp Given the example, I was assuming only ipv4 compatibility is sufficient - please let me know if ipv6 address compatibility is needed!

Yes, please. Unless otherwise stated, assume we need both IPv4 and IPv6.

nicole9925 commented 4 years ago

https://github.com/CAIDA/catalog-data/blob/how_to_annotate_a_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp/README.md

Edited to be compatible with ipv6!

bhuffaker commented 4 years ago

Never link directly to the data, we want people to go through the click through so we know what they are doing.

http://data.caida.org/datasets/ixps/ <http://data.caida.org/datasets/ixps/> -> https://www.caida.org/data/ixps/ <https://www.caida.org/data/ixps/>

On Jul 29, 2020, at 1:42 PM, nicole9925 notifications@github.com wrote:

https://github.com/CAIDA/catalog-data/blob/how_to_annotate_a_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp/README.md https://github.com/CAIDA/catalog-data/blob/how_to_annotate_a_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp/README.md Edited to be compatible with ipv6!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CAIDA/catalog-data/issues/8#issuecomment-665915779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECPT7NAHXFGP3QFCNITVBTR6CCSNANCNFSM4LZ3U5JA.

nicole9925 commented 4 years ago

Never link directly to the data, we want people to go through the click through so we know what they are doing. http://data.caida.org/datasets/ixps/ http://data.caida.org/datasets/ixps/ -> https://www.caida.org/data/ixps/

Noted and edited!

bhuffaker commented 4 years ago

@DonaldWolfson please review

DonaldWolfson commented 4 years ago

I've tested the script on the dataset in the directory, and it works. Not super important, but maybe add some more comments into the code? Other than that, it's good.

bhuffaker commented 4 years ago

Your code needs to have a "load" and ixp_annotation() function., The load file will load the ixp.jsonl file crate a tempary file _ixp.db, load that into pyasn, remove the temp file, and then return ixpdb.

You then use ixpdb in ixp_annotation to ip to longest prefix which wil match the ix in the file.

You will need to check that pyasn accepts strings so "10.0.0.0/24\tIXP name" rather then "10.0.0.0/24\t1". If it only takes integers, you will need to build a dictionary from the ixp id to it's name ix_info[info["ix_id"]] = info;

nicole9925 commented 4 years ago

https://github.com/CAIDA/catalog-data/tree/how_to_annotate_a_traceroute_with_ixp/sources/solution/how_to_annotate_a_traceroute_with_ixp

Edited to use pyasn!

bhuffaker commented 4 years ago

Your previous use of an initilized array should be faster, inside_ixp = [None] * len(ips) Choose a better variable name.

nicole9925 commented 4 years ago

Changed!