ip_random: generate random IPv4 IP addresses

Description Usage Arguments Value See Also Examples

View source: R/generators.R

Description

ip_random generates random IP addresses. These currently only follow IPv4 standards, since IPv6 addresses are too large to be stored in R in their numeric form. All IPs generated this way are valid.

Usage

1

Arguments

n

the number of IP addresses to randomly generate.

Value

a character vector of randomly-generated IPv4 addresses, in their dotted-decimal form.

See Also

ip_to_numeric for converting random_ips' output to its numeric form, and range_generate for generating all IP addresses within a specific range.

Examples

1
2
ip_random(1)
#[1] "49.20.57.31"

Example output

[1] "77.167.116.232"

iptools documentation built on Sept. 10, 2021, 5:06 p.m.