IPNET

IPv4 or IPv6 address range expressed using CIDR notation.

LITERAL NOTATION:

192.168.100.14/24

Conversion

1
2
3
IPNET(192.168.100.14, 24)
IPNET("192.168.100.14/24")
IPNET('2001:db8::/48')
  1. converts literal notation of IPv4 address and mask to IPNET
  2. converts a string of IPv4 address and mask to IPNET
  3. converts a string of IPv6 address and mask to IPNET

Functions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ipnet1=213.44.17.8/24

ASN(ipnet1)                 // => 5410
ASNAME(ipnet1)              // => AS5410 Bouygues Telecom SA
CC(ipnet1)                  // => FR
IPLOC(ipnet1)               // => {cc="FR" city="--" geo=48.8582,2.3387}
IPIN(213.44.17.4, ipnet1)   // => TRUE
IS_IPV4(ipnet1)             // => TRUE
IS_IPV6(ipnet1)             // => FALSE
MASK(ipnet1)                // => 24

Parsing

1
IPV4NET