<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.13 </button>

- [Latest version](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/latest/how-to/ip-block-file)
- [Version 1.16](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.16/how-to/ip-block-file.md.txt)
- [Earlier versions (unsupported)](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/latest/version-history#expandable-1)

<br />

This page describes the fields in an IP block file, which is used in the setup of Google Distributed Cloud.

You use an IP block file to describe a set of machines and the network that the
machines are on. Here are some examples of how you would use an IP block file:

- List the hostnames and static IP addresses for the nodes in your admin cluster.

- List the hostnames and static IP addresses for the nodes in a user cluster.

- List the hostnames and static IP addresses for the VMs that run the bundled
  Seesaw load balancer for your admin cluster.

- List the hostnames and static IP addresses for the VMs that run the bundled
  Seesaw load balancer for a user cluster.

> [!NOTE]
> **Note:** If your system uses a Docker runtime, note that the default network of the docker daemon is 172.17.0.0/16. Make sure that the IP addresses you select for the VMs for the admin cluster and user clusters are not in that network.

**Template**
Click to see a template for an IP block file.

```yaml
  blocks:
  - netmask: ""
    gateway: ""
    ips:
    - ip: ""
      hostname: ""
    - ip: ""
      hostname: ""
    ...
  
```

## Filling in the fields in an IP block file

## `blocks`

An array of objects, each of which describes a set of hosts.

### `blocks[i].netmask`

String. The subnet mask for the set of hosts. For example:

```
blocks:
- netmask: "255.255.252.0"
```

### `blocks[i].gateway`

String. The address of the default gateway for the set of hosts. For example:

```
blocks:
- netmask: "255.255.252.0"
  gateway: "172.16.23.254"
```

### `blocks[i].ips`

An array of objects. Each object has an individual IP address or a
[CIDR](https://tools.ietf.org/html/rfc4632) block
of IP addresses. If the object has an individual IP address, it can also have a
hostname.

For example:

```
blocks:
- netmask: "255.255.252.0"
  gateway: "172.16.23.254"
  ips:
  - ip: 172.16.20.10
    hostname: admin-host1
  - ip: 172.16.20.11
    hostname: admin-host2
  - ip: 172.16.20.12/30
```

The preceding example specifies six IP addresses: two individual addresses and
a CIDR block of four addresses.

If you set `ip` to a CIDR block, do not specify a value for `hostname`.

When you do not specify a value for `hostname`, Google Distributed Cloud uses the
VM's name from vSphere as the hostname.

## Old fields

Previous versions of Google Distributed Cloud used a `hostconfig` section in the
IP block file:

```
hostconfig:
  dns: ""
  tod: ""
  otherdns:
  - ""
  ...
  othertod:
  - ""
  ...
  searchdomainsfordns:
  - ""
  ...
```

Do not provide a `hostconfig` section in your IP block file. Instead,
fill in the `network.hostConfig` section of your
[admin cluster configuration file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.13/how-to/admin-cluster-configuration-file.md.txt#network-hostconfig-section)
or
[user cluster configuration file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.13/how-to/user-cluster-configuration-file.md.txt#network-hostconfig-section).

If you fill in the `network.hostConfig` section of a cluster configuration file,
Google Distributed Cloud ignores the `hostconfig` sections of all IP block files
associated with the cluster.

If you do not fill in the `network.hostConfig` section of a cluster
configuration file, then for backward compatibility, Google Distributed Cloud
reads the `hostconfig` sections of the IP block files associated with
the cluster.