import ipaddress


def _get_network_address(ip, mask=24):
    """
    Return address of the IPv4 network for single IPv4 address with given mask.
    """
    ip = ipaddress.ip_address(ip)
    return ipaddress.ip_network(
        '{}/{}'.format(
            ipaddress.ip_address(int(ip) & (2**32 - 1) << (32 - mask)),
            mask
        )
    )