PHPackages                             emden-norfolk/cidrl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. emden-norfolk/cidrl

Abandoned → [s1lentium/iptools](/?search=s1lentium%2Fiptools)Library

emden-norfolk/cidrl
===================

IP tools for CIDR blocks.

1.0.0(8y ago)186.7k3[1 issues](https://github.com/emden-norfolk/cidrl/issues)LGPL-2.0CPHP &gt;=5.3.0

Since Jun 15Pushed 1y ago2 watchersCompare

[ Source](https://github.com/emden-norfolk/cidrl)[ Packagist](https://packagist.org/packages/emden-norfolk/cidrl)[ Docs](https://github.com/emden-norfolk/cidrl)[ RSS](/packages/emden-norfolk-cidrl/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (1)Used By (0)

`cidrl` — CIDR List
===================

[](#cidrl--cidr-list)

**CIDRL** lists all IP addresses within a CIDR block (IPv4 and IPv6.) Supports subnetting.

Classless Inter-Domain Routing (CIDR; *[rfc1519](https://tools.ietf.org/html/rfc1519)*) is a strategy for assigning and routing Internet Protocol (IP) addresses.

Usage
-----

[](#usage)

### `cidrl` for IPv4

[](#cidrl-for-ipv4)

Analyse and list all hosts in a /29:

```
$ man cidrl
$ cidrl -a 192.168.50.16/29
Gateway:    192.168.50.16
Broadcast:  192.168.50.23
Netmask:    255.255.255.248
Hosts:      8
$ cidrl 192.168.50.16/29
192.168.50.16
192.168.50.17
192.168.50.18
192.168.50.19
192.168.50.20
192.168.50.21
192.168.50.22
192.168.50.23
```

Split a /24 into /28:

```
$ cidrl -s28 10.0.0.0/24
10.0.0.0/28
10.0.0.16/28
10.0.0.32/28
10.0.0.48/28
10.0.0.64/28
10.0.0.80/28
10.0.0.96/28
10.0.0.112/28
10.0.0.128/28
10.0.0.144/28
10.0.0.160/28
10.0.0.176/28
10.0.0.192/28
10.0.0.208/28
10.0.0.224/28
10.0.0.240/28
```

See [`examples/host_exists_in_network.sh`](examples/host_exists_in_network.sh) for an example on how to use the `-e` option to programmatically check if a host exists within a given network. Alternatively, use `cidrl -ae  `.

### `cidrl6` for IPv6

[](#cidrl6-for-ipv6)

Split an IPv6 /60 into /64:

```
$ man cidrl6
$ cidrl6 -s64 fa01:0:0:ffa0::/60
fa01:0:0:ffa0::/64
fa01:0:0:ffa1::/64
fa01:0:0:ffa2::/64
fa01:0:0:ffa3::/64
fa01:0:0:ffa4::/64
fa01:0:0:ffa5::/64
fa01:0:0:ffa6::/64
fa01:0:0:ffa7::/64
fa01:0:0:ffa8::/64
fa01:0:0:ffa9::/64
fa01:0:0:ffaa::/64
fa01:0:0:ffab::/64
fa01:0:0:ffac::/64
fa01:0:0:ffad::/64
fa01:0:0:ffae::/64
fa01:0:0:ffaf::/64
```

Analyse an IPv6 network and check if a given host exists within it:

```
$ cidrl6 -ae fa01::ffb0:3:0:0:ae90 fa01:0:0:ffa0::/64
Network:    fa01:0:0:ffa0::
Range-end:  fa01::ffa0:ffff:ffff:ffff:ffff
Netmask:    ffff:ffff:ffff:ffff::

The host fa01::ffb0:3:0:0:ae90 does not exist within this network.
```

Installation
------------

[](#installation)

```
$ git clone git@github.com:emden-norfolk/cidrl.git
$ cd cidrl/
$ make
$ sudo make install
```

References
----------

[](#references)

The following manual pages are helpful for understanding the implementation of CIDRL:

- [`getopt.3`](https://man7.org/linux/man-pages/man3/getopt.3.html)
- [`scanf.3`](https://man7.org/linux/man-pages/man3/scanf.3.html)
- [`byteorder.3`](https://man7.org/linux/man-pages/man3/byteorder.3.html)
- [`atoi.3`](https://man7.org/linux/man-pages/man3/atoi.3.html)
- [`inet.3`](https://man7.org/linux/man-pages/man3/inet.3.html)
- [`inet_pton.3`](https://man7.org/linux/man-pages/man3/inet_pton.3.html)
- [`inet_ntop.3`](https://man7.org/linux/man-pages/man3/inet_ntop.3.html)
- [`ipv6.7`](https://man7.org/linux/man-pages/man7/ipv6.7.html)

Further reading:

- Grothof, C. (2008), [*Migrating Code to IPv6 the good, the bad and the ugly*](https://grothoff.org/christian/rmv608.pdf), Colorado Research Institute for Security and Privacy.

See also:

- [Nmap](https://nmap.org/)
- [`prips`](https://gitlab.com/prips/prips/)

Author
------

[](#author)

2016 (c) Damien Bezborodov

###  Health Score

33

↑

LowBetter than 75% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9965614f83e28b051507d8697c162e51d9289f0f3eeb87de1b9638431749c7f?d=identicon)[dbezborodov](/maintainers/dbezborodov)

---

Top Contributors

[![bezborodow](https://avatars.githubusercontent.com/u/950634?v=4)](https://github.com/bezborodow "bezborodow (89 commits)")

---

Tags

cidrcidr-notationipv4ipv4-calculatoripv6ipv6-calulatorIPcidr

### Embed Badge

![Health badge](/badges/emden-norfolk-cidrl/health.svg)

```
[![Health](https://phpackages.com/badges/emden-norfolk-cidrl/health.svg)](https://phpackages.com/packages/emden-norfolk-cidrl)
```

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M294](/packages/geoip2-geoip2)[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.2M24](/packages/s1lentium-iptools)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[fastsitephp/fastsitephp

A Modern Open Source Framework for building High Performance Websites and API’s with PHP

1292.7k1](/packages/fastsitephp-fastsitephp)[cidram/aggregator

A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.

2624.1k](/packages/cidram-aggregator)[jaaulde/php-ipv4

PHP classes for working with IPV4 addresses and networks.

1034.6k](/packages/jaaulde-php-ipv4)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
