SIPCALC(1)
๐ SIPCALC ๐
okay bestie, welcome to sipcalc(1) โ the General Commands Manual entry for your new favorite IP subnet calculator. yes, it's a real one, and yes it eats. let's go ๐
โจ NAME โจ
sipcalc โ IP subnet calculator ๐งฎโจ
๐ธ SYNOPSIS ๐ธ
sipcalc [ -abcdehiInrsStuvx46 ] <[ADDRESS] [INTERFACE] ... | [ - ]>
๐ฆ DESCRIPTION ๐ฆ
sipcalc is an IP subnet calculator, and it comes in two flavors: a plain text console version, and a web (cgi) counterpart. this manpage is only about the console one, so don't come for me about the cgi thing ๐ซถ
At its most basic, sipcalc takes an ip-address and a subnet mask on the commandline and outputs info about the subnet. And it's bilingual in the best way โ it supports both IPv4 and IPv6 addresses. no cap โจ
sipcalc can take input in three forms:
- an ip-address/netmask
- an interface
- or via stdin using the special character
-
๐ Address-IPv4 ๐
The address has to be in the "standard" dotted quad format, like: xxx.xxx.xxx.xxx, with an optional netmask that you can give in three different ways:
- CIDR, ex.
/nwheren >= 0 <= 32. - Dotted quad, ex.
xxx.xxx.xxx.xxx. - A hex value, ex
0xnnnnnnnnornnnnnnnn.
๐ Address-IPv6 ๐
Addresses can be given in any of the forms defined in RFC2373</c>, and the netmask (prefix) must be given in CIDR notation. Valid values for the netmask range from n >= 0 <= 128, and the default value if the netmask is omitted is 128. ๐
๐ Interface ๐
Instead of pulling address info off the commandline, sipcalc can go snoop at a specified interface on the system and grab the relevant info from there. Then it uses that to calculate the output values. this option is currently only available for IPv4 addresses โ work is being done to support IPv6 here also. patience, bestie ๐
๐ - ๐
Any further arguments will be read from stdin, which is super useful for stuff like cat(1)-ing a list of addresses stored in a file straight into sipcalc. Each line you send to sipcalc should contain one address/netmask or interface. ๐ซ
Any number/combination of Address and Interface arguments can exist on the commandline, however, the special character - must be the first argument or it will get parsed as an interface. And all options following the - character will be discarded. ๐ญ
๐ฅ Features (IPv4) ๐ฅ
- Multiple address and netmask input formats.
- Retrieving of address information from interfaces.
- Classfull and CIDR output.
- Multiple address and netmask output formats (dotted quad, hex, number of bits).
- Output of broadcast address, network class, Cisco wildcard, hosts/range, network range.
- Output of multiple types of bitmaps.
- Output of a user-defined number of extra networks.
- Multiple networks input from commandline.
- DNS resolutions of hostnames.
- Parsing of a newline separated list of networks from standard input (STDIN).
- The ability to "split" a network based on a smaller netmask, also with recursive runs on the generated subnets.
๐ Features (IPv6) ๐
- Compressed and expanded input addresses.
- Compressed and expanded output.
- Standard IPv6 network output.
- v4 in v6 output.
- Reverse DNS address generation.
- DNS resolutions of hostnames.
- The ability to "split" a network based on a smaller netmask, also with recursive runs on the generated subnets.
โจ Output โจ
sipcalc output is divided into sections and subsections, bestie. Each section starts with the string -[type : INPUT] - n where type can be one of int-ipv4, ipv6, ipv4. INPUT is one input option from the commandline, and n is the number of the section that this input option has produced currently displayed. currently the only input option that produces multiple output sections is an interface with multiple addresses. ๐ซถ
A subsection starts with the string [IDENTIFIER], where IDENTIFIER is an identifier for the subsection type. The subsection types are based on the used commandline options. Sections always end with the single character - alone on a line. ๐
Worth mentioning is also that sections can include not only subsections, but also other sections โ this currently only happens when the -u and -s/-S options are used.
Warnings/errors etc. can also be displayed in the form -[type : message].
๐ซ Description of common output ๐ซ
[IPv4] โญ
- Host address โ The given host address.
- Network address โ The first address in a given range, unusable for hosts under normal conditions.
- Network mask โ The network mask (netmask) used to specify the size of a given subnet, usually represented in three different formats: dotted quad (
xxx.xxx.xxx.xxx), hex (0xnnnnnnnn), and bits (/nwheren >= 0 <= 32) - Broadcast address โ The broadcast address of a given subnet, usually the last address in a range.
- Cisco wildcard โ The inverted value of the netmask (
netmask ^ 0xffffffff). This value is commonly used in for example access-lists on routers. - Addresses in network โ The number of addresses in the given subnet.
- Network range โ The full subnet range.
- Usable range โ The range in the given subnet that is commonly used for normal hosts.
[IPv6] ๐
- Expanded Address โ The full expanded IPv6 address.
- Compressed address โ The IPv6 address compressed in the most efficient way possible.
- Subnet prefix โ The prefix of the address (in relation to the netmask), the suffix of the address is zeroed out.
- Address ID โ The suffix of the address (in relation to the netmask), the prefix of the address is zeroed out.
- Prefix address โ The IPv6 equivalent of the IPv4 netmask.
- Prefix length โ Number of bits set in the netmask.
- Address type โ The address type as defined in RFC2373.
- Comment โ Some addresses will have comments from the author.
- Network range โ The start and end addresses of the subnet.
- Expanded v4inv6 address โ The full expanded IPv6 address in v4inv6 format.
- Compr. v4inv6 address โ The compressed IPv6 address in v4inv6 format.
- Reverse DNS โ The address in IPv6 reverse DNS form.
๐ OPTIONS ๐
-a,--allโ Give all possible information about an address or interface, this is equivalent to giving the flags-b -c -i -n 0for IPv4 and-e -r -tfor IPv6. the whole menu, no notes ๐ฅ-b,--cidr-bitmap(IPv4) โ Display CIDR based bitmaps.-c,--classfull-addr(IPv4) โ Display classfull address information.-d,--resolveโ Enable name resolution.-e,--v4inv6(IPv6) โ Display v4inv6 address information.-h,--helpโ Display the commandline help.-i,--cidr-addr(default IPv4) โ Display CIDR address information.-I,--addr-int=INTโ Explicitly add an interface. This can be used to circumvent the sipcalc "smart parsing" of addresses/interfaces on the commandline. This can be useful if you for example for some reason have an interface with the same name as an actual address, eg.127.0.0.1or::1etc. See also:-4-6.-n,--subnets=NUMโ DisplayNUMextra subnets (starting from the current subnet). Will display all subnets in the current/24ifNUMis0.-r,--v6rev(IPv6) โ Display IPv6 reverse DNS information.-s,--v4split=MASK(IPv4) โ Split the current network into subnets ofMASKsize.MASKcan be given in dotted quad, hex or CIDR form.-S,--v6split=MASK(IPv6) โ Split the current network into subnets ofMASKsize.MASKmust be given in CIDR form, either with or with the/character.-t,--v6-standard(default IPv6) โ Display IPv6 address information.-u,--split-verboseโ This will put network splitting into verbose mode. This means that all the subnets generated when splitting a network will be passed back to sipcalc for explicit parsing, giving the same output as if the address had been given on the commandline. All options passed to sipcalc on the commandline will also be inherited when the subnet is passed back to sipcalc for parsing, with one exception, the-s/-Sflag โ we don't want an endless loop ๐ญ. Sending only the-s/-Sand-uflags to sipcalc will give the default output (-ifor IPv4 and-tfor IPv6).-v,--versionโ Display version information.-w,--wildcardโ Takes a cisco wildcard (inverse mask) and display the corresponding regular netmask and netmask bit count.-x,--classful-bitmap(IPv6) โ Display a classfull bitmap.-4,--addr-ipv4=ADDRโ Explicitly add an IPv4 address. See also:-I-6.-6,--addr-ipv6=ADDRโ Explicitly add an IPv6 address. See also:-I-4.
๐ BUGS ๐
Probably lots. ngl, known missing features include getting IPv6 addresses from interfaces and implementing the -n option for IPv6 addresses. ๐ญ
Please send any bugs, feature requests, patches, comments etc. to simon@routemeister.net. ๐ฌ
๐ URL ๐
sipcalc can be downloaded from http://www.routemeister.net/ โจ
๐ AUTHOR ๐
Simon Ekstrand <simon@routemeister.net>. iconic behavior, honestly ๐
sipcalc(1) โ this page is from the General Commands Manual, and it's dated 19 January 2002. old but still slaying, periodt ๐โจ bye bestie, go calculate some subnets ๐ ๐ฆ
๐ฆ where this page comes from
- alpine 3.22: sipcalc-doc 1.1.6-r4 ยท BSD-3-Clause
- alpine 3.23: sipcalc-doc 1.1.6-r4 ยท BSD-3-Clause
- alpine 3.24: sipcalc-doc 1.1.6-r4 ยท BSD-3-Clause
- debian bookworm: sipcalc 1.1.6-3 ยท other
- debian trixie: sipcalc 1.1.6-3 ยท other
- epel 10: sipcalc 1.1.6-27.el10_0 ยท BSD-3-Clause
- fedora 43: sipcalc 1.1.6-29.fc43 ยท BSD-3-Clause
- fedora 44: sipcalc 1.1.6-30.fc44 ยท BSD-3-Clause
- nixos 26.05: sipcalc 1.1.6
- nixpkgs unstable: sipcalc 1.1.6
- ubuntu jammy: sipcalc 1.1.6-1
- ubuntu noble: sipcalc 1.1.6-3 ยท other
- ubuntu questing: sipcalc 1.1.6-3
- ubuntu resolute: sipcalc 1.1.6-3build1 ยท other
- ubuntu stonking: sipcalc 1.1.6-3build1 ยท other
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms