powered by
is_supernet() and is_subnet() check if one network is a true supernet or subnet of another network; overlaps() checks for any overlap between two networks.
is_supernet()
is_subnet()
overlaps()
is_supernet(network, other)is_subnet(network, other)overlaps(network, other)
is_subnet(network, other)
overlaps(network, other)
An ip_network vector
ip_network
A logical vector
Use is_within() to check if an ip_address is within an ip_network.
is_within()
ip_address
Use supernet() and subnets() to traverse the network hierarchy.
supernet()
subnets()
# NOT RUN { net1 <- ip_network("192.168.1.128/30") net2 <- ip_network("192.168.1.0/24") is_supernet(net1, net2) is_subnet(net1, net2) overlaps(net1, net2) # }
Run the code above in your browser using DataLab