mirror of
https://github.com/jiro4989/subnet
synced 2026-01-14 19:11:36 +00:00
No description
|
|
||
|---|---|---|
| .github | ||
| src | ||
| tests | ||
| tool | ||
| .gitignore | ||
| LICENSE | ||
| README.rst | ||
| subnet.nimble | ||
==== subnet ==== |nimble-version| |nimble-install| |gh-actions| ``subnet`` prints subnet mask in human readable. .. contents:: Table of contents Usage ===== .. code-block:: shell $ subnet 100.100.200.1/24 100.100.200.1 24 01100100011001001100100000000001 11111111111111111111111100000000 # Change delimiter $ subnet -H 192.168.1.1/28 192.168.1.17/28 -C -d , 192.168.1.1,28,11000000101010000000000100000001,11111111111111111111111111110000 192.168.1.17,28,11000000101010000000000100010001,11111111111111111111111111110000 Coloring ( ``with -C option`` ). |image-color| Expanded notations ------------------ Range ( ``BEGIN-END`` ) ^^^^^^^^^^^^^^^^^^^ .. code-block:: shell $ subnet 192.168.1.1-15/28 -C ip_address cidr bin mask 192.168.1.1 28 11000000101010000000000100000001 11111111111111111111111111110000 192.168.1.2 28 11000000101010000000000100000010 11111111111111111111111111110000 192.168.1.3 28 11000000101010000000000100000011 11111111111111111111111111110000 192.168.1.4 28 11000000101010000000000100000100 11111111111111111111111111110000 192.168.1.5 28 11000000101010000000000100000101 11111111111111111111111111110000 192.168.1.6 28 11000000101010000000000100000110 11111111111111111111111111110000 192.168.1.7 28 11000000101010000000000100000111 11111111111111111111111111110000 192.168.1.8 28 11000000101010000000000100001000 11111111111111111111111111110000 192.168.1.9 28 11000000101010000000000100001001 11111111111111111111111111110000 192.168.1.10 28 11000000101010000000000100001010 11111111111111111111111111110000 192.168.1.11 28 11000000101010000000000100001011 11111111111111111111111111110000 192.168.1.12 28 11000000101010000000000100001100 11111111111111111111111111110000 192.168.1.13 28 11000000101010000000000100001101 11111111111111111111111111110000 192.168.1.14 28 11000000101010000000000100001110 11111111111111111111111111110000 192.168.1.15 28 11000000101010000000000100001111 11111111111111111111111111110000 ``BEGIN`` is set `0` if no ``BEGIN``. ``END`` is set `255` if no ``END``. Multi IP ( ``ip1,ip2,ip3`` ) ^^^^^^^^^^^^^^^^^^^ .. code-block:: shell ⟩ subnet 192.168.1.1,2,4,8/28 -C ip_address cidr bin mask 192.168.1.1 28 11000000101010000000000100000001 11111111111111111111111111110000 192.168.1.2 28 11000000101010000000000100000010 11111111111111111111111111110000 192.168.1.4 28 11000000101010000000000100000100 11111111111111111111111111110000 192.168.1.8 28 11000000101010000000000100001000 11111111111111111111111111110000 Installation ============ .. code-block:: shell $ nimble install -Y subnet LICENSE ======= MIT .. |gh-actions| image:: https://github.com/jiro4989/subnet/workflows/build/badge.svg :target: https://github.com/jiro4989/subnet/actions .. |nimble-version| image:: https://nimble.directory/ci/badges/subnet/version.svg :target: https://nimble.directory/ci/badges/subnet/nimdevel/output.html .. |nimble-install| image:: https://nimble.directory/ci/badges/subnet/nimdevel/status.svg :target: https://nimble.directory/ci/badges/subnet/nimdevel/output.html .. |image-color| image:: https://user-images.githubusercontent.com/13825004/86523414-fa375400-bea6-11ea-926f-8efa76cb307c.png