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
Get step-by-step solutions from verified subject matter experts
