IPCALC(1)

NAME
ipcalc - calculate IPv4 network sizes, masks and broadcasts

SYNOPSIS
ipcalc [-c] address / netmask
ipcalc [-vc] -s mask1,mask2,... address / netmask
ipcalc [-vc] -r address : address
ipcalc [-c] -n netmask

DESCRIPTION
ipcalc is a small tool that operates on IPv4 networks. It can operate in one of four modes: network describing, netmask describing, finding or splitting. When called without any flags, ipcalc operates in network describing mode. Options are exclusive except for -v and are as follows:

-s  Enable network splitting, the argument is a list of integers separated by commas. Each integer represents a number of IPs. For each integer, ipcalc will try to find a network that is a sub network of the main network and that can contain the number of IPs specified.

-r  Enable network finding. Ipcalc will find as few networks as possible between the two addresses specified.

-n  Netmask describing. Ipcalc will print the netmask in all formats it knows.

-v  Operates only on network finding and splitting in which case it prints detailed information for each network.

-c  Includes the cisco wildcard syntax in the output where applicable.

NETMASKS
Netmasks can be specified in one of three ways:

prefix length
    An integer between 1 and 32 inclusive which indicates the numbers of bits set in the address.

quad-dotted address
    A traditionnal IPv4 address such as 255.255.255.0

hex notation address
    An address in hex notation such as 0xffffff00