https://github.com/barturba/subnet-calc
A command-line IP subnet calculator that provides network information given an IP address and subnet mask.
https://github.com/barturba/subnet-calc
Last synced: 5 months ago
JSON representation
A command-line IP subnet calculator that provides network information given an IP address and subnet mask.
- Host: GitHub
- URL: https://github.com/barturba/subnet-calc
- Owner: barturba
- Created: 2024-07-23T18:23:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T21:28:19.000Z (over 1 year ago)
- Last Synced: 2024-10-30T22:20:27.246Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 4.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# subnet-calc
A command-line IP subnet calculator that provides network information given an IP address and subnet mask.
## Installation
```bash
go install github.com/barturba/subnet-calc@latest
```
## Usage
```bash
subnet-calc
```
### Example
```bash
$ subnet-calc 192.168.0.1 /24
Network address: 192.168.0.0
Usable host IP range: 192.168.0.1 - 192.168.0.254
Broadcast address: 192.168.0.255
Total number of hosts: 256
Number of usable hosts: 254
Subnet mask: 255.255.255.0
Wildcard mask: 0.0.0.255
```
## Development
### Build
```bash
make build
```
### Run tests
```bash
make test
```
### Run tests with coverage
```bash
make coverage
```
## License
MIT