IP calculators

What are IP calculators for?

IP calculators or IP network calculators are programs that perform a variety of actions with ranges of IP and IPv6 addresses and which include:

  • split networks into subnets
  • for CIDR notations show which IPs are included in the range
  • convert ranges to CIDR
  • convert IP to binary, hexadecimal or octal
  • aggregate, i.e. combine multiple IP ranges into larger ranges, removing duplicate addresses and subnets
  • calculate the number of IP addresses on the network

IP calculators are needed by network administrators who plan the network architecture by distributing IP address ranges between local subnets. IP can also be useful for ordinary users who want to convert CIDR notation to another view or vice versa – this may be necessary for programs that do not support some types of notations. Or for use in IP scanners when it is necessary to remove overlapping ranges of IP addresses.

Programs for displaying information about IP ranges

IP calculators that are present in most distributions:

  • sipcalc
  • ipcalc

They perform similar actions, but sipcalc additionally supports IPv6 addresses. In general, sipcalc is more functional, but ipcalc has a nice-to-read color output, and it also has a unique function of splitting the specified subnet into any number of intervals with any number of IP addresses in each of them. In this article, we will consider both of these programs, as well as the online services of IP calculators with other, very interesting functions.

IP Network Information

To find out how many IPs are in the range, as well as other information, run a command of the form:

sipcalc NETWORK/MASK

For instance:

sipcalc 185.117.152.0/22

Similar information can be obtained with the ipcalc program:

ipcalc 185.117.152.0/22

If you want to display all the possible information, add the -a option to the sipcalc command:

sipcalc -a 185.117.152.0/22

Online service ‘IP Subnet Calculator’: https://w-e-b.site/?act=ipcalculator

IPv6 Network Information

The sipcalc program supports IPv6 addresses:

sipcalc 2a02:f680:1:1100::1108/83

Online service ‘IPv6 Subnet Calculator’: https://w-e-b.site/?act=ipcalculator-ipv6

How to split a network into subnets by mask

If you need to divide IP range into some subnets, use the sipcalc command and the -s option. First specify the mask, and then the network range:

sipcalc -s MASK NETWORK/MASK

For example, to split a network 10.100.0.0/22 by mask /24:

sipcalc -s 24 10.100.0.0/22

This range will be divided into the following subnets:

Network			- 10.100.0.0      - 10.100.0.255
Network			- 10.100.1.0      - 10.100.1.255
Network			- 10.100.2.0      - 10.100.2.255
Network			- 10.100.3.0      - 10.100.3.255

If you add the -u option, more detailed results will be displayed.

Online service ‘Split subnet by Network Mask’: https://w-e-b.site/?act=split-by-mask

How to split a network into subnets by the number of IP

Suppose you need to split an IP network into subnets not by mask, but by a certain number of IP addresses.

For example, in the range 10.100.0.0/19, four subnets need to be allocated, three of these subnets should have 1000 IP addresses, and another should have 2000 IP addresses. This can be done using the ipcalc command and the -s option:

ipcalc -s SIZE1 SIZE2 SIZE3 SIZE4 SIZE5... NETWORK/MASK

For instance:

ipcalc -s 1000 1000 1000 2000 10.100.0.0/19

Online service ‘Split subnet by size’: https://w-e-b.site/?act=split-by-ip

How to convert IP address to binary or hexadecimal notation

If you try to open such an interesting link http://2650109506, then you will find that it works! In this link, the number 2650109506 is the IP address 157.245.118.66 in decimal. In binary form, the address looks like this 1001110111110101011101100100000010.

Online service ‘IP address converter’: https://w-e-b.site/?act=ipconverter

Ho to aggregate IP

Sometimes the IP ranges received for processing may look like this:

192.168.0.0/8
192.168.0.0/9
192.168.0.0/10
192.168.192.0/10
192.169.0.0/10
192.169.64.0/10

The situation may be aggravated by the fact that among the ranges there may be overlapping, that is, containing the same IP addresses, or records may be polluted with other lines and invalid values. In this case, an aggregator of IP and IPv6 addresses will help, which will clear the values from unnecessary data.

or this (combining arrays of IP addresses into a shorter record, finding duplicates, converting to various formats), you can use the netmask command.

For example, you need to convert the range 10.32.0.0-10.255.255.255 into CIDR notation. To do this, specify the -c option, and write the range itself through a colon:

netmask -c 10.32.0.0:10.255.255.255

It will output:

      10.32.0.0/11
      10.64.0.0/10
     10.128.0.0/9

You can specify several ranges at once:

netmask -c 10.32.0.0:10.40.255.255 192.168.0.0:192.168.1.15

Output:

      10.32.0.0/13
      10.40.0.0/16
    192.168.0.0/24
    192.168.1.0/28

To convert CIDR notation to ranges, use the -r option, for example:

netmask -r 10.32.0.0:10.40.255.255 192.168.0.0:192.168.1.15 10.0.8.0/20

The number of IP addresses in this range will be shown in brackets:

       10.0.0.0-10.0.15.255     (4096)
      10.32.0.0-10.39.255.255   (524288)
      10.40.0.0-10.40.255.255   (65536)
    192.168.0.0-192.168.0.255   (256)
    192.168.1.0-192.168.1.15    (16)

Online service ‘IP address aggregator’: https://w-e-b.site/?act=ipagregator

Convert IP Range to CIDR

Sometimes there are ranges in the form Start_IP-End_IP, but CIDR notation is needed. For example, how will the range 30.0.0.0-60.255.255.255 look in CIDR notation?

In this case, use the online service ‘Network Ranges in CIDR’: https://w-e-b.site/?act=ip2cidr

Result:

By the way, for the opposite situation, when you need to convert CIDR notation into ranges of the form Start_IP-End_IP, the already considered sipcalc program will help, which displays the first and last IP addresses of the range.

Last Updated on

Recommended for you:

Leave a Reply

Your email address will not be published.