How to Order Additional IP Addresses for a Dedicated Server

Author:Nils Krämer
Updated:Aug 6, 2025

To add a new IP address to your Ubuntu server, follow these steps:

  1. Identify Your Network Interface:

    • Determine if your main network interface is eth0 or eth1 by running:
      grep eth1 /etc/netplan/* -H
      
    • Replace eth1 with eth0 if necessary and note the result.
  2. Edit the Netplan Configuration File:

    • Once you know your interface (e.g., eth0), open the corresponding netplan file using a text editor:
      sudo nano /etc/netplan/50-netplan.conf
      
    • Locate or create the section for your interface, typically under [eth0].
  3. Add Your IP Address:

    • Copy the provided IP address in the format AA.BB.CC.DD/XX (e.g., 192.168.1.1/24) and include it under the appropriate configuration:

      network: eth0: set physical set address XX.XX.XX.XX/YY

  4. Apply Changes:

    • Apply the updated configuration with:
      sudo netplan apply
      
    • Open a new terminal and test the IP by pinging it:
      ping 192.168.1.1
      
  5. Troubleshooting:

    • If the ping fails, wait up to 30 seconds for netplan to revert changes if necessary.
    • Ensure correct syntax and permissions in the netplan file.