3 minutes read

Configure the Network on a Linux Server

Edit the network configuration file on a Linux Bare Metal Cloud server after making changes to the network or IP block.
Milica Dancuk
· Updated
November 27, 2026

Complete the network configuration on a Linux server after you add it to a network or replace its public IP block in the Bare Metal Cloud (BMC) portal. The portal does not configure the operating system, o the server configuration must match the current portal settings. Both methods in this guide edit the same configuration file.

Prerequisites

Bare Metal Cloud (BMC) portal credentials and a deployed Linux server with SSH access. You will also need the VLAN ID and the assigned IPs from the Network & IP Settings tab on the Server Details page.

Add a Network to the Server

Use this method after you add the server to a network in the portal.

1. Connect to the server via SSH or the remote console in the BMC portal.

2. Open the terminal and switch to the root user:

sudo su -Code language: Bash (bash)

3. Open the network configuration file:

vi /etc/cloud/cloud.cfg.d/50-curtin-networking.cfgCode language: Bash (bash)

4. Locate the vlans section in the file and add the networking information from the portal at the bottom of the file. The name bond0.[VLAN_ID] contains the VLAN ID of the network. See the following example, which adds a public network on VLAN 16 to a server that already has a public network on VLAN 11:

# Public IPs on VLAN 11
bond0.11:
  addresses: ["[IP_ADDRESS]/29", "[IP_ADDRESS]/29"]
  id: 11
  link: bond0
  mtu: 9000
  gateway4: [GATEWAY_ADDRESS]
  nameservers:
    addresses:
    - 8.8.8.8
    - 8.8.4.4
# Public IPs on VLAN 16
bond0.16:
  addresses: ["[IP_ADDRESS]/29", "[IP_ADDRESS]/29", "[IP_ADDRESS]/29"]
  id: 16 
  link: bond0 
  mtu: 9000
  nameservers:
    addresses:
    - 8.8.8.8
    - 8.8.4.4
Code language: YAML (yaml)

Follow the same steps for IPv6 or private networks. For a dual-stack network, see the following example:

# Public IPs on VLAN 11
bond0.11:
  id: 11
  link: bond0
  mtu: 9000
  optional: false
  addresses:
     - [IPV4_ADDRESS]/29
     - [IPV6_ADDRESS]/64
  routes:
     - to: default
       via: [IPV4_ADDRESS]
     - to: default
       via: [IPV6_ADDRESS]
  nameservers:
    addresses:
      - 8.8.8.8
      - 8.8.4.4
      - 2001:4860:4860:8888
      - 2001:4860:4860:8844
Code language: YAML (yaml)

5. Save the changes and reboot the server.

Replace a Public IP Block

Follow these steps after you replace the public IP block in the portal:

1. Connect to the server using the remote console.

2. Log in with the user you created for the remote console access.

3. Switch to the root user:

sudo su -Code language: Bash (bash)

4. Open the network interface configuration file:

vi /etc/cloud/cloud.cfg.d/50-curtin-networking.cfgCode language: Bash (bash)

5. Find the type: vlan section named bond0.[VLAN_ID], where [VLAN_ID] is the VLAN ID noted in Step 3.

6. Edit the section to match the information on the Server Details page in the BMC portal.

7. Save the file and exit.

8. Reboot the server to apply the changes.

9. Ping the Google DNS to test network connectivity:

ping 8.8.8.8Code language: Bash (bash)

The output confirms the server communicates with the internet.

10. Connect to the server via SSH using one of the new IPs:

ssh [USERNAME]@[IP_ADDRESS]Code language: Bash (bash)

Replace [USERNAME] with the user created for remote console access and [IP_ADDRESS] with the newly assigned IP address.

The server connects and uses the new IP allocation.