# Network configuration

> Set the IPv4 settings of the EMS controller's own interfaces from the platform, without a keyboard on site. A wrong setting makes it unreachable.

Source: https://voltmasters.io/en/docs/voltmasters-platform/project-settings/ems-controller/network-configuration/

Under **Configuration → EMS controller → Network configuration**, you set the IPv4 settings of the controller's own network interfaces from the platform, without needing a keyboard and screen on site or a remote session. The same tab carries the [Network check](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/ems-controller/network-check/).

> **Warning**
>
> This is the controller's own network, not the network settings of the connected devices. A wrong configuration can make the controller unreachable, so read [Applying is verified and rolled back](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/ems-controller/network-configuration/#applying-is-verified-and-rolled-back) before you save.

![Voltmasters EMS: the network configuration of the EMS controller](https://voltmasters.io/assets/docs/network-configuration-tab.webp)

*Ethernet on a static address and in sync with the controller; USB1 out of sync, because the controller runs a static address the platform does not have stored.*

### The three interfaces

Every controller shows the same three interfaces, each in its own card:

| Interface | What it is |
| --- | --- |
| **Ethernet** | The wired network port, the normal connection to the local network and the internet. |
| **USB1** | The first USB network port, for a device cabled directly to the controller. |
| **USB2** | The second USB network port. |

The interfaces are independent: you can leave Ethernet on DHCP and give USB1 a static address, or the other way around.

> **Note**
>
> For a Fluvius connection with **Fall-Back Flex**, the Netflex RTU is cabled to a USB port and expects the controller on a fixed address. The platform fills in both USB ports itself with that address, so whichever port the installer uses works. Do not change these rows by hand; see [Fall-Back Flex](https://voltmasters.io/en/docs/dso-rtu/grid-operators/fluvius/fall-back-flex/).

### Per interface: mode, address and advanced

**Mode** is either **DHCP** or **Static**.

-   **DHCP** is the controller's default and the preferred setup. The interface gets its address, its gateway and its DNS servers from the router. There is nothing else to fill in.
-   **Static** requires an **IP address (CIDR)**: the address itself plus the prefix length in the second field, for example `192.168.0.3` with `/24`. Under **Advanced** you can add a **gateway** and up to three **DNS servers** (comma-separated).

An interface that carries the internet connection needs a gateway and DNS servers when it is static; without them the controller has an address but no route out and cannot reach the platform. An interface used only for a directly cabled device (such as the RTU on a USB port) needs neither.

### Live status and the sync badge

The card header shows what the controller itself reports. When you open the tab, the platform asks the controller for its live network state; **Refresh status** asks again.

Under the interface name, the current runtime state is shown: the addresses actually in use and the gateway actually in use, or **No connection detected** when the link is down. This is the real state of the interface, which for DHCP is the address the router handed out.

The badge on the right compares the configuration stored on the platform with the configuration the controller reports:

| Badge | Meaning |
| --- | --- |
| **In sync** | The controller runs exactly what the platform has stored. |
| **Out of sync** | The controller runs something else. Both are shown side by side: **Stored on platform** and **On controller**. |
| **State unknown** | The controller did not answer. It is probably offline; the stored configuration is shown, without a verdict. |

An interface can be out of sync because someone changed it on the controller itself, or because a change was saved but not yet picked up. The controller reapplies the stored configuration at every configuration activation, so a local change is overwritten again by itself.

### Saving

**Save network configuration** first opens a confirmation with the planned changes per interface, since this is a setting that can cut the controller off. The button stays disabled while nothing changed compared to what is stored.

An interface that the platform did not manage before is also listed as a change, even when the line reads the default DHCP. From the moment you save, the platform manages all three interfaces and the controller reapplies them, where before the save it left those interfaces alone.

After confirming, the configuration is stored and travels with the controller's next configuration activation. The controller applies it itself; the change is not instant.

### Applying is verified and rolled back

The controller does not apply a network configuration blindly. It stores the previous state first, then applies the new configuration, and then checks whether it can still reach the platform. It allows the links about fifteen seconds to come up and then probes a few times, so a failed change is confirmed within roughly a minute and a half.

-   **The platform is reachable again**: the configuration stands and is recorded as verified.
-   **The platform is not reachable**: the controller puts the previous configuration back, so it comes back online with the settings it had before, and reports the incident *The network configuration was rolled back because the controller lost connectivity*.

A rolled-back configuration is not blacklisted: it stays stored on the platform and is retried in full at the next configuration activation. So correct the configuration in the platform rather than waiting for a different outcome. The snapshot is written to disk before the first change, so even a power cut during the verification window is rolled back at the next boot.

> **Note**
>
> A link that genuinely needs longer than a minute and a half to come up (spanning tree convergence, an LTE re-attach) is rolled back too. If that is your situation, save the configuration again once the link is up.

### Who sees this

The network configuration form is for Voltmasters administrators. Installers do see the tab, but only with the [Network check](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/ems-controller/network-check/) on it.

The tab also needs controller software that supports being configured from the platform. On an older controller, the form is replaced by a notice with a button to the [controller settings](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/ems-controller/), where you can update the controller first.

For the ports and domains the controller must be able to reach, see [Internet and network](https://voltmasters.io/en/docs/getting-started/ems-controller-installation/internet-and-network/).
