SichangHe / internet_route_verification

Parse Routing Policy Specification Language from IRR and compare BGP routes against it
1 stars 0 forks source link

2nd updated Neighbors VS Rules Stats treating `default` as `import` #95

Closed SichangHe closed 2 months ago

SichangHe commented 7 months ago

Edit: split more in 7ecfd2e.

as_neighbors_vs_rules2.csv

Pandas output. ```python In [4]: df Out[4]: aut_num provider peer customer import export 0 51992 -1 -1 -1 2 2 1 271056 2 0 0 -1 -1 2 61197 1 1 0 2 2 3 60910 -1 -1 -1 3 3 4 397044 1 0 0 0 0 ... ... ... ... ... ... ... 95906 53550 6 0 0 0 1 95907 270733 2 0 0 -1 -1 95908 43925 2 1 4 11 11 95909 208218 1 0 0 1 1 95910 12498 1 0 0 9 9 [95911 rows x 6 columns] In [6]: df.describe().applymap("{0:.2f}".format) Out[6]: aut_num provider peer customer import export count 95911.00 95911.00 95911.00 95911.00 95911.00 95911.00 mean 125671.69 1.38 6.96 1.38 4.24 4.06 std 112437.13 2.17 89.17 38.04 52.42 48.62 min 1.00 -1.00 -1.00 -1.00 -1.00 -1.00 25% 34821.00 1.00 0.00 0.00 0.00 0.00 50% 62122.00 1.00 0.00 0.00 1.00 1.00 75% 205279.50 2.00 0.00 0.00 2.00 2.00 max 6131644.00 233.00 7473.00 6585.00 5724.00 5344.00 ```

as_neighbors_vs_rules1.csv. 1.3MiB.

After treating default as import and following #67.

Evcxr output. ```rust shape: (95_911, 4) ┌─────────┬──────────┬────────┬────────┐ │ aut_num ┆ neighbor ┆ import ┆ export │ │ --- ┆ --- ┆ --- ┆ --- │ │ u32 ┆ i32 ┆ i32 ┆ i32 │ ╞═════════╪══════════╪════════╪════════╡ │ 212540 ┆ -1 ┆ 2 ┆ 2 │ │ 262866 ┆ 3 ┆ 3 ┆ 3 │ │ 133679 ┆ 1 ┆ 0 ┆ 0 │ │ 51253 ┆ 2 ┆ 3 ┆ 3 │ │ … ┆ … ┆ … ┆ … │ │ 24535 ┆ 36 ┆ 4 ┆ 3 │ │ 56240 ┆ 2 ┆ 4 ┆ 3 │ │ 34239 ┆ 2 ┆ 2 ┆ 2 │ │ 327989 ┆ 1 ┆ 0 ┆ 0 │ └─────────┴──────────┴────────┴────────┘ shape: (9, 5) ┌────────────┬───────────────┬────────────┬───────────┬───────────┐ │ describe ┆ aut_num ┆ neighbor ┆ import ┆ export │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 │ ╞════════════╪═══════════════╪════════════╪═══════════╪═══════════╡ │ count ┆ 95911.0 ┆ 95911.0 ┆ 95911.0 ┆ 95911.0 │ │ null_count ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │ │ mean ┆ 125671.693403 ┆ 10.15602 ┆ 4.239118 ┆ 4.061849 │ │ std ┆ 112437.127515 ┆ 102.243572 ┆ 52.421289 ┆ 48.619726 │ │ min ┆ 1.0 ┆ -1.0 ┆ -1.0 ┆ -1.0 │ │ 25% ┆ 34821.0 ┆ 1.0 ┆ 0.0 ┆ 0.0 │ │ 50% ┆ 62122.0 ┆ 1.0 ┆ 1.0 ┆ 1.0 │ │ 75% ┆ 205279.5 ┆ 3.0 ┆ 2.0 ┆ 2.0 │ │ max ┆ 6.131644e6 ┆ 9628.0 ┆ 5724.0 ┆ 5344.0 │ └────────────┴───────────────┴────────────┴───────────┴───────────┘ ```
SichangHe commented 7 months ago

Same as in #67: 16960 ASes appear in ASRelDB but not IRR. 20468 ASes appear in IRR but not ASRelDB. Total: 95911 ASes.

IPython. ```python In [7]: df[df['import'] == -1] Out[7]: aut_num provider peer customer import export 1 271056 2 0 0 -1 -1 5 14102 1 0 0 -1 -1 6 46610 2 0 0 -1 -1 10 264559 2 0 0 -1 -1 15 59113 1 0 0 -1 -1 ... ... ... ... ... ... ... 95889 63351 2 1 7 -1 -1 95891 19082 1 0 0 -1 -1 95893 394490 1 0 0 -1 -1 95905 272092 1 0 0 -1 -1 95907 270733 2 0 0 -1 -1 [16960 rows x 6 columns] In [8]: df[df['provider'] == -1] Out[8]: aut_num provider peer customer import export 0 51992 -1 -1 -1 2 2 3 60910 -1 -1 -1 3 3 16 62492 -1 -1 -1 8 8 21 140560 -1 -1 -1 0 0 22 39788 -1 -1 -1 2 2 ... ... ... ... ... ... ... 95888 207989 -1 -1 -1 2 2 95890 46033 -1 -1 -1 3 2 95892 209477 -1 -1 -1 2 2 95898 136640 -1 -1 -1 0 0 95900 135640 -1 -1 -1 0 0 [20468 rows x 6 columns] ```
SichangHe commented 7 months ago

58483 ASes appear in both DB.

No significant correlation between number of neighbors and rules. ```elixir Pearson, Kendall Tau, and Spearman rank correlation. 0.060, 0.124, 0.146: between provider and import. 0.066, 0.132, 0.156: between provider and export. 0.065, 0.130, 0.154: between provider and rules. 0.183, 0.138, 0.162: between peer and import. 0.192, 0.146, 0.173: between peer and export. 0.192, 0.143, 0.170: between peer and rules. 0.481, 0.130, 0.149: between customer and import. 0.419, 0.135, 0.154: between customer and export. 0.462, 0.134, 0.155: between customer and rules. 0.334, 0.144, 0.174: between neighbors and import. 0.320, 0.153, 0.186: between neighbors and export. 0.335, 0.151, 0.185: between neighbors and rules. ```

Generated with https://github.com/SichangHe/internet_route_verification_meta/commit/0c0d56b283e1b4c275dd3ebf6390207cca4e7976.

SichangHe commented 5 months ago
No significant correlation between number of neighbors and rules for transit ASes with at least five customers, @cunha. ```ruby Filtering only transit ASes with at least 5 customers, Pearson, Kendall Tau, and Spearman rank correlation. -0.001, 0.058, 0.076: between provider and import. 0.005, 0.065, 0.086: between provider and export. 0.002, 0.061, 0.081: between provider and rules. 0.140, 0.193, 0.262: between peer and import. 0.154, 0.185, 0.252: between peer and export. 0.151, 0.189, 0.258: between peer and rules. 0.514, 0.085, 0.113: between customer and import. 0.459, 0.072, 0.096: between customer and export. 0.502, 0.080, 0.108: between customer and rules. 0.323, 0.184, 0.254: between neighbors and import. 0.314, 0.173, 0.239: between neighbors and export. 0.328, 0.179, 0.249: between neighbors and rules. ``` Commit: https://github.com/SichangHe/internet_route_verification_meta/commit/095c6b54384db1ea661ca76427b69ed8a095bfa2
cunha commented 5 months ago

Wut?! It's even lower. This is somewhat counter intuitive... worth mentioning if we can explain or give some pointers as to what might be happening. Not worth it to sink much time into it though. Maybe do a scatter plot of the points and see if something pops up, otherwise we just drop it.

On Mon, Jan 29, 2024 at 8:33 AM Steven Hé (Sīchàng) < @.***> wrote:

No significant correlation between number of neighbors and rules for transit ASes with at least five customers, @cunha https://github.com/cunha.

Filtering only transit ASes with at least 5 customers, Pearson, Kendall Tau, and Spearman rank correlation. -0.001, 0.058, 0.076: between provider and import.0.005, 0.065, 0.086: between provider and export.0.002, 0.061, 0.081: between provider and rules.0.140, 0.193, 0.262: between peer and import.0.154, 0.185, 0.252: between peer and export.0.151, 0.189, 0.258: between peer and rules.0.514, 0.085, 0.113: between customer and import.0.459, 0.072, 0.096: between customer and export.0.502, 0.080, 0.108: between customer and rules.0.323, 0.184, 0.254: between neighbors and import.0.314, 0.173, 0.239: between neighbors and export.0.328, 0.179, 0.249: between neighbors and rules.

Commit: @.*** https://github.com/SichangHe/internet_route_verification_meta/commit/095c6b54384db1ea661ca76427b69ed8a095bfa2

— Reply to this email directly, view it on GitHub https://github.com/SichangHe/internet_route_verification/issues/95#issuecomment-1913782619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPO56GX36SIE73P6YENFDYQ3U5VAVCNFSM6AAAAAA7GGHL5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTG44DENRRHE . You are receiving this because you were mentioned.Message ID: @.***>

SichangHe commented 5 months ago

We did have a scatter plot #neighbors vs #rules: https://github.com/SichangHe/internet_route_verification/issues/67

The same plot for transit ASes with at least 5 customers. ![image](https://github.com/SichangHe/internet_route_verification/assets/84777573/778c7c76-1547-41a5-89af-0885bc9c6fad)
cunha commented 5 months ago

Well, the correlation number says it's low... but there does seem to be a mass of points along the diagonal... which implies some correlation.

Low priority. Can you please:

SichangHe commented 3 months ago

as_neighbors_vs_rules4.csv is the file you wanted, @cunha.

SichangHe commented 3 months ago

as_neighbors_vs_rules4.csv is the file you wanted, @cunha.

ping @cunha.

cunha commented 2 months ago
1239 SPRINTLINK
18106 VIEWQWEST-SG-AP Viewqwest Pte Ltd
51185 MAINSTREAMING-AS
1828 UNITAS
199524 GCORE
137409 GSLNETWORKS-AS-AP GSL Networks Pty LTD
37468 ANGOLA-CABLES
61595 TELIC TECHNOLOGIES
132337 ANSPL-AS-AP Axclusive
6939 HURRICANE
7018 ATT-INTERNET4
12779 ITGATE
24482 SGGS-AS-AP SG.GS
264479 Turbozone Internet
36351 SOFTLAYER
58511 ANYCAST-GLOBAL-BACKBONE Anycast Global Backbone
271253 LINK BRASIL TELECOMUNICACOES LTDA
41047 NL-MLAB MLAB Open Source Community
174 COGENT-174
38880 M21-AS-AP Micron21 Datacentre Pty Ltd
37721 Virtual-Technologies-Solutions-SA
6461 ZAYO-6461
23106 AMERICAN TOWER DO BRASIL-COMUNICACAO MULTIMIDIA LT
63927 RISE-HK RISE

Several Tier-1 and Tier-2 networks, two Brazilian networks (South America has an inflated number of ASNs and no IRR for rules), and a few others. I think we can add a line in the text to mention this if we have the space.