2020-05-02 22:23:22 +02:00
2020-05-02 15:23:22 +02:00
2020-09-13 19:45:33 +02:00
2020-05-02 15:32:43 +02:00
2020-09-13 19:45:33 +02:00

subnetcalc

A simple subnet calculator written in C, statically compiled, and then Dockerized. The Dockerized version was created as a demonstration on how to create really small Docker images from scratch.

Docker Image Size (latest by date) Docker Pulls Docker Stars Docker Cloud Automated build Docker Cloud Build Status

Manual build

If you would like to build it yourself, instead of running the pre-compiled image from Docker Hub, simple type make. This will create a image called subnetcalc. If you get a is up to date-message, instead run make --always-make.

Usage

Run it (remove jackbenny/ if you would like to run it from your local build) and enter the subnet mask in slash notation but without the slash.

For example enter 24 for a 24-bit subnet mask and the program will output the total number of addresses in the range aswell as the total number of usable addresses for hosts.

$> docker run -it --rm jackbenny/subnetcalc
Enter netmask in slash-notation without the slash: 24
Netmask bit: 24

256 total addresses
254 usable addresses for hosts
Description
A Dockerized version of my simple subnet calculator
https://hub.docker.com/r/jackbenny/subnetcalc
Readme 1,002 KiB
Languages
C 77.7%
Makefile 12.1%
Dockerfile 10.2%