How to Configure an Additional IP Address

How to Configure an Additional IP Address

Applies to: AlmaLinux 8 & 9, Rocky Linux 8 & 9

For Digitalberg VPS & Dedicated Server Clients


To configure an additional IP address on your Digitalberg server, follow the steps below carefully. This guide assumes you are using NetworkManager.

Step 1: Identify Your Main Network Interface

Run the following command:

ip a

Note the name of the main network interface. This is usually something like eth0.


Step 2: Create a New Configuration File

Each additional IP requires a separate configuration file in the /etc/sysconfig/network-scripts/ directory.

Use this format for the file name:

ifcfg-NETWORK_INTERFACE:ID

For example, for the first alias on eth0, use:

ifcfg-eth0:0

Create the file using:

sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0:0

Step 3: Add the Configuration

Paste the following lines into the new file, replacing the values with your actual interface and IP:

DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=none  # Use "static" for CentOS
IPADDR=ADDITIONAL_IP
NETMASK=255.255.255.255
BROADCAST=ADDITIONAL_IP

Save and close the file.


Step 4: Restart the Network Interface

Apply the changes with:

sudo systemctl restart NetworkManager

Troubleshooting

  • If the additional IP doesn’t respond after restarting NetworkManager, try rebooting the server.
  • You can also test the configuration by setting the IP manually:
ifconfig eth0:0 ADDITIONAL_IP netmask 255.255.255.255 broadcast ADDITIONAL_IP up

Then try pinging the IP from an external device.


Still Not Working?

If you’re still facing issues:

  1. Ensure the IP is correctly routed and assigned to your server from the Digitalberg client panel.
  2. Confirm that your firewall or security rules aren’t blocking traffic to the new IP.
  3. If you’re unsure, feel free to open a support ticket via your Digitalberg dashboard and share the following:
  • Your OS name and version
  • Name of the interface used
  • The full content of the new config file

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *