Question: Use Python 3 writing a python program that will break apart an IP address and identify the Address Class and whether or not the IP
Use Python 3
writing a python program that will break apart an IP address and identify the Address Class and whether or not the IP is a Broadcast IP.
As a review, IP addresses can be classified as:
| Class | 1st Octet Range |
| A | 1 126 |
| B | 128 191 |
| C | 192 - 223 |
Also, we can identify if an IP address is a broadcast address for a certain range if it is in the form of:
| Class | IP structure |
| A | ___.255.255.255 |
| B | ___.___.255.255 |
| C | ___.___.___.255 |
Using this information, create a program that prompts a user for a valid IP Address. The program will break apart the IP Address into four separate octet variables. Using conditional statements identify if each IP address either a Class A, B, or C IP address. Also, if the IP address is a broadcast address, identify it as one. If the IP address does not satisfy a class A,B, or C IP address, print other. Use Python 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
