Menu Close Setting a custom subnet for machines

The IP range that the installation program uses by default might not match the Neutron subnet that you create when you install OpenShift Container Platform. If necessary, update the CIDR value for new machines by editing the installation configuration file.


  • You have the install-config.yaml file that was generated by the OpenShift Container Platform installation program.


  1. On a command line, browse to the directory that contains install-config.yaml.
  2. From that directory, either run a script to edit the install-config.yaml file or update the file manually:

    • To set the value by using a script, run:

      $ python -c '
      import yaml;
      path = "install-config.yaml";
      data = yaml.safe_load(open(path));
      data["networking"]["machineNetwork"] = [{"cidr": ""}]; 1
      open(path, "w").write(yaml.dump(data, default_flow_style=False))'
      Insert a value that matches your intended Neutron subnet, e.g.
    • To set the value manually, open the file and set the value of networking.machineCIDR to something that matches your intended Neutron subnet.