Closed SichangHe closed 1 year ago
What we can get by looping through the data:
[ ] Number of routes of each skip/error type (update July 9).
Number of import/export error for each AS: import_export_err_per_as.csv
Strangely, the number of errors decreased after I improved the speed by ~30x. I am guessing that it is because the previous implementation induced more RecursionError
.
On the import/export errors, it may also help compute the relative fraction of them (i.e., divide the absolute number of errors by the number of paths).
Generated stats for 75377 AS in 2600168ms.
shape: (75_377, 7)
┌─────────┬───────────┬───────────┬─────────────┬─────────────┬────────────┬────────────┐
│ aut_num ┆ import_ok ┆ export_ok ┆ import_skip ┆ export_skip ┆ import_err ┆ export_err │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ u64 ┆ u32 ┆ u32 ┆ u32 ┆ u32 ┆ u32 ┆ u32 │
╞═════════╪═══════════╪═══════════╪═════════════╪═════════════╪════════════╪════════════╡
│ 200297 ┆ 0 ┆ 116 ┆ 0 ┆ 0 ┆ 0 ┆ 0 │
│ 40458 ┆ 0 ┆ 0 ┆ 0 ┆ 168 ┆ 0 ┆ 0 │
│ 399407 ┆ 0 ┆ 0 ┆ 0 ┆ 29 ┆ 0 ┆ 0 │
│ 212963 ┆ 0 ┆ 28 ┆ 0 ┆ 0 ┆ 0 ┆ 0 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ 393929 ┆ 0 ┆ 0 ┆ 0 ┆ 56 ┆ 0 ┆ 0 │
│ 9394 ┆ 0 ┆ 0 ┆ 8020 ┆ 31774 ┆ 0 ┆ 0 │
│ 271107 ┆ 0 ┆ 0 ┆ 0 ┆ 93 ┆ 0 ┆ 0 │
│ 139609 ┆ 953 ┆ 0 ┆ 0 ┆ 0 ┆ 0 ┆ 1009 │
└─────────┴───────────┴───────────┴─────────────┴─────────────┴────────────┴────────────┘
shape: (9, 8)
┌─────────────┬──────────┬────────────┬────────────┬───────────┬───────────┬──────────┬────────────┐
│ describe ┆ aut_num ┆ import_ok ┆ export_ok ┆ import_sk ┆ export_sk ┆ import_e ┆ export_err │
│ --- ┆ --- ┆ --- ┆ --- ┆ ip ┆ ip ┆ rr ┆ --- │
│ str ┆ f64 ┆ f64 ┆ f64 ┆ --- ┆ --- ┆ --- ┆ f64 │
│ ┆ ┆ ┆ ┆ f64 ┆ f64 ┆ f64 ┆ │
╞═════════════╪══════════╪════════════╪════════════╪═══════════╪═══════════╪══════════╪════════════╡
│ mean ┆ 2.0236e6 ┆ 192.3249 ┆ 142.987145 ┆ 411.20168 ┆ 463.04428 ┆ 415.7402 ┆ 413.355918 │
│ ┆ ┆ ┆ ┆ ┆ 4 ┆ 52 ┆ │
│ std ┆ 8.9239e7 ┆ 10470.6907 ┆ 6118.37982 ┆ 19042.364 ┆ 15488.158 ┆ 29624.86 ┆ 27328.7938 │
│ ┆ ┆ 84 ┆ 5 ┆ 194 ┆ 847 ┆ 0205 ┆ 67 │
│ min ┆ 1.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │
│ 25% ┆ 33601.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │
│ 50% ┆ 60762.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 28.0 ┆ 0.0 ┆ 0.0 │
│ 75% ┆ 207307.0 ┆ 0.0 ┆ 29.0 ┆ 0.0 ┆ 87.0 ┆ 0.0 ┆ 28.0 │
│ max ┆ 4.2926e9 ┆ 1.53399e6 ┆ 1.078456e6 ┆ 2.222287e ┆ 2.80516e6 ┆ 5.152725 ┆ 5.43163e6 │
│ ┆ ┆ ┆ ┆ 6 ┆ ┆ e6 ┆ │
└─────────────┴──────────┴────────────┴────────────┴───────────┴───────────┴──────────┴────────────┘
Nice. Here is an example we could investigate to try and see what's up:
│ aut_num ┆ import_ok ┆ export_ok ┆ import_skip ┆ export_skip ┆ import_err ┆ export_err │
| 139609 ┆ 953 ┆ 0 ┆ 0 ┆ 0 ┆ 0 ┆ 1009
On Thu, Jul 13, 2023 at 4:52 AM Steven Hé (Sīchàng) < @.***> wrote:
Stats per AS
Generated stats for 75377 AS in 2600168ms.shape: (75_377, 7) ┌─────────┬───────────┬───────────┬─────────────┬─────────────┬────────────┬────────────┐ │ aut_num ┆ import_ok ┆ export_ok ┆ import_skip ┆ export_skip ┆ import_err ┆ export_err │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ u64 ┆ u32 ┆ u32 ┆ u32 ┆ u32 ┆ u32 ┆ u32 │ ╞═════════╪═══════════╪═══════════╪═════════════╪═════════════╪════════════╪════════════╡ │ 200297 ┆ 0 ┆ 116 ┆ 0 ┆ 0 ┆ 0 ┆ 0 │ │ 40458 ┆ 0 ┆ 0 ┆ 0 ┆ 168 ┆ 0 ┆ 0 │ │ 399407 ┆ 0 ┆ 0 ┆ 0 ┆ 29 ┆ 0 ┆ 0 │ │ 212963 ┆ 0 ┆ 28 ┆ 0 ┆ 0 ┆ 0 ┆ 0 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 393929 ┆ 0 ┆ 0 ┆ 0 ┆ 56 ┆ 0 ┆ 0 │ │ 9394 ┆ 0 ┆ 0 ┆ 8020 ┆ 31774 ┆ 0 ┆ 0 │ │ 271107 ┆ 0 ┆ 0 ┆ 0 ┆ 93 ┆ 0 ┆ 0 │ │ 139609 ┆ 953 ┆ 0 ┆ 0 ┆ 0 ┆ 0 ┆ 1009 │ └─────────┴───────────┴───────────┴─────────────┴─────────────┴────────────┴────────────┘shape: (9, 8) ┌─────────────┬──────────┬────────────┬────────────┬───────────┬───────────┬──────────┬────────────┐ │ describe ┆ aut_num ┆ import_ok ┆ export_ok ┆ import_sk ┆ export_sk ┆ import_e ┆ export_err │ │ --- ┆ --- ┆ --- ┆ --- ┆ ip ┆ ip ┆ rr ┆ --- │ │ str ┆ f64 ┆ f64 ┆ f64 ┆ --- ┆ --- ┆ --- ┆ f64 │ │ ┆ ┆ ┆ ┆ f64 ┆ f64 ┆ f64 ┆ │ ╞═════════════╪══════════╪════════════╪════════════╪═══════════╪═══════════╪══════════╪════════════╡ │ mean ┆ 2.0236e6 ┆ 192.3249 ┆ 142.987145 ┆ 411.20168 ┆ 463.04428 ┆ 415.7402 ┆ 413.355918 │ │ ┆ ┆ ┆ ┆ ┆ 4 ┆ 52 ┆ │ │ std ┆ 8.9239e7 ┆ 10470.6907 ┆ 6118.37982 ┆ 19042.364 ┆ 15488.158 ┆ 29624.86 ┆ 27328.7938 │ │ ┆ ┆ 84 ┆ 5 ┆ 194 ┆ 847 ┆ 0205 ┆ 67 │ │ min ┆ 1.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │ │ 25% ┆ 33601.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │ │ 50% ┆ 60762.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 28.0 ┆ 0.0 ┆ 0.0 │ │ 75% ┆ 207307.0 ┆ 0.0 ┆ 29.0 ┆ 0.0 ┆ 87.0 ┆ 0.0 ┆ 28.0 │ │ max ┆ 4.2926e9 ┆ 1.53399e6 ┆ 1.078456e6 ┆ 2.222287e ┆ 2.80516e6 ┆ 5.152725 ┆ 5.43163e6 │ │ ┆ ┆ ┆ ┆ 6 ┆ ┆ e6 ┆ │ └─────────────┴──────────┴────────────┴────────────┴───────────┴───────────┴──────────┴────────────┘
as_stats.csv https://github.com/SichangHe/internet_route_verification/files/12036788/as_stats.csv
— Reply to this email directly, view it on GitHub https://github.com/SichangHe/internet_route_verification/issues/21#issuecomment-1633745179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPO552KY5TCVTN4XOBWRDXP6SK3ANCNFSM6AAAAAA2BQIDPM . You are receiving this because you commented.Message ID: @.***>
shape: (24, 4)
┌─────────┬───────┬────────┬──────────┐
│ quality ┆ hill ┆ port ┆ value │
│ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ u32 │
╞═════════╪═══════╪════════╪══════════╡
│ good ┆ up ┆ import ┆ 6073000 │
│ good ┆ down ┆ import ┆ 7330086 │
│ good ┆ peer ┆ import ┆ 1072993 │
│ good ┆ other ┆ import ┆ 20795 │
│ good ┆ up ┆ export ┆ 6658732 │
│ good ┆ down ┆ export ┆ 3125541 │
│ good ┆ peer ┆ export ┆ 959414 │
│ good ┆ other ┆ export ┆ 34255 │
│ neutral ┆ up ┆ import ┆ 16783070 │
│ neutral ┆ down ┆ import ┆ 6520591 │
│ neutral ┆ peer ┆ import ┆ 7543136 │
│ neutral ┆ other ┆ import ┆ 148352 │
│ neutral ┆ up ┆ export ┆ 20863157 │
│ neutral ┆ down ┆ export ┆ 5883454 │
│ neutral ┆ peer ┆ export ┆ 7879843 │
│ neutral ┆ other ┆ export ┆ 276435 │
│ bad ┆ up ┆ import ┆ 18039677 │
│ bad ┆ down ┆ import ┆ 2840992 │
│ bad ┆ peer ┆ import ┆ 9854886 │
│ bad ┆ other ┆ import ┆ 601698 │
│ bad ┆ up ┆ export ┆ 13373858 │
│ bad ┆ down ┆ export ┆ 7682674 │
│ bad ┆ peer ┆ export ┆ 9631758 │
│ bad ┆ other ┆ export ┆ 469239 │
└─────────┴───────┴────────┴──────────┘
There clearly are much more errors going uphill, looking at %quality_port
(percentage among the values of the same quality and port).
The problem is that there are also many errors when going flat (P2P), and there will still be 10M errors going downhill for both import and export (check out the edit history of the last comment for "total"s).
What are the cases where hill == other
? (For AS-pairs that are not in CAIDA's database, we could assume a P2P relationship.)
This is a neat analysis, helps us focus. One possible next step is to identify the AS-pairs resulting in the bad
cases, then sort the ASes by the number of pairs they appear in. These ASes with many violations seem like good ones to look for special cases.
What are the cases where
hill == other
? (For AS-pairs that are not in CAIDA's database, we could assume a P2P relationship.)
They are either not in CAIDA's database, or "SingleExport," where only one AS is in the AS path.
Source code location: https://github.com/SichangHe/internet_route_verification/blob/d0931bbb0b1e162849efc3dbbc8d04fafced6000/route_verification/bgp/src/stats.rs#L72
One possible next step is to identify the AS-pairs resulting in the
bad
cases, then sort the ASes by the number of pairs they appear in. These ASes with many violations seem like good ones to look for special cases.
Using the stats per AS:
All networks in the top5 are Tier-1s (and possibly others). This might make it easy for us to special case them.
One possibly important difference between counting the number of errors and the number of AS-pairs in which an AS is involved is that the absolute number of errors depend on the number of paths, which may bias results toward "central" networks (like the Tier-1s).
One possibly important difference between counting the number of errors and the number of AS-pairs in which an AS is involved is that the absolute number of errors depend on the number of paths, which may bias results toward "central" networks (like the Tier-1s).
I'm not sure what you are talking about here in terms of "the number of errors."
The data above are about AS pairs.
All networks in the top5 are Tier-1s (and possibly others). This might make it easy for us to special case them.
Maybe. Unfortunately, by nature, having more routes through these Tier-1's naturally causes more errors on average.
Ranking by the percentage of errors brings poor results as some ASes simple have all their routes bad.
I'm not sure what you are talking about here in terms of "the number of errors."
The data above are about AS pairs.
Maybe I'm reading it wrong. For example, we have 5M import errors for 6939, but if we were counting the number of AS-pairs with import errors, then it couldn't be much larger than 80K as that is the number of ASes in the Internet.
What I have in mind is that we may have X paths with import/export errors at 6939. These X errors may involve Y neighboring ASes (either before or after 6939 on the AS-path), with Y likely much smaller than X.
Here, only the number of pairs is considered, the number of successes/skips/errors in the routes are normed (collapsed to 1 for each pair).
Moving to #24.
We have generated all the reports for
rib.20230619.2200.bz2
of 104MiB with the lowest verbosity.These conclusions were simply wrong because I was counting the first 10,000.
The routes with errors among ~all the routes~ *the first 10,000 routes* are 64633 / 26447600 = 0.002443813427305313. The memory usage sits comfortably at 27GiB. With this kind of circumstances, I think we can start to look into the result and get some statistics. However, the report data are doubly-nested, so we would need to either somehow flatten them or loop through them, with the latter option seemingly simpler.