Given an IP address and Netmask. I want to check if the combination is valid or not. Example
IP Address: 23.1.1.1 Netmask: 255.0.0.0
Here the combination is wrong.
What are the rule to validate the combination and also netmask
Given an IP address and Netmask. I want to check if the combination is valid or not. Example
IP Address: 23.1.1.1 Netmask: 255.0.0.0
Here the combination is wrong.
What are the rule to validate the combination and also netmask
Check sipcalc tool. You can install it on Debian-based distros with
$ apt-get install sipcalc
For the proposed IP/netmask pair, you get this:
$ sipcalc 23.1.1.1 255.0.0.0
-[ipv4 : 23.1.1.1 255.0.0.0] - 0
[CIDR]
Host address - 23.1.1.1
Host address (decimal) - 385941761
Host address (hex) - 17010101
Network address - 23.0.0.0
Network mask - 255.0.0.0
Network mask (bits) - 8
Network mask (hex) - FF000000
Broadcast address - 23.255.255.255
Cisco wildcard - 0.255.255.255
Addresses in network - 16777216
Network range - 23.0.0.0 - 23.255.255.255
Usable range - 23.0.0.1 - 23.255.255.254