In this example, the host will be moving from an IP address on one subnet (192.168.0.2 on 192.168.0.0/24) to another IP address on a differenent subnet (192.168.1.2 on 192.168.1.0/24). The gateways for each subnet end in .1.

Add the new IP address to eth0, and switch gateways.

sudo ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev eth0
sudo route add default gw 192.168.1.1
sudo route del default gw 192.168.0.1

Connections to the new IP address will now work. Existing connections will stay up, and connections to the old IP address will still work.

Update the hosts file with the new IP address.

sudo sed -i 's/192\.168\.0\.2/192.168.1.2/' /etc/hosts

Update the interfaces file.

sudo sed -i \
     -e 's/address 192\.168\.0\.2/address 192.168.1.2/' \
     -e 's/network 192\.168\.0\.0/network 192.168.1.0/' \
     -e 's/broadcast 192\.168\.0\.255/broadcast 192.168.1.255/' \
     -e 's/gateway 192\.168\.0\.1/gateway 192.168.1.1/' \
     /etc/network/interfaces

Once the old A record has expired, you can remove the old address from eth0.

sudo ip addr del 192.168.0.2/24 dev eth0