| common_network {ipaddress} | R Documentation |
Returns the smallest network that contains both addresses.
This can construct a network from its first and last addresses. However, if
the address range does not match the network boundaries, then the result
extends beyond the original address range. Use summarize_address_range()
to receive a list of networks that exactly match the address range.
common_network(address1, address2)
address1 |
An |
address2 |
An |
An ip_network vector
# address range matches network boundaries
common_network(ip_address("192.168.0.0"), ip_address("192.168.0.15"))
# address range does not match network boundaries
common_network(ip_address("192.167.255.255"), ip_address("192.168.0.16"))