Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

yPcalc - An IPv4 and IPv6 subnet calculator

  1. Description

  2. Requirements

  3. Installation

  4. Usage

  5. License

  6. Support

  7. Authors

  8. Description

yPcalc is a simple Python based IPv4 and IPv6 calculator. It's output is easy to parse which makes it possible to intergrate it to shell scripts.

  1. Requirements

  1. Installation

  • Download and install ipcalc Python module. I recommend to use the latest one from the GitHub and install it by running the setup script in command prompt:

      $ python install
  • Download the latest release from and extract the archive to the chosen destination directory.

    Development files can be browsed via web browser or can be optained from a git repository

    Note: You can also get the sources using the GIT and cloning the repository.

  • Install it by running the the setup script in command prompt:

      $ python install

Note: You must have administrator/super user privileges for the installation.

  1. Usage

yPcalc is a command line software, therefore all actions are performed in command prompt.

$ ypcalc -h
usage: ypcalc [-h] [-V] [-L] {show,check} ...

yPcalc - An IPv4 and IPv6 subnet calculator.

optional arguments:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit
  -L, --license  show program's license end exit

  {show,check}   see {command} -h for more help
    show         show the IP address information
    check        check if IP address exists in the network. Exits with code 1
                 if not found

It has two commands:

  • show displays the information about the IP or network address;
  • check performs a lookup to see if the IP address exists in the network.

See ypcalc {command} -h for command specific arguments.

IPv4 examples:

$ ypcalc show
Netmask: = 27
Hosts/Net:   32 UNKNOWN
IPv6 repr:   2002:c000:03ab:0000:0000:0000:0000:0000
PTR RR name:
IP version:  4

$ ypcalc check
ypcalc: info: IP exists in network

$ ypcalc check
ypcalc: error: IP does not exist in network

IPv6 examples:

$ ypcalc show 2002:c000:022a::/29
Address:     2002:c000:022a:0000:0000:0000:0000:0000/29
Netmask:     ffff:fff8:0000:0000:0000:0000:0000:0000 = 29
Network:     2002:c000:0000:0000:0000:0000:0000:0000/29
HostMin:     2002:c000:0000:0000:0000:0000:0000:0001
HostMax:     2002:c007:ffff:ffff:ffff:ffff:ffff:fffe
Hosts/Net:   633825300114114700748351602688 UNKNOWN
IPv4 repr:
PTR RR name:
IP version:  6

$ ypcalc check 2002:c006:022a:: 2002:c000:022a::/29
ypcalc: info: IP 2002:c006:022a:: exists in network 2002:c000:022a::/29

$ ypcalc check 2002:c009:022a:: 2002:c000:022a::/29
ypcalc: error: IP 2002:c009:022a:: does not exist in network 2002:c000:022a::/29

When using output filter then only specific values are displayed, without the caption prefix:

$ ypcalc show --reverse --netmask 2002:c000:022a::/29

The values are ordered as shown in ypcalc show -h regardless of the sequence of the arguments.

  1. License

This software is licensed as described in the file, which You should have received as part of this distribution. The terms are also available at

  1. Support

Issue tracker can be found at

  1. Authors


An IPv4 and IPv6 subnet calculator.







No packages published