Skip to content

A simple subnetting calculator created in Python

Notifications You must be signed in to change notification settings

BrookJeynes/scalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command-line Subnetting Calculator - Created in Python!

Scalc is a simple command-line subnet calculator. It can be used to generate markdown tables of subnet information.


Usage

  1. Navigate into the project directory:
    cd subnet-calculator
  2. Install the module:
    pip install .
  3. Run the command-line tool:
    ❯ scalc --help
    
    Usage: scalc [OPTIONS] IP_ADDRESS
    
    ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────╮
    │ *    ip_address      TEXT  IP address. [default: None] [required]                                        │
    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ --version         -v                 Show version.                                                       │ 
    │ --slash-notation  -sn       INTEGER  Slash notation. Overrides --subnets. [default: 24]                  │
    │ --subnets         -s        INTEGER  Number of subnets. [default: 2]                                     │
    │ --output-format   -of       TEXT     Output format. Supported formats: terminal [default: terminal]      │
    │ --help                               Show this message and exit.                                         │
    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  4. Example output for scalc 193.64.33.0 -s 4:
    Subnet Network Address Slash Notation First Usable IP Address Last Usable IP Address Broadcast Address
    1 193.64.33.0 /26 193.64.33.1 193.64.33.62 193.64.33.63
    2 193.64.33.64 /26 193.64.33.65 193.64.33.126 193.64.33.127
    3 193.64.33.128 /26 193.64.33.129 193.64.33.190 193.64.33.191
    4 193.64.33.192 /26 193.64.33.193 193.64.33.254 193.64.33.255

Current features:

  • Subnet /24-/32 notation IP address
  • Generate markdown tables of subnet information
  • ...

Planned features:

  • Calculate supernetting data /23-/8 notation IP address
  • Export subnet information to files
  • ...

Contribution

Feel free to create a pull request and add some new features or create an issue and I'll see to it when I can. Any help is appreciated.

About

A simple subnetting calculator created in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages