当前位置:网站首页>How to realize IP invariance in the private network of basic network ECs and cloud database resource switching

How to realize IP invariance in the private network of basic network ECs and cloud database resource switching

2022-06-24 01:20:00 Small and invincible

Operation scenario :

Recently received Basic network offline notification , Tencent cloud plans to 2022 year 1 month 31 Japan Stop the creation of all basic network products , The basic network products as a whole will also be launched in 2022 year 12 month 31 Japan Official offline problem , You cannot continue to use the basic network in the future , You need to switch to the private network , After the switch, it corresponds to the intranet IP It will change , And the service side is bound to the intranet IP, How to implement intranet after switching IP Do not change the problem , Please refer to the following .

Basic network concept :

The basic network is the public network resource pool of all users on Tencent cloud , Intranet of all cloud servers IP The addresses are uniformly assigned by Tencent cloud , Unable to customize network partition 、IP Address .

matters needing attention :

  • Cloud database and other products , Because the migration process supports double IP visit , Ensure uninterrupted business .
  • ECS needs to be shut down for migration , There will be a short interruption of business , It is recommended to select business idle switching .
  • CLB Direct migration is not supported , Instances of the same configuration can be rebuilt , Gradually migrate the business traffic .

ECS operation steps :

1. Enter the corresponding resource console interface ECS console , Find the instance information to operate , Take ECS as an example .

2. Create a network that contains the underlying network IP Of VPC Network segment , If this function cannot be operated due to business reasons , You can build your own intranet DNS Service and domain name transformation , After moving to the private network , Tencent cloud can be used Private domain resolution Private DNS

2.1 Sign in Private network console Create a network that contains the underlying network IP Of VPC, The intranet of ECs IP yes 10.104.36.71 , The created network segment contains this IP that will do , For the sake of distinguishing , You can create a whole segment ,10.104.0.0/16 perhaps 10.104.36.0/24 .

2.2 Private networks are geographically oriented , ECS or other instances are in the availability zone , Therefore, we also need to create the subnet information that contains the corresponding available zone of the resource ( The ECS of the instance is located in the Fourth District of Guangzhou , Here, you need to create a subnet in zone 4 )

3. By switching private networks , Switch the ECs to the network segment just created ( The ECS switches private network functions )

3.1 Shut down the ECS first , Otherwise, the operation will require forced shutdown , Forced shutdown may cause data loss or file system corruption , At the same time, it is recommended to consider the business data security when restarting , Make snapshot backup in time

3.2 By switching private network functions , Switch the ECS network to the one just created VPC In segment

Note the following switching precautions : The main impacts are The server will restart And the Internet IP Change to switch target VPC One in IP Address

3.2 After switching, verify on the console , And log in to the server for confirmation after startup

3.3 Start the server to confirm whether the network is normal

Switch the difference interface :

Cloud database operation steps :

1. Enter the corresponding resource console interface Cloud database Mysql Console , Find the instance information to operate

2. Create a private network according to the ECS VPC Step operation , Create a network that contains the underlying network IP Of VPC Internet Information

3. The database is switched to the newly created basic network IP Of VPC Next

1. After switching ,VPC Network access takes effect immediately , Access to the original underlying network will be preserved 24 Hours , Please be there. 24 Move the instance associated with this instance to within hours VPC The Internet , To ensure access to relevant instances 2. If old IP The recycle time of the address is set to 0 Hours , The old will be recycled immediately after the network is replaced IP Address

Switch the interface successfully

原网站

版权声明
本文为[Small and invincible]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/11/20211119003509253c.html