Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Checks whether an IP address is a multicast address.

is_multicast(x:ip) -> bool

The is_multicast function checks whether a given IP address x is a multicast address.

For IPv4, multicast addresses are in the range 224.0.0.0 to 239.255.255.255 (224.0.0.0/4).

For IPv6, multicast addresses start with the prefix ff00::/8.

from {
ipv4_multicast: 224.0.0.1.is_multicast(),
ipv6_multicast: ff02::1.is_multicast(),
not_multicast: 8.8.8.8.is_multicast(),
}
{
ipv4_multicast: true,
ipv6_multicast: true,
not_multicast: false,
}

Last updated: