Readonly
addressSubnet address (i.e. the first/gateway IP address of the network)
Readonly
suffixSubnet suffix bits
Static
Readonly
IPV4_IPv4-mapped IPv6 subnet
Iterate all IP addresses in this subnet
NOTE: This can be slow for large subnets. If you need to check if an IP address is in the subnet, use Subnet#contains.
Get the last IP address in the subnet (i.e. broadcast address)
Iterate all IP addresses in this subnet
NOTE: This can be slow for large subnets. If you need to check if an IP address is in the subnet, use Subnet#contains.
Get the network mask
Get the number of addresses in this subnet. This number includes the broadcast and gateway addresses, so for the number of usable addresses, subtract 2.
Get the network wildcard mask
Static
fromCIDRCreate subnet from string in CIDR notation
RangeError If the address or suffix is invalid
A subnet of IP addresses