Question
Need help, Please answer using Python Step 1 : Download the compressed table DB_091803_v1.txt and test input file: IPlist.txt. Upload them to your Colab space
Need help, Please answer using Python
Step 1: Download the compressed table DB_091803_v1.txt and test input file: IPlist.txt. Upload them to your Colab space using the code below.
from google.colab import files
uploaded = files.upload()
DB = next(iter(uploaded))
print(DB, "uploaded")
uploaded = files.upload()
IP_LIST = next(iter(uploaded))
print(IP_LIST, "uploaded")
Step 2: Develop the IP2AS tool - This tool maps an IP address to an AS. It uses static table address prefix to AS number collected from whois DB and BGP tables. This table is stored in a file and should be given to the tool as a parameter. It will perform longest prefix matching and will map the IP to an AS number. The tool should print out the longest prefix that the IP address is matched to, and the corresponding AS number.
Steps:
1. Put the set of IP addresses you want to map to ASes into the
For example, look at IPlist.txt file, which contains the following:
169.237.33.90 208.30.172.70
2. The
3. Run ip2as and specify the and
For example, if you run your code, the output should look like the following:
169.237.0.0/16 1852 169.237.33.90 208.0.0.0/11 1239 208.30.172.70
# The code should assume that the variables db_filename and input_filename
# contain the filenames of the database and inputs respectively
# Model output is provided for you.
# Your code with documentation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started