How to quickly switch the old server IP to the new server under Linux

  
                

Some enterprise users have dual servers. Sometimes they need to switch the IP of the primary server to another server, and what should I do if the website is not disconnected? For this problem, today's Xiaobian will help you solve it. Here are the specific steps to solve.

Solution:

For example, I want to cut to the IP 192.168.110.12 192.168.110.13 on this server,

First of all I need to operate on 110.12 Down the interface; then UP out a subinterface on 110.13, and then declare a new address to the gateway

# ifconfig em1:0 192.168.110.12/24 && arping -c 2 -I em1 -s 192.168.110.12 192.168.110.1

arping is to send ARP request specified address on the specified network card

The above is the method of switching the IP of the primary server to another server and continuously running the network. If you have any problems with this problem, try this method of Xiaobian.

Copyright © Windows knowledge All Rights Reserved