Skip to main content

Universal (IPv4/IPv6) IP address and netmask calculator

Project description

Universal (IPv4/IPv6) CIDR calculator

Source available at: http://bitbucket.org/asenci/uipcalc/

Please report any issues at: http://bitbucket.org/asenci/uipcalc/issues/

Installing:

$ pip install uipcalc

Usage:

uipcalc [-h] address

Universal (IPv4/IPv6) IP address and netmask calculator

positional arguments:
  address     IP address with netmask in CIDR or dotted-decimal notation

optional arguments:
  -h, --help  show this help message and exit

Examples:

$ uipcalc 192.0.2.4/12
Number of addresses:  1048576

Network:    192.0.0.0
Broadcast:  192.15.255.255
Netmask:    255.240.0.0 (12)

Network:    11000000.0000 0000.00000000.00000000
Broadcast:  11000000.0000 1111.11111111.11111111
Netmask:    11111111.1111 0000.00000000.00000000

$ uipcalc 192.0.2.4/255.255.255.192
Number of addresses:  64

Network:    192.0.2.0
Broadcast:  192.0.2.63
Netmask:    255.255.255.192 (26)

Network:    11000000.00000000.00000010.00 000000
Broadcast:  11000000.00000000.00000010.00 111111
Netmask:    11111111.11111111.11111111.11 000000

$ uipcalc 2001:DB8::/48
Number of addresses:  1208925819614629174706176

Network:    2001:0db8:0000:0000:0000:0000:0000:0000
Broadcast:  2001:0db8:0000:ffff:ffff:ffff:ffff:ffff
Netmask:    ffff:ffff:ffff:0000:0000:0000:0000:0000 (48)

Network:    0010000000000001.0000110110111000.0000000000000000. 0000000000000000.0000000000000000.0000000000000000.0000000000000000.0000000000000000
Broadcast:  0010000000000001.0000110110111000.0000000000000000. 1111111111111111.1111111111111111.1111111111111111.1111111111111111.1111111111111111
Netmask:    1111111111111111.1111111111111111.1111111111111111. 0000000000000000.0000000000000000.0000000000000000.0000000000000000.0000000000000000

$ uipcalc 2001:DB8::/60
Number of addresses:  295147905179352825856

Network:    2001:0db8:0000:0000:0000:0000:0000:0000
Broadcast:  2001:0db8:0000:000f:ffff:ffff:ffff:ffff
Netmask:    ffff:ffff:ffff:fff0:0000:0000:0000:0000 (60)

Network:    0010000000000001.0000110110111000.0000000000000000.000000000000 0000.0000000000000000.0000000000000000.0000000000000000.0000000000000000
Broadcast:  0010000000000001.0000110110111000.0000000000000000.000000000000 1111.1111111111111111.1111111111111111.1111111111111111.1111111111111111
Netmask:    1111111111111111.1111111111111111.1111111111111111.111111111111 0000.0000000000000000.0000000000000000.0000000000000000.0000000000000000

Requirements:

  • Python >= 2.6

  • argparse (for Python < 2.7)

  • ipaddress (for Python < 3.3)

  • six

License:

Licensed under ISC license.

See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uipcalc-0.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uipcalc-0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file uipcalc-0.3.tar.gz.

File metadata

  • Download URL: uipcalc-0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for uipcalc-0.3.tar.gz
Algorithm Hash digest
SHA256 bd031065783bb7f4b9a070e92089a21eaf05c714784f21927a62af8ca8c735a8
MD5 18a7ea19b235723e77457262db1209e1
BLAKE2b-256 a220b66ec52ed5352b0c1a92bfd6953a75e33d48131e50016e126e8116a75f86

See more details on using hashes here.

File details

Details for the file uipcalc-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for uipcalc-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9833faf6a4bfc15413a17f9ba081eb84732c59c3a80740c65362b6ba05fb5a3f
MD5 29740cf2edaa4cf6d3cdb5a5eec29612
BLAKE2b-256 36149edae727a3adb6e7f2aa4eb750f75dab1c31bfd629db7fc886061df4e0bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page