What’s an IP address calculator?
I’m pretty sure it’s something you won’t need. It will help understanding IP addresses. It does calculations on IP addresses and will tell you, if the address is valid (or a network / broadcast address), and if two addresses are on the same subnet.
Why did I create an IP address calculator like that?
My daughter started studying informatics and she most of their fellow students had problems understanding IP addresses. It took me some time to see why. And yes, I started remembering the time, back in the late 1980s, when I started creating networks of UNIX hosts, and how helpless I had been about IP addressing.
So I created an IP address calculator for my daughter.
What does this IP address calculator do?
Translating IP addresses into binary / hexadecimal
It’s essential to go away from decimal notation if you want to understand an IP address. So if you would enter 192.168.15.2/24 into my IP address calculator it will return:
It will also return: IP address 192.168.15.2 is a class C (255.255.255.0 /24) following RFC 791. You may also ping this IP using any of these notations: 0xc0.0xa8.0xf.0x2 oder 3232239362. The IP address is valid.
Why did I mention this fancy decimal number? Well I want students to understand IP addresses. ((192*256+168)*256+15)*256+2 = 3232239362. It’s a 4 byte number, so it’s just an other notation. IP addresses are 4 byte numbers.
Validations
My IP address calculator will check, if this IP is valid, or not. It will not allow IPs other than class A, B and C (actually it will allow Class D, multicast as well, but it will mention)
If you do calculations on any forbidden address (192.168.15.0/24, 192.168.15.255/24, 127.x.y.z, …) it will tell you it’s an invalid IP, and why. In most cases it will refer to an RFC.
If the subnet mask is not following current RFCs (so not all 1 to the left, all 0 to the right) it will tell you about this problem (i.e. 232.255.255.0). It will do all calculations based on this subnet mask.
Routing
One of the most challenging things for beginners is routing. Why is 192.168.15.2/24 and 192.168.15.254 the same subnet, while 192.168.51.2 is a different? Well, once more I’ll show IP1, IP2 and subnet mask in binary. I will use different colours for network- and host number. I try to make clear where differences are.
In addition I also add a small sketch showing either two hosts directly connected to each other, or connected via a router.
Network and broadcast addresses
These students always need to specify both, the network address and the broadcast address. So I also do this.
Feedback wanted
Please tell me if you don’t like my explainations, if you think they are wrong, miss-leading or you can hardly understand!
Using my calculator / terms and conditions
like always I will be happy to see usage. You are allowed to link to my IP calculator, use it in and for your classes, preparation for exams and your daily work. Like any software my IP calculator is buggy, so never use if for a production environment, never use it during exams. You can’t make me responsible for miscalculations my did!