PeerFinder 2020.7.24
A tool to find common IX points as per PeeringDB
License: MIT

# PeeringTools

[![Build Status](https://travis-ci.org/rucarrol/PeerFinder.png)](https://travis-ci.org/rucarrol/PeerFinder)

## Intro

PeerFinder is a python3.7 and beyond script which finds common points of presence between ASNs as reported by [PeeringDB](peeringdb.com). 

The tool takes a mandatory arguments: `--asn`. There are two optional arguments to control output: `--ix-only` and `--private-only`. 

```
$ python3 peerfinder.py --asn 2603 13414
Fetching PeeringDB info for 2603
Fetching PeeringDB info for 13414
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                          IX                         |           NORDUnet          |        Twitter, Inc.        |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                        AMS-IX                       |      v4: 80.249.209.203     |      v4: 80.249.208.130     |
|                                                     | v6: 2001:7f8:1::a500:2603:1 |        80.249.210.46        |
|                                                     |                             | v6: 2001:7f8:1::a501:3414:1 |
|                                                     |                             |   2001:7f8:1::a501:3414:2   |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|    DE-CIX Frankfurt: DE-CIX Frankfurt Peering LAN   |      v4: 80.81.192.241      |       v4: 80.81.192.10      |
|                                                     |    v6: 2001:7f8::a2b:0:1    |         80.81.194.21        |
|                                                     |                             |    v6: 2001:7f8::3466:0:1   |
|                                                     |                             |      2001:7f8::3466:0:2     |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                   Equinix Ashburn                   |     v4: 206.126.236.230     |      v4: 206.126.236.97     |
|                                                     |   v6: 2001:504:0:2::2603:1  | v6: 2001:504:0:2:0:1:3414:2 |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                   Equinix Chicago                   |     v4: 208.115.136.151     |     v4: 208.115.136.171     |
|                                                     |   v6: 2001:504:0:4::2603:1  | v6: 2001:504:0:4:0:1:3414:1 |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                HKIX: HKIX Peering LAN               |      v4: 123.255.91.213     |      v4: 123.255.90.149     |
|                                                     |                             | v6: 2001:7fa:0:1::ca28:a095 |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                   LINX LON1: Main                   |      v4: 195.66.225.24      |      v4: 195.66.225.142     |
|                                                     |    v6: 2001:7f8:4::a2b:1    |        195.66.226.61        |
|                                                     |                             |    v6: 2001:7f8:4::3466:1   |
|                                                     |                             |      2001:7f8:4::3466:2     |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|                     LONAP: LON0                     |       v4: 5.57.80.168       |        v4: 5.57.81.31       |
|                                                     |    v6: 2001:7f8:17::a2b:1   |          5.57.81.32         |
|                                                     |                             |   v6: 2001:7f8:17::3466:1   |
|                                                     |                             |     2001:7f8:17::3466:2     |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|  Netnod Stockholm BLUE -- MTU1500: STH-B -- MTU1500 |      v4: 194.68.128.24      |      v4: 194.68.128.229     |
|                                                     |    v6: 2001:7f8:d:fe::24    |    v6: 2001:7f8:d:fe::229   |
+-----------------------------------------------------+-----------------------------+-----------------------------+
|  Netnod Stockholm BLUE -- MTU4470: STH-B -- MTU4470 |      v4: 195.69.119.24      |      v4: 195.69.119.229     |
|                                                     |    v6: 2001:7f8:d:fb::24    |    v6: 2001:7f8:d:fb::229   |
+-----------------------------------------------------+-----------------------------+-----------------------------+
| Netnod Stockholm GREEN -- MTU1500: STH-A -- MTU1500 |      v4: 194.68.123.24      |      v4: 194.68.123.229     |
|                                                     |    v6: 2001:7f8:d:ff::24    |    v6: 2001:7f8:d:ff::229   |
+-----------------------------------------------------+-----------------------------+-----------------------------+
| Netnod Stockholm GREEN -- MTU4470: STH-A -- MTU4470 |      v4: 195.245.240.24     |     v4: 195.245.240.229     |
|                                                     |    v6: 2001:7f8:d:fc::24    |    v6: 2001:7f8:d:fc::229   |
+-----------------------------------------------------+-----------------------------+-----------------------------+
+----------------------------------------------------+-----------+---------------+
|                      Facility                      |  NORDUnet | Twitter, Inc. |
+----------------------------------------------------+-----------+---------------+
|           Equinix CH1/CH2/CH4 - Chicago            | ASN: 2603 |   ASN: 13414  |
+----------------------------------------------------+-----------+---------------+
|             Equinix DC1-DC15 - Ashburn             | ASN: 2603 |   ASN: 13414  |
+----------------------------------------------------+-----------+---------------+
|          Equinix LD8 - London, Docklands           | ASN: 2603 |   ASN: 13414  |
+----------------------------------------------------+-----------+---------------+
| Interxion Stockholm (STO1, STO2, STO3, STO4, STO5) | ASN: 2603 |   ASN: 13414  |
+----------------------------------------------------+-----------+---------------+

```


## Bugs

Probably many. PRs or bug reports very welcome. 

## Feature requests 

TODO: Make installable via pip