https://github.com/bandie91/subnet
native tool to discern whether a given IP is in the given range (support aliases)
https://github.com/bandie91/subnet
Last synced: about 2 months ago
JSON representation
native tool to discern whether a given IP is in the given range (support aliases)
- Host: GitHub
- URL: https://github.com/bandie91/subnet
- Owner: bAndie91
- License: agpl-3.0
- Created: 2018-02-16T09:02:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T19:06:10.000Z (4 months ago)
- Last Synced: 2025-03-28T02:38:18.544Z (2 months ago)
- Language: C
- Size: 39.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Use Case
===- check an IP is within one or more IP range
- answer is command's return code
- support named IP ranges, see cidr.txt
- list all named IP range an IP is in
- good for scripting
- IPv4, IPv6Examples
===- Check an IP is in a subnet
- `subnet 192.168.1.1 192.168.1.0/24`
- Check by well known network name
- `subnet 192.168.100.100 class-C`
- Check multiple ranges
- `subnet 192.168.100.100 class-C 192.168.100.0/24`
- one match sufficient
- List named networks
- `subnet 10.8.1.0`
- output:
```
private-net
rfc1918
class-A
priv-class-A
```# issues
Please submit issues via PR to some file `.txt` or `.md` on `issues` branch.