> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gcore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure an additional IP address

Purchasing an additional IP address assigns it to the server, but it must still be configured in the operating system before it becomes usable.

<Steps>
  <Step title="In the Gcore Hosting control panel, open the Virtual private servers or Dedicated servers tab" />

  <Step title="Select the checkbox next to the server" />

  <Step title="View the IP addresses and note the netmask">
    Click **IP addresses** in the toolbar. Note the IP address and its netmask — these are required for the configuration.

    <Frame>
      <img src="https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/networking/additional-ip-addresses/configure-an-additional-ip-address/configure-an-additional-ip-address-image1.png?fit=max&auto=format&n=494jjlOXZiI1ohtY&q=85&s=68848603ec8066072a081163cefb01ed" alt="Virtual private servers list with the IP addresses button highlighted in the toolbar" width="1584" height="418" data-path="images/docs/hosting/virtual-servers/manage/networking/additional-ip-addresses/configure-an-additional-ip-address/configure-an-additional-ip-address-image1.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/networking/additional-ip-addresses/configure-an-additional-ip-address/configure-an-additional-ip-address-image2.png?fit=max&auto=format&n=494jjlOXZiI1ohtY&q=85&s=a3068e6b28db3b2ed5e1a1e404f77cd8" alt="Dedicated servers list with the IP addresses button highlighted in the toolbar" width="1327" height="418" data-path="images/docs/hosting/virtual-servers/manage/networking/additional-ip-addresses/configure-an-additional-ip-address/configure-an-additional-ip-address-image2.png" />
    </Frame>
  </Step>

  <Step title="Configure the IP address in the OS">
    Select the operating system and follow the steps.

    <Tabs>
      <Tab title="Debian and Ubuntu">
        Edit the network interfaces file to add the IP address.

        1. Open `/etc/network/interfaces`.
        2. Add the configuration.

        For IPv4:

        ```sh theme={null}
        auto eth0:N
        iface eth0:N inet static
            address X.X.X.X
            netmask 255.255.255.255
        ```

        For IPv6 (optional):

        ```sh theme={null}
        iface eth0:N inet6 static
            address 2001:X:X:X::X
        ```

        Replace `N` with the sequential index of the additional IP address (starting at `0` for the first), `X.X.X.X` with the IP address, and `255.255.255.255` with the actual netmask.

        3. Save the file.
        4. Restart networking: run `systemctl restart networking`.

        After restarting, run `ip addr show` to verify the new address appears on the interface.
      </Tab>

      <Tab title="CentOS">
        Create a per-interface configuration file for each additional IP address.

        1. Create the file `/etc/sysconfig/network-scripts/ifcfg-eth0:N`.
        2. Add the configuration.

        For IPv4:

        ```sh theme={null}
        DEVICE=eth0:N
        ONBOOT=yes
        BOOTPROTO=static
        IPADDR=X.X.X.X
        NETMASK=255.255.255.255
        ```

        For IPv6 (optional):

        ```sh theme={null}
        IPV6ADDR_SECONDARIES="2001:X:X:X::X/64"
        ```

        Replace `N` with the sequential index of the additional IP address (starting at `0` for the first), `X.X.X.X` with the IP address, and `255.255.255.255` with the actual netmask.

        3. Save the file.
        4. Restart networking: run `systemctl restart network`.

        After restarting, run `ip addr show` to verify the new address appears on the interface.
      </Tab>
    </Tabs>
  </Step>
</Steps>
