This is a handy command line tool that can calculate subnets for you. For example.
[andy@home-pc ~]$ sipcalc 10.0.0.0/16 -[ipv4 : 10.0.0.0/16] - 0 [CIDR] Host address - 10.0.0.0 Host address (decimal) - 167772160 Host address (hex) - A000000 Network address - 10.0.0.0 Network mask - 255.255.0.0 Network mask (bits) - 16 Network mask (hex) - FFFF0000 Broadcast address - 10.0.255.255 Cisco wildcard - 0.0.255.255 Addresses in network - 65536 Network range - 10.0.0.0 - 10.0.255.255 Usable range - 10.0.0.1 - 10.0.255.254 -
It should be available in the community repository. If you’re using pamac
, you can check with.
[andy@home-pc ~]$ pamac search sipcalc sipcalc 1.1.6-4 community an advanced console based ip subnet calculator.
And the install it with.
[andy@home-pc ~]$ pamac install sipcalc
Once installed, check out the help menu.
[andy@home-pc ~]$ sipcalc --help sipcalc 1.1.6 Usage: sipcalc [OPTIONS]... <[ADDRESS]... [INTERFACE]... | [-]> Global options: -a, --all All possible information. -d, --resolve Enable name resolution. -h, --help Display this help. -I, --addr-int=INT Added an interface. -n, --subnets=NUM Display NUM extra subnets (starting from the current subnet). Will display all subnets in the current /24 if NUM is 0. -u, --split-verbose Verbose split. -v, --version Version information. -4, --addr-ipv4=ADDR Add an ipv4 address. -6, --addr-ipv6=ADDR Add an ipv6 address. IPv4 options: -b, --cidr-bitmap CIDR bitmap. -c, --classful-addr Classful address information. -i, --cidr-addr CIDR address information. (default) -s, --v4split=MASK Split the current network into subnets of MASK size. -w, --wildcard Display information for a wildcard (inverse mask). -x, --classful-bitmap Classful bitmap. IPv6 options: -e, --v4inv6 IPv4 compatible IPv6 information. -r, --v6rev IPv6 reverse DNS output. -S, --v6split=MASK Split the current network into subnets of MASK size. -t, --v6-standard Standard IPv6. (default) Address must be in the "standard" dotted quad format. Netmask can be given in three different ways: - Number of bits [/nn] - Dotted quad [nnn.nnn.nnn.nnn] - Hex [0xnnnnnnnn | nnnnnnnn] Interface must be a valid network interface on the system. If this options is used an attempt will be made to gain the address and netmask from the specified interface. Replacing address/interface with '-' will use stdin for reading further arguments. Report bugs to <[email protected]>.
A useful option is to give it the -a
parameter to show more (all) information.
[andy@home-pc ~]$ sipcalc -a 10.0.1.0/24 -[ipv4 : 10.0.1.0/24] - 0 [Classful] Host address - 10.0.1.0 Host address (decimal) - 167772416 Host address (hex) - A000100 Network address - 10.0.0.0 Network class - A Network mask - 255.0.0.0 Network mask (hex) - FF000000 Broadcast address - 10.255.255.255 [CIDR] Host address - 10.0.1.0 Host address (decimal) - 167772416 Host address (hex) - A000100 Network address - 10.0.1.0 Network mask - 255.255.255.0 Network mask (bits) - 24 Network mask (hex) - FFFFFF00 Broadcast address - 10.0.1.255 Cisco wildcard - 0.0.0.255 Addresses in network - 256 Network range - 10.0.1.0 - 10.0.1.255 Usable range - 10.0.1.1 - 10.0.1.254 [Classful bitmaps] Network address - 00001010.00000000.00000000.00000000 Network mask - 11111111.00000000.00000000.00000000 [CIDR bitmaps] Host address - 00001010.00000000.00000001.00000000 Network address - 00001010.00000000.00000001.00000000 Network mask - 11111111.11111111.11111111.00000000 Broadcast address - 00001010.00000000.00000001.11111111 Cisco wildcard - 00000000.00000000.00000000.11111111 Network range - 00001010.00000000.00000001.00000000 - 00001010.00000000.00000001.11111111 Usable range - 00001010.00000000.00000001.00000001 - 00001010.00000000.00000001.11111110 [Networks] Network - 10.0.1.0 - 10.0.1.255 (current) -
You can also point it to the IP on your network interface.
[andy@home-pc ~]$ sipcalc eno1 -[int-ipv4 : eno1] - 0 [CIDR] Host address - 192.168.222.101 Host address (decimal) - 3232292453 Host address (hex) - C0A8DE65 Network address - 192.168.222.0 Network mask - 255.255.255.0 Network mask (bits) - 24 Network mask (hex) - FFFFFF00 Broadcast address - 192.168.222.255 Cisco wildcard - 0.0.0.255 Addresses in network - 256 Network range - 192.168.222.0 - 192.168.222.255 Usable range - 192.168.222.1 - 192.168.222.254 -
And that’s about it; a really useful tool to have at your disposal.
Be the first to comment