HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

cidr — Simplifies IPv4/IPv6 CIDR network prefix management with counting, overlap checking, explanation, an

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandnetworkcliipv6ipv4cidrsimplifies

Problem

How to use the cidr command: Simplifies IPv4/IPv6 CIDR network prefix management with counting, overlap checking, explanation, and subdivision. More information: <https://github.com/bschaatsbergen/cidr>.

Solution

cidr — Simplifies IPv4/IPv6 CIDR network prefix management with counting, overlap checking, explanation, and subdivision. More information: <https://github.com/bschaatsbergen/cidr>.

Explain a CIDR range:
cidr explain {{10.0.0.0/16}}


Check whether an address belongs to a CIDR range:
cidr contains {{10.0.0.0/16}} {{10.0.14.5}}


Get a count of all addresses in a CIDR range:
cidr count {{10.0.0.0/16}}


Check whether two CIDR ranges overlap:
cidr overlaps {{10.0.0.0/16}} {{10.0.14.0/22}}


Divide a CIDR range into a specific number of networks:
cidr divide {{10.0.0.0/16}} {{9}}

Code Snippets

Explain a CIDR range

cidr explain {{10.0.0.0/16}}

Check whether an address belongs to a CIDR range

cidr contains {{10.0.0.0/16}} {{10.0.14.5}}

Get a count of all addresses in a CIDR range

cidr count {{10.0.0.0/16}}

Check whether two CIDR ranges overlap

cidr overlaps {{10.0.0.0/16}} {{10.0.14.0/22}}

Divide a CIDR range into a specific number of networks

cidr divide {{10.0.0.0/16}} {{9}}

Context

tldr-pages: common/cidr

Revisions (0)

No revisions yet.