SichangHe / internet_route_verification

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

Investigate IRR object change/last-modified time #130

Closed SichangHe closed 5 months ago

SichangHe commented 8 months ago

how do the changed' field of the route-sets compare to thechanged' field of the AS-sets? if the route-sets are newer, we can mention that they are possibly better maintained than AS-sets to strengthen the point above

SichangHe commented 8 months ago

we could do it for one registry even; and i agree that if the `changed' field is updated by the operator we should not even consider it; but some IRRs likely update the changed date automatically and that would make it easy for us. i think RIPE automatically updates the changed field

How do I know if the time is updated automatically?

cunha commented 8 months ago

We would need to be able to try and modify an object (which we can't is most databases) or check the documentation.

In any case, I just checked RIPE's entries for PEERING and can say that the modification dates are updated automatically, because I never set seconds when setting the changed date.

[psychomac:~]% whois -h whois.ripe.net RS-PEERING-TESTBED
...
created:        2017-11-16T13:18:28Z
last-modified:  2023-08-28T11:13:31Z
cunha commented 8 months ago

I think doing this analysis with RIPE's database should be enough.

SichangHe commented 5 months ago

At a glance: RIPE, APNIC, ARIN, LACNIC, IDNIC, TC (seemingly always), LEVEL3, NTTCOM (sometimes) use last-modified and RFC3339 syntax. AFRINIC, ALTDB, JPNIC, REACH does not have time. RADB itself does not have time, but includes what it got from RIPE in a descr in 2 places.

That is, we only need to handle last-modified and DNE with RFC3339 syntax.

SichangHe commented 5 months ago

last_modified.csv.gz

SichangHe commented 5 months ago
12311866 RPSL objects.

1632152 route[6] objects out of 3904352 have last_modified (41.8%).
          class            name   source                        last_modified
count   1632152         1632152  1632152                              1632152
unique        2         1412921       12                                  NaN
top       route  81.19.194.0/24    APNIC                                  NaN
freq    1161705             134   988631                                  NaN
mean        NaN             NaN      NaN  2019-06-26 22:07:15.983800320+00:00
min         NaN             NaN      NaN            2001-09-22 09:31:39+00:00
25%         NaN             NaN      NaN            2018-12-11 12:08:26+00:00
50%         NaN             NaN      NaN            2020-10-13 11:24:53+00:00
75%         NaN             NaN      NaN            2022-02-15 13:11:08+00:00
max         NaN             NaN      NaN            2023-06-22 20:13:11+00:00

4657 route-set objects out of 21328 have last_modified (21.8%).
            class       name source                        last_modified
count        4657       4657   4657                                 4657
unique          1       4624      8                                  NaN
top     route-set  RS-AS3360   RIPE                                  NaN
freq         4657          3   2021                                  NaN
mean          NaN        NaN    NaN  2018-12-14 11:54:11.326605312+00:00
min           NaN        NaN    NaN            2001-09-22 09:34:03+00:00
25%           NaN        NaN    NaN            2016-03-21 19:28:22+00:00
50%           NaN        NaN    NaN            2021-09-28 20:25:27+00:00
75%           NaN        NaN    NaN            2023-02-04 01:41:43+00:00
max           NaN        NaN    NaN            2023-06-21 16:28:28+00:00

40250 as-set objects out of 55262 have last_modified (72.8%).
         class   name source                        last_modified
count    40250  40250  40250                                40250
unique       1  39930     12                                  NaN
top     as-set   AS-S   RIPE                                  NaN
freq     40250      4  24568                                  NaN
mean       NaN    NaN    NaN  2019-03-27 08:39:12.035751424+00:00
min        NaN    NaN    NaN            2001-09-21 21:49:51+00:00
25%        NaN    NaN    NaN  2017-05-16 16:23:11.249999872+00:00
50%        NaN    NaN    NaN     2021-06-16 22:47:32.500000+00:00
75%        NaN    NaN    NaN            2022-09-27 13:12:05+00:00
max        NaN    NaN    NaN            2023-06-22 12:31:04+00:00

173 filter-set objects out of 212 have last_modified (81.6%).
             class             name source                        last_modified
count          173              173    173                                  173
unique           1              171      2                                  NaN
top     filter-set  fltr-martian-v6   RIPE                                  NaN
freq           173                2    168                                  NaN
mean           NaN              NaN    NaN  2012-11-29 09:38:10.757225216+00:00
min            NaN              NaN    NaN            2002-07-11 12:02:50+00:00
25%            NaN              NaN    NaN            2006-01-22 15:04:31+00:00
50%            NaN              NaN    NaN            2012-11-17 11:32:05+00:00
75%            NaN              NaN    NaN            2019-03-17 03:12:48+00:00
max            NaN              NaN    NaN            2023-03-24 15:05:51+00:00

264 peering-set objects out of 343 have last_modified (77.0%).
              class           name source                        last_modified
count           264            264    264                                  264
unique            1            264      2                                  NaN
top     peering-set  prng-MEDIAFAX   RIPE                                  NaN
freq            264              1    239                                  NaN
mean            NaN            NaN    NaN  2013-03-31 21:12:33.166667008+00:00
min             NaN            NaN    NaN            2001-09-21 23:07:39+00:00
25%             NaN            NaN    NaN     2010-11-12 12:57:42.500000+00:00
50%             NaN            NaN    NaN     2011-11-12 21:50:30.500000+00:00
75%             NaN            NaN    NaN            2018-01-26 18:04:48+00:00
max             NaN            NaN    NaN            2023-06-10 08:11:18+00:00

67350 aut-num objects out of 85399 have last_modified (78.9%).
          class      name source                        last_modified
count     67350     67350  67350                                67350
unique        1     65062      8                                  NaN
top     aut-num  AS136097   RIPE                                  NaN
freq      67350         2  38573                                  NaN
mean        NaN       NaN    NaN  2020-10-24 01:18:26.030022144+00:00
min         NaN       NaN    NaN            2008-09-04 06:40:27+00:00
25%         NaN       NaN    NaN            2019-09-11 11:27:17+00:00
50%         NaN       NaN    NaN            2020-12-21 06:15:54+00:00
75%         NaN       NaN    NaN     2022-05-04 22:30:47.500000+00:00
max         NaN       NaN    NaN            2023-06-22 12:30:45+00:00

image

Note that the objects are not deduplicated, @cunha.