Question
How do I create a python 3 program that prompts the user to enter an ip address (v4 or v6) in cidr notation? Use the
How do I create a python 3 program that prompts the user to enter an ip address (v4 or v6) in cidr notation?
Use the ipaddress module to calculate the basic address and network information.
Print out the following information:
Address [IP Address] is a [global, private, multicast, unspecified, loopback, reserved] address It is part of the [Network Address] Network. This network has [num of addresses] addresses of which [num of usable] addresses are usable. The broadcast address for this network is [broadcast address]
If the number of addresses in the network is less than 32 print out all the usable addresses as follows:
The usable addresses are: [address 1] [address 2] [address 3]
etc
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