How to align the IP address of the new server with the old server

January 23, 2024 / How-to Guide

This guide explains how to align the IP address of the new server with the old server. Aligning the IP address of the new server with the old server is done to flawlessly transition services, applications, or configurations, guaranteeing negligible disruption and maintaining consistency within a network environment.

Follow the steps-

  1. Navigate to the file /etc/sysconfig/network-scripts/ifcfg-eth0.
  2. Modify the IPADDR and GATEWAY lines to reflect the IP address and gateway of your old server.
  3. Open the file /etc/ips using a text editor.
  4. Append your old server’s primary IP address, net mask, and gateway details to the file.
    Note- Delete the new server’s primary IP address from this file.
  5. Restart the network service using the following commands-
    1. For Amazon® Linux, execute the command-
      service network restart
      Note- Amazon Linux operates in a NAT configuration by default.
    2. For servers using Red Hat®-based operating systems, use the command-systemctl restart network
    3. For Ubuntu, utilise the command-
      systemctl status systemd-networkd
  6. Execute the command /scripts/mainipcheck to append the IP address to the file /var/cpanel/mainip.
  7. Use the command /scripts/fixetchosts to add the IP address and server hostname to the /etc/hosts file.

You should now have an understanding of aligning the IP address of the new server with that of the old server. You can also change the IP address of multiple accounts in WHM. If you face any difficulty in these processes, contact our technical team at any difficult moment.

Spread the love
Dominos Search