netutil
example
Thia is an example of netutil
package.
(see netutil package)
How to use this example
Move to the example directory
cd PROJECT_ROOT_DIR/src/examples/netutil
Build this example
go build .
See help
./netutil --help
This program demonstrates the usage of the netutil package.
Usage:
./netutil [flags]
Examples:
./netutil --cidr "10.0.0.0/16" --minsubnets 4 --hosts 500
or
./netutil -c "10.0.0.0/16" -s 4 -n 500
Flags:
-c, --cidr string Base network CIDR block (default "192.168.0.0/16")
-h, --help help for ./netutil
-n, --hosts int Number of hosts per subnet (default 500)
-s, --minsubnets int Minimum number of subnets required (default 4)
Run example
./netutil
./netutil -c "10.0.0.0/16" -s 4 -n 500
./netutil --cidr "10.0.0.0/16" --minsubnets 4 --hosts 500