Modifying network interfaces over SSH causes immediate session disconnection. This knowledge base article shows how to maintain continuous terminal access using Out-of-Band (OOB) management (HPE iLO or SuperMicro IPMI HTML5 KVM) while you add or replace IP addresses across Ubuntu (Netplan), RHEL/CentOS (network-scripts), and Debian (interfaces).
Content overview
-
When to add or change IPs
When to add or change IPs
Your current dedicated server might have only a functional /31 subnet. As your business scales—whether isolating application traffic, assigning dedicated SSL certificates, or deploying virtual machines—you might need multiple IPs. Expanding your IP address allocation can be done via the portal's ticketing system, or via your account manager. Because our upstream router maps the new subnet to your existing customer VLAN and switch port, you can bind the new usable IPs directly to your server alongside the original /31 subnet without altering your default gateway.
To know how many IP addresses can be allocated to your dedicated server, please review our IP allocation policy. If you own a custom prefix, follow our BYOIP guide to announce it on our backbone. Since network configuration varies heavily by Linux distribution, Step 3 of this guide covers the exact syntax required for Netplan (Ubuntu), network-scripts (RHEL), and the interfaces file (Debian).
Prerequisites to add or change IPs
- Active out-of-band access to your HPE iLO or SuperMicro IPMI web management page.
- Root/sudo privileges on the target Linux system.
- The assigned IP details from your provider:
- IP Address(es) and Subnet Mask / CIDR (e.g., /24 or 255.255.255.0)
- Gateway IP Address
Step 1: Connect via iLO / IPMI HTML5 console
- Log in to your out-of-band management web panel.
- Launch the virtual console:
- HPE iLO: Navigate to Remote Console & Media → Launch HTML5 Integrated Remote Console.
- SuperMicro IPMI: Navigate to Remote Control → Console Redirection → Launch HTML5 Console.
- HPE iLO: Navigate to Remote Console & Media → Launch HTML5 Integrated Remote Console.
- Log in with your Linux root or administrative user credentials.
Step 2: Identify your active network interface
Run the following command to identify the active network interface name (e.g., eth0, eno1, or enp3s0):
| ip link show |
Take note of the interface name that currently holds your main public IP.
Step 3: Configure Network Settings
Depending on your Linux distribution, there are different approaches. You can identify your OS and version using the following command:
| cat /etc/os-release |
Option A: Netplan (Ubuntu 18.04+)
Netplan reads YAML configuration files located in /etc/netplan/.
- Open the Netplan configuration file:
| sudo nano /etc/netplan/01-netcfg.yaml |
-
Modify the file structure to add or replace IP addresses:
To Replace the Primary IP:
| network: version: 2 renderer: networkd ethernets: eno1: dhcp4: no addresses: - 192.0.2.10/24 routes: - to: default via: 192.0.2.1 nameservers: addresses: [1.1.1.1, 8.8.8.8] |
To Add Additional IPs from the same subnet (Secondary IPs):
| network: version: 2 renderer: networkd ethernets: eno1: dhcp4: no addresses: - 192.0.2.10/24 - 192.0.2.11/24 - 192.0.2.12/24 routes: - to: default via: 192.0.2.1 nameservers: addresses: [1.1.1.1, 8.8.8.8] |
- Test and apply the changes:
| sudo netplan try sudo netplan apply |
Option B: network-scripts / ifcfg (RHEL, Rocky, AlmaLinux, CentOS)
Legacy Red Hat-based systems manage interface configurations inside /etc/sysconfig/network-scripts/.
- Open your interface file (replace eno1 with your interface name):
| sudo nano /etc/sysconfig/network-scripts/ifcfg-eno1 |
- Configure network settings:
| DEVICE=eno1 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet IPADDR=192.0.2.10 PREFIX=24 GATEWAY=192.0.2.1 DNS1=1.1.1.1 DNS2=8.8.8.8 |
To Add Secondary IPs: Append numbered IPADDR and PREFIX entries below the primary configuration:
| IPADDR0=192.0.2.10 PREFIX0=24 IPADDR1=192.0.2.11 PREFIX1=24 IPADDR2=192.0.2.12 PREFIX2=24 |
- Restart the network stack:
-
- RHEL/CentOS 7: sudo systemctl restart network
- RHEL/Rocky/AlmaLinux 8/9: sudo nmcli connection reload && sudo nmcli connection up eno1
Option C: interfaces File (Debian & Legacy Ubuntu)
Debian systems typically control networking through /etc/network/interfaces.
- Edit the interfaces file:
| sudo nano /etc/network/interfaces |
- Update your interface configuration:
| auto eno1 iface eno1 inet static address 192.0.2.10 netmask 255.255.255.0 gateway 192.0.2.1 dns-nameservers 1.1.1.1 8.8.8.8 |
To Add Secondary IPs (Virtual Interfaces): Add additional alias blocks beneath the primary interface:
| auto eno1 iface eno1 inet static address 192.0.2.10 netmask 255.255.255.0 gateway 192.0.2.1 # Additional IP 1 auto eno1:1 iface eno1:1 inet static address 192.0.2.11 netmask 255.255.255.0 # Additional IP 2 auto eno1:2 iface eno1:2 inet static address 192.0.2.12 netmask 255.255.255.0 |
- Restart networking services:
| sudo systemctl restart networking |
Option D: Temporary Runtime Addition (General Linux CLI)
If you need to assign or drop an IP address immediately without editing configuration files (note: changes made this way will not persist after a reboot):
- Add an IP address temporarily:
| sudo ip addr add 192.0.2.11/24 dev eno1 |
- Remove an existing IP address temporarily:
| sudo ip addr del 192.0.2.11/24 dev eno1 |
Step 4: Verify connectivity
- Verify that all IP addresses are bound to your interface:
| ip addr show dev eno1 |
- Test external network connectivity from the server:
| ping -c 4 1.1.1.1 |
- Test inbound connectivity from a remote terminal or desktop machine:
| ping 192.0.2.10 |
Once confirmed, you can close the iLO/IPMI HTML5 Console and reconnect via standard SSH.
In case you are still unsure, or run into any issue configuring the new or additional IPs, you can always submit a ticket to our support team, who will be happy to assist you.
