How can I change a remote host primary IP address without getting disconnected at all (without being in a no IP addr state). The matter is poorly discussed on Internet (according to my research). The best resource I found is a little bit tricky. EXAMPLE : change 10.0.0.11/24 to 10.0.0.15/241. ssh root@10.0.0.112. ip addr add 10.0.0.15/24 dev eth0 3. logout4. ssh root@10.0.0.155. ip addr del 10.0.0.11/24 dev eth0 Problem: The last command removes both IP addresses and the connection is lost because 10.0.0.11 is primary, and it removes its secondary addresses (to which 10.0.0.15 belongs) when deleted. I know I could cheat by adding 10.0.0.11/25 (instead of 24). However, I think it is theoretically possible to do this properly. What do you think? 
Change remote host IP address without losing control (Linux)
linux;ip;routing
You need to set the promote_secondaries option on the interface, or on all interfaces:echo 1 > /proc/sys/net/ipv4/conf/eth0/promote_secondariesorsysctl net.ipv4.conf.eth0.promote_secondaries=1Change eth0 to all to have it work on all interfaces.This option has been in since 2.6.12. I tested this with a dummy interface and it worked there.