CAIDA / catalog-data

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

recipe: How to identify root causes in customer cone changes #509

Open bhuffaker opened 1 year ago

bhuffaker commented 1 year ago

Overview

We would like to develop a recipe, likely multiple scripts. That will allow a users to identify the what caused a customer cone change between two dates for a target AS.

We will likely need to increase the set of files that are provided publicly. You will be workin on beamer.caida.org so yo have access to the full set of files. Keep a list of the files you need and we will make sure they are public when the recipe is released.

What we want to identify is root causes of the changes single in a single AS's customer cone. Find the set of ASes that where removed or added. Find the set of paths that contained the target AS and the added or removed ASes.

Identify common factors between the change:

These should be presented in a table sorted by the number of ASes effected. This is just the starting point. We will likely discover more root causes as we work.

type description ASes lost AS gained
lost monitor monitor A was lost -34 -
lost collector collector B was lost -7 -
AS lost AS A disappeared -2 +4
AS gained AS B appeared - +4

Process

Here is a highlevel overview of the process we will follow. 1 script that identifies the set of paths from .paths.bz2 and .paths.bz that contain the target AS and ASes which where lost or gained between .ppdc-ases.txt.bz2 and .ppdc-ases.txt.bz2. and creates -paths.txt

c-Z- A-B-C-D
c-Z- A-B-E-F
c- T- A-G
            / T(1) \             / G (1)
c (3) -  Z (2)-   A (3) - B (2) - C (1) - D (1)
                                                \ E (1) - F (1) 

Background

AS Rank combines multiple datasets, but this script will be examing the BGP paths that are used to infer the AS Relationships and Customer Cones. Reading material:

Reference code:

AS Rank data sources follows the follow:

  1. Download the BGP RIB /data/external/as-rank-ribs/20220901/{ripe,routeviews}

  2. combine all the paths /data/external/as-rank-ribs/20220901/20220901.all-paths.bz2 ripe/rrc00|4 13830|3356|1299|9583|45769 1.186.170.0/24 i 161.129.152.2

    • org: ripe
    • collector: rrc00
    • frequency seen across 5 days: 4
    • asn path: 13830|3356|1299|9583|45769
    • prefix: 1.186.170.0/24
    • code: i
    • peer: 161.129.152.2
    • path: rrc00 - 161.129.152.2 - 13830|3356|1299|9583|45769 - 1.186.170.0/24
  3. find the stable paths 47787|174|12389|42742 /data/external/as-rank-ribs/20220901/20220901stable.paths.bz2

  4. created the set of "clean" paths" 47787|174|12389|42742 /data/external/as-rank-ribs/20220901/20220901.paths.bz2

  5. infer the set of AS Relationships /data/external/as-rank-ribs/20220901/20220901.as-rel.txt.bz2

    • 3356|2|-1 3356 is a provider of 2 : 3356 < 2
    • 2|3356|1 2 is a customer of 3356 : 2 > 3356
    • 2|3356|0 2 is peer of 3356 2 - 3356
    • 4 > 5 - 10 < 99 < 23
  6. infer AS customer cones using as-rel on paths /data/external/as-rank-ribs/20220901.ppdc-ases.txt.bz2 3356 1 2 3 4 6 7 9 11 3356 this means 3356's customer cone includes 1 2 3 4 6 7 9 11 3356

You can find a set of annotated paths here:

/data/external/topology-asdata/as-rank/20220901/ To make sure you have access to the full set of files. We will

Inferring customer cone

A > B - C < E
             C < E  c.cone_add(e)
A > B > C < E
                    E
A > B < C < E
             C < E c.cone_add(e)

Rules for cleaning paths

cleaning

rejecting, the whole path is throw out

bhuffaker commented 1 year ago

num_paths : number_asn

bhuffaker commented 1 year ago

paths:

   1 > 2 > T - 3 < G1
   1 > 8 < T < 4 < 5
   1 > 8 < T < 4 < G1
   8 < T < 4 < G1
   8 < T < 4 < G1
   14 > 15 - T < 4 < 2 < G2
   35 - 45 < T < 4 < 3 < G3
  1. strip paths that do not contain a gained AS

    1 > 2 > T - 3 < G1
    1 > 8 < T < 4 < G1
    8 < T < 4 < G1
    8 < T < 4 < G1
    14 > 15 - T < 4 < 2 < G2
    35 - 45 < T < 4 < 3 < G3
  2. strip the path up to just after the peer or customer link

    3 - G1
    T < 4 < G1
    T < 4 < G1
    T < 4 < G1
    T < 4 < G1
    T < 4 < 2 < G2
    45 < T < 4 < 3 < G3
  3. strip up to target

    4 < G1
    4 < G1
    4 < G1
    4 < G1
    4 < 2 < G2
    4 < 3 < G3
  4. count all the Gained ASes below the ASN towards it's gained set

    asn asnes gained from one of it's paths
    2 G2
    3 G3
    4 G1, G2, G3
bhuffaker commented 1 year ago