generates a vector containing all IP addresses within a provided range. Currently IPv4 only due to R's support (or lack thereof) for really big numbers.

range_generate(range)

Arguments

range
an IPv4 IP range

Value

a character vector containing each IPv4 IP address within the provided range.

See also

ip_random for randomly-generated IPs, or ip_to_numeric for converting generate_range's output to its numeric form.

Examples

range_generate("172.18.0.0/28")
#> [1] "172.18.0.0" "172.18.0.1" "172.18.0.2" "172.18.0.3" "172.18.0.4" #> [6] "172.18.0.5" "172.18.0.6" "172.18.0.7" "172.18.0.8" "172.18.0.9" #> [11] "172.18.0.10" "172.18.0.11" "172.18.0.12" "172.18.0.13" "172.18.0.14" #> [16] "172.18.0.15" #>
#[1] "172.18.0.0" "172.18.0.1" "172.18.0.2" "172.18.0.3" "172.18.0.4" #[6] "172.18.0.5" "172.18.0.6" "172.18.0.7" "172.18.0.8" "172.18.0.9" #[11] "172.18.0.10" "172.18.0.11" "172.18.0.12" "172.18.0.13" "172.18.0.14" "172.18.0.15"