Question: Top-10 Origin AS by Prefix Growth Using the data from the cache files, calculate the percentage growth in advertised prefixes for each AS over the
Top-10 Origin AS by Prefix Growth Using the data from the cache files, calculate the percentage growth in advertised prefixes for each AS over the entire timespan represented by the snapshots by completing the function top_10_ases_by_prefix_growth(). Make sure that your function returns the data structure exactly as specified in bgpm.py.
Consider each origin AS separately and measure the growth of the total unique prefixes advertised by that AS over time. To compute this, for each origin AS: 1. Identify the first and the last snapshot where the origin AS appeared in the dataset. 2. Calculate the percentage increase of the advertised prefixes, using the first and the last snapshots. 3. Report the top 10 origin AS sorted smallest to largest according to this metric. Corner case: When calculating the prefixes originating from an origin AS, you may encounter paths of the following form: "25152 2914 18687 {7829,14265}". This is a corner case, and it should affect only a small number of prefixes. In this case, you consider the entire set of AS "{7829,14265}" as the origin AS.
Compute the top 10 origin ASes ordered by percentage increase (smallest to largest) of advertised prefixes.
Args: cache_files: A chronologically sorted list of absolute (also called "fully qualified") path names
Returns: A list of the top 10 origin ASes ordered by percentage increase (smallest to largest) of advertised prefixes AS numbers are represented as strings.
For example: ["777", "1", "6"] corresponds to AS "777" as having the smallest percentage increase (of the top ten) and AS "6" having the highest percentage increase (of the top ten). """
We are using BGPStream and PYBGPstream
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
