def divide_network(address_prefix)
      network_address = IPAddress(address_prefix)
      prefix = nil

      case network_address.count
      when 4097..65536
        prefix = "20"
      when 256..4096
        prefix = "24"
      end

      ## if the given network is small then do not divide it else divide using
      ## the prefix value calculated above ##
      prefix.nil? ? address_prefix : network_address.network.address.concat("/" + prefix)
    end
def divide_network(address_prefix)
      network_address = IPAddress(address_prefix)
      prefix = nil

      case network_address.count
      when 4097..65536
        prefix = "20"
      when 256..4096
        prefix = "24"
      end

      ## if the given network is small then do not divide it else divide using
      ## the prefix value calculated above ##
      prefix.nil? ? address_prefix : network_address.network.address.concat("/" + prefix)
    end
when a address space in an existing virtual network is not used at all
 then divide the space into the number of subnets based on the total
 number of hosts that network supports