For the complete documentation index, see llms.txt. This page is also available as Markdown.

Routable segments

Segments within a private network can be changed from isolated to routable. When a segment is in routable mode, it can talk to other routable segments, even if they are in different data centers.


To learn how to set up a private network, including creating segments, connecting adapters, and configuring the operating system, see Manage private networks.

Example setup

In this example, we already have two isolated segments: one in Falkenberg (lab1) with the address range 192.168.0.0/24 and one in Stockholm (lab2) with the address range 192.168.1.0/24.

Each segment has four VMs, each with a different OS (Alma Linux, Debian, Ubuntu, and Windows Server) for demonstration purposes.

Change a segment to routable in the control panel

To change a segment to routable mode, first select the private network in question, then click the three dots next to the segment and select Edit.

Select Routable and click Save.

Repeat these steps for all the segments that should be able to communicate with each other.

Add static routes in the VM's operating system

Now that the segments are routable, a gateway is added to them automatically. Continuing with the example, the setup will now look like the image below.

The next step to establish communication between the VMs in different segments is to create static routes to the other segments. In this example, we have two segments: lab1 with the IP range 192.168.0.0/24 and lab2 with the IP range 192.168.1.0/24.

In each segment, the first IP address is the gateway. For example, in the network 192.168.0.0/24, the gateway is 192.168.0.1.

In the lab1 segment, traffic going to 192.168.1.0/24 will be routed through the gateway at 192.168.0.1.

In the lab2 segment, traffic going to 192.168.0.0/24 will be routed through the gateway at 192.168.1.1.

The examples below show how to add a static route from the lab1 segment to 192.168.1.0/24 through the gateway at 192.168.0.1. To set up a static route from the lab2 segment, do the opposite (route 192.168.0.0/24 through the gateway at 192.168.1.1). You have to set up routes in both directions, or the traffic can't flow correctly. In the examples below, we assume that the network interface for the private network is ens224 in Linux and Network 2 in Windows.

Network configuration in Debian 13 at Glesys is done in the file /etc/network/interfaces.d/50-cloud-init. Leave the current configuration as it is, but add the two lines (post-up and pre-down) to the interface ens224, like the example below.

Once the static routes are added to the file, restart the network using:

Let's verify the routing table. If everything is set up correctly, there should be a line saying 192.168.1.0/24 via 192.168.0.1.

In Ubuntu, the network configuration is done in the file /etc/netplan/50-cloud-init.yaml.

At the end of the file, below the existing configuration, add the static routes to the ens224 network interface.

Apply the new configuration with sudo netplan try. The try command will automatically revert any changes unless you confirm, preventing the VM from losing its internet connectivity. Press Enter to confirm when you see the message Do you want to keep these settings?

Let's verify the routing table. If everything is set up correctly, there should be a line saying 192.168.1.0/24 via 192.168.0.1.

In AlmaLinux, network configuration is done with NetworkManager and the command nmcli.

First, you'll have to figure out the name of the connection that uses the ens224 interface card.

In this case, the connection is called Wired connection 1.

If the connection isn't already configured, start by assigning it an IP address and setting it to static mode (skip this step if the connection already has an IP address).

Create the static route to the other segment and bring up the connection:

Let's verify the routing table. If everything is set up correctly, there should be a line saying 192.168.1.0/24 via 192.168.0.1.

We assume that the network interface (Network 2) in the operating system is already configured with an IP address (in this example, 192.168.0.8 with a netmask of 255.255.255.0).

To add a static route, open the Terminal. Click on the Start menu and select Terminal, or search for Terminal if it doesn't show.

In the Terminal, execute the following command (the -p flag makes the route persistent across reboots):

Let's verify the routing table. There's a lot of output, so you might need to scroll up a bit to find the lines shown here. Look for Persistent Routes. The output in the example below has been cut to the relevant parts. If you see the network address 192.168.1.0 with a gateway address of 192.168.0.1, everything is set up correctly.

Verify the connectivity

To verify connectivity, ping a VM in the other segment (in this example, a VM in the segment named lab2).

Last updated

Was this helpful?