Skip to content

Commit

Permalink
Merge pull request #83 from bschaatsbergen/c/fix-wording
Browse files Browse the repository at this point in the history
chore: fix wording in `explain` section
  • Loading branch information
DanielRieske authored Dec 10, 2023
2 parents 383a50b + e49c1fa commit 49dc6fb
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ You can download the [latest binary](https://github.com/bschaatsbergen/cidr/rele

Using `cidr` is very simple.

### Explain a CIDR range

To get more information on a CIDR range:

```
$ cidr explain 10.0.0.0/16
Base Address: 10.0.0.0
Usable Address Range: 10.0.0.1 to 10.0.255.254
Broadcast Address: 10.0.255.255
Address Count: 65,534
Netmask: 255.255.0.0 (/16 bits)
```

This also works with IPv6 CIDR ranges, for example:

```
$ cidr explain 2001:db8:1234:1a00::/64
Base Address: 2001:db8:1234:1a00::
Usable Address Range: 2001:db8:1234:1a00:: to 2001:db8:1234:1a00:ffff:ffff:ffff:ffff
Address Count: 18,446,744,073,709,551,614
Netmask: ffff:ffff:ffff:ffff:: (/64 bits)
```

### Check whether an address belongs to a CIDR range

To check if a CIDR range contains an IP:
Expand Down Expand Up @@ -73,29 +96,6 @@ $ cidr overlaps 2001:db8:1111:2222:1::/80 2001:db8:1111:2222:1:1::/96
true
```

### To get more information about a CIDR range

You can simply use the `explain` subcommand:

```
$ cidr explain 10.0.0.0/16
Base Address: 10.0.0.0
Usable Address Range: 10.0.0.1 to 10.0.255.254
Broadcast Address: 10.0.255.255
Address Count: 65,534
Netmask: 255.255.0.0 (/16 bits)
```

This also works with IPv6 CIDR ranges, for example:

```
$ cidr explain 2001:db8:1234:1a00::/64
Base Address: 2001:db8:1234:1a00::
Usable Address Range: 2001:db8:1234:1a00:: to 2001:db8:1234:1a00:ffff:ffff:ffff:ffff
Address Count: 18,446,744,073,709,551,614
Netmask: ffff:ffff:ffff:ffff:: (/64 bits)
```

## Contributing

Contributions are highly appreciated and always welcome.
Expand Down

0 comments on commit 49dc6fb

Please sign in to comment.