0.0.1-beta • Published 4 years ago

cidrexplained v0.0.1-beta

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Instruction

It explain ip Classless inter-domain routing (CIDR) range

How to install

You can install cidrexplained as a dependency using NPM.

$ npm install cidrexplained

Command Line Interface

Usage: cidrexplained [options]
  -a,          output CIDR range ip array
  -m,          display result in ipv4 mapped ipv6 address

Examples

ipv4 CIDR

npx cidrexplained 192.168.1.15/29 -a
// output
{
  "start": "192.168.1.8",
  "end": "192.168.1.15",
  "numHosts": 8
}
192.168.1.8
192.168.1.9
192.168.1.10
192.168.1.11
192.168.1.12
192.168.1.13
192.168.1.14
192.168.1.15

ipv4 mapped ipv6 address CIDR without -m option

npx cidrexplained ::ffff:192.168.1.15/126 -a
// output
{
  "start": "::ffff:c0a8:010c",
  "end": "::ffff:c0a8:010f",
  "numHosts": 4
}
::ffff:c0a8:010c
::ffff:c0a8:010d
::ffff:c0a8:010e
::ffff:c0a8:010f

ipv4 mapped ipv6 address CIDR with -m option

npx cidrexplained ::ffff:192.168.1.15/126 -a -m
// output
{
  "start": "::ffff:192:168:1:12",
  "end": "::ffff:192:168:1:15",
  "numHosts": 4
}
::ffff:192:168:1:12
::ffff:192:168:1:13
::ffff:192:168:1:14
::ffff:192:168:1:15