ipcalc.py
is a Python script designed to calculate and display IP addresses within one or more IP subnets provided in CIDR notation. It also provides the total number of IP addresses in each subnet.
-
Running the Script:
- Ensure you have Python installed on your system.
- Download or create the
ipcalc.py
script. - Open your terminal or command prompt and navigate to the directory where
ipcalc.py
is located.
-
Executing the Script:
-
Run the script by entering the following command:
python ipcalc.py
-
-
Entering Subnets:
- The script will prompt you to enter one or more subnets. Subnets should be in CIDR notation (e.g., 10.0.0.0/21).
- You can enter multiple subnets separated by commas (
,
) without spaces (e.g., 10.0.0.0/21,192.168.0.0/16). - To exit the script, type 'exit' and press Enter.
-
Viewing Results:
- The script will display the IP addresses within each subnet.
- It will also show the total number of IP addresses in each subnet.
- This script was created by Mohamed N. Ali.