This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Copyright 2016 Caleb Evans
Released under the MIT license

CIDR Brewer is a command-line utility which displays information for classless IP addresses (such as subnet mask and network ID) so you don’t need to perform the calculations yourself.


You can install CIDR Brewer via pip (ideally globally):

pip install cidr-brewer


To use, run cidr-brewer from the command line with one or two IP addresses.

One IP address

If you pass a single IP address using slash notation, CIDR Brewer will compute the subnet mask, network ID, broadcast ID, and the range of valid/available IP addresses.

$ ./
Given IP address:  11000000.10101000.00010011.01100100
Subnet mask:    11111111.11111111.11111111.10000000
Network ID:    11000000.10101000.00010011.00000000
Broadcast ID:     11000000.10101000.00010011.01111111
First Available Address:       11000000.10101000.00010011.00000001
Last Available Address:     11000000.10101000.00010011.01111110
Subnet Size: 2^7 - 2 = 126

Additionally, if you supply a list of block sizes, CIDR Brewer will compute the same information for each sub-block.

$ ./ --block-sizes 16 64 16 32
Given IP address:  00101010.01110010.10011000.10000000
Block 1:
   Block Size: 2^6 = 64
   Network ID:  00101010.01110010.10011000.10000000
   Broadcast ID:     00101010.01110010.10011000.10111111
   First Available Address:     00101010.01110010.10011000.10000001
   Last Available Address:     00101010.01110010.10011000.10111110
   Subnet Size: 2^6 - 2 = 62
Block 2:
   Block Size: 2^5 = 32
   Network ID:  00101010.01110010.10011000.11000000
   Broadcast ID:     00101010.01110010.10011000.11011111
   First Available Address:     00101010.01110010.10011000.11000001
   Last Available Address:     00101010.01110010.10011000.11011110
   Subnet Size: 2^5 - 2 = 30
Block 3:
   Block Size: 2^4 = 16
   Network ID:  00101010.01110010.10011000.11100000
   Broadcast ID:     00101010.01110010.10011000.11101111
   First Available Address:     00101010.01110010.10011000.11100001
   Last Available Address:     00101010.01110010.10011000.11101110
   Subnet Size: 2^4 - 2 = 14
Block 4:
   Block Size: 2^4 = 16
   Network ID:  00101010.01110010.10011000.11110000
   Broadcast ID:     00101010.01110010.10011000.11111111
   First Available Address:     00101010.01110010.10011000.11110001
   Last Available Address:     00101010.01110010.10011000.11111110
   Subnet Size: 2^4 - 2 = 14

Two IP addresses

If you pass two IP addresses (without slash notation), CIDR Brewer will also compute the largest subnet mask needed for communication between the two addresses.

$ ./
Given IP addresses:       10101100.00010000.00001011.01001010       10101100.00010000.00001011.01001110
Largest subnet mask allowing communication:
   29 bits    11111111.11111111.11111111.11111000
Network ID:    10101100.00010000.00001011.01001000
Broadcast ID:       10101100.00010000.00001011.01001111
First Available Address:       10101100.00010000.00001011.01001001
Last Available Address:       10101100.00010000.00001011.01001110
Subnet Size: 2^3 - 2 = 6

If you pass two IP addresses (with slash notation), CIDR Brewer will also indicate if the IP addresses can already communicate on their respective subnets.

$ ./
Given IP addresses:   01111101.00101111.00100000.10101010    01111101.00101111.00100000.00110101
Can these IP addresses communicate?
Largest subnet mask allowing communication:
   24 bits      11111111.11111111.11111111.00000000
Network ID:     01111101.00101111.00100000.00000000
Broadcast ID:      01111101.00101111.00100000.11111111
First Available Address:        01111101.00101111.00100000.00000001
Last Available Address:      01111101.00101111.00100000.11111110
Subnet Size: 2^8 - 2 = 254


The /examples directory contains example IP addresses for you to test against the utility.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cidr-brewer-1.0.0.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Jul 9, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting