import random


def select_ip_from_network(network):
    """
    Randomly selects an IP address from a particular network
    :param network: Network from which to select the IP address
    :return: IP address as integer from network
    """
    max_address = network.address | ((1 << (32 - network.prefix)) - 1)
    return random.randint(network.address, max_address)