William Lam

IP Subnet Calculator

This IP Subnet Calculator was created as a self-directed learning project for my Networking Fundamentals class. Built in Python 3.7, this IPv4 Subnet Calculator uses a given subnet mask and a host IP address as inputs, and outputs the Class Type, Class Bits, Default Subnet Mask, number of borrowed bits, number of subnets, number of host bits, and the number of available hosts.

For a particular range of subnet indexes (specified by the user) in the total number of subnets, the calculator also outputs the subnet ID, the broadcast address, the first host IP address, and the last host IP address.

There are some limitations with this project: Class D and E IP addresses are not handled correctly in this software. Classless inter-domain routing (CIDR) is also assumed to be used (rather than private or classful addressing). Modifications will have to be made to handle those appropriately if used in a more commercial and formal environment.

Links