Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Server Migration Service/ Best Practices/ Network Configurations for Different Migration Scenarios

Network Configurations for Different Migration Scenarios

Updated on 2024-12-16 GMT+08:00

Background

For a server migration, there are two important aspects to consider: data flow directions and network requirements. A migration using SMS involves two types of traffic: control flow and data flow.

  • Control flow refers to the communications between the source server and cloud service management planes. To ensure a smooth migration, verify if there are any restrictions on the outbound traffic from the source server. Additionally, confirm that the source server can access the following cloud services via their domain names: SMS, IAM, ECS, EVS, VPC, and IMS.
  • Data flow refers to data transmission from the source server to the target server. To ensure smooth data transmission, confirm that the security group of the target server allows traffic from the source server's IP address over the specified migration ports. If the source server cannot directly access the Internet or cannot communicate with the target server, a proxy server must be configured. The proxy server must meet the following requirements:
    • The proxy server can correctly forward traffic from the source server.
    • The proxy server's security group is configured to allow traffic from the source server's IP address over the proxy port.

For a Scenario Where the Source Server Has Internet Access and Can Communicate with the Target Server over the Internet

  1. Download and start the SMS-Agent on the source server.
  2. Configure the target server. Remember to set Network Type to Public.

    Ensure that the security group of the target server allows access from the source server's public IP address over the specified migration ports. For details about how to configure security group rules, see How Do I Configure Security Group Rules for Target Servers?

For a Scenario Where the Source Server Has Internet Access and Can Communicate with the Target Server over an Intranet

  1. Confirm the source and target servers can communicate with each other over the intranet.
  2. Download and start the SMS-Agent on the source server.
  3. Configure the target server. Set Network Type to Private during the configuration.

    Ensure that the security group of the target server allows access from the source server's private IP address over the specified migration ports. For details about how to configure security group rules, see How Do I Configure Security Group Rules for Target Servers?

For a Scenario Where the Source Server Has No Internet Access and Can Communicate with the Target Server over an Intranet

  1. Prepare a proxy server that can access the Internet and can communicate with the source server over an intranet. Configure the security group of the proxy server to allow access from the source server's private IP address over the proxy port.
  2. Install proxy software on the proxy server. Squid is recommended for Linux, and WProxy is recommended for Windows.
  3. Download and install the SMS-Agent on the source server, modify the proxy settings in the SMS-Agent configuration file, and start the SMS-Agent. For details, see How Do I Configure a Source Server to Access Huawei Cloud Through a Proxy?
  4. Configure the target server. Set Network Type to Private during the configuration.

    Ensure that the security group of the target server allows access from the source server's private IP address over the specified migration ports. For details about how to configure security group rules, see How Do I Configure Security Group Rules for Target Servers?

For a Scenario Where the Source Server Has No Internet Access and Cannot Communicate with the Target Server

Prepare proxy servers for forwarding control traffic and data traffic. The proxy servers must be able to communicate with the source server and the target server on Huawei Cloud.

  1. Configure a proxy server to forward control traffic to cloud services. For details, see step 1 in How Do I Configure a Source Server to Access Huawei Cloud Through a Proxy?
  2. Create at least one Nginx proxy server to forward data traffic based on the number of servers and the volume of data to be migrated. Run the following command to install the tool:
    yum install nginx -y 
  3. Configure Nginx to forward data traffic. The following uses CentOS 8 as an example:
    1. Open the /etc/ssh/sshd_config file, find the line containing Port 22, delete the default comment tag (#), and add a line containing Port 2222 below the line.

    2. Run the following command to restart the SSH service to apply the configuration:
      systemctl restart sshd.service
    3. Run the following command to add a firewall rule:
      iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT
    4. Open the /etc/ssh/sshd_config file, find the line containing Port 22, add # to the line to restore the comment, and run the following command to restart the sshd service:
      systemctl restart sshd.service
    5. Modify the /etc/nginx/nginx.conf configuration file.
      • For a Linux file-level migration, add the following content to the end of the file. The content must be at the same identification level as http{} in the file. If multiple servers need to be migrated, add multiple mappings. default backend1 is mandatory because it is for the proxy server mapping.
        stream {
            map $remote_addr $backend {
               default backend1;
               <IP-address of-source-server-1>  backend2;
               <IP-address of-source-server-2>  backend3;
            }
         
           server {
               listen 22;
               proxy_pass $backend;
           }
         
            upstream backend1 {  server <IP-address-of-proxy-server>:22; }
            upstream backend2 {  server <IP-address-of-target-server-1>:22; }
            upstream backend3 {  server <IP-address-of-target-server-2>:22; }
        }
      • For a Windows migration, add the following content to the end of the file. The content must be at the same identification level as http{} in the file. If multiple servers need to be migrated, add multiple multiple upstream backend_<x>_<xx> entries and mappings. The following is a configuration example:
        stream {
            # Server 1
            upstream backend_1_22 {
                server <IP-address-of-target-server-1>:22;
            }
        
            upstream backend_1_8899 {
                server <IP-address-of-target-server-1>:8899;
            }
        
            upstream backend_1_8900 {
                server <IP-address-of-target-server-1>:8900;
            }
        
            # Server 2
            upstream backend_2_22 {
                server <IP-address-of-target-server-2>:22;
            }
        
            upstream backend_2_8899 {
                server <IP-address-of-target-server-2>:8899;
            }
        
            upstream backend_2_8900 {
                server <IP-address-of-target-server-2>:8900;
            }
        
            map $remote_addr $backend_22 {
                <IP-address-of-source-server-1>  "backend_1_22";
                <IP-address-of-source-server-2>  "backend_2_22";
                default X:22;
            }
        
            map $remote_addr $backend_8899 {
                <IP-address-of-source-server-1>  "backend_1_8899";
                <IP-address-of-source-server-2>  "backend_2_8899";
                default X:8899;
            }
        
            map $remote_addr $backend_8900 {
                <IP-address-of-source-server-1>  "backend_1_8900";
                <IP-address-of-source-server-2>  "backend_2_8900";
                default X:8900;
            }
        
            server {
                listen 22;
                proxy_pass $backend_22;
            }
        
            server {
                listen 8899;
                proxy_pass $backend_8899;
            }
        
            server {
                listen 8900;
                proxy_pass $backend_8900;
            }
        }
    6. Run the following command to check whether the Nginx configuration is correct:
      nginx -t

      If the message "successful" is displayed, the configuration is successful.

    7. After verifying that the configuration is correct, start the Nginx service.
      nginx
    8. Run the following command to check whether Nginx is listening on the specified port:
      netstat -ntpl
  4. Download and install the SMS-Agent on the source server, modify the proxy settings in the SMS-Agent configuration file, and start the SMS-Agent. For details, see step 2 in How Do I Configure a Source Server to Access Huawei Cloud Through a Proxy?
  5. Configure the target server. Set Transit IP Address to the private IP address of the proxy server during the configuration.
    CAUTION:

    Ensure that the proxy server is configured to allow inbound traffic from the source server's IP address, and the target server is configured to allow inbound traffic to the proxy server.

    Figure 1 Setting a transit IP address

For a Scenario Where MgC Is Used to Batch Migrate Servers

Internet access is required for migration using MgC.

  1. Install Edge in the intranet environment. Edge must be able to access the source servers to be migrated. For details, see Installing Edge for Windows.
  2. Complete steps 2 to 5 described in Migrating On-premises Servers to Huawei Cloud Using MgC.
    CAUTION:

    Ensure that the security group of the target server allows access from the source servers over the specified migration ports. For details about how to configure security group rules, see How Do I Configure Security Group Rules for Target Servers?

  3. Create a server migration workflow.
    • If the source servers can access the Internet, set the migration network to Public.
      Figure 2 Migration over the Internet
    • If the source servers cannot access the Internet, prepare a proxy server that can access the Internet and install proxy software. For details, see step 1 in How Do I Configure a Source Server to Access Huawei Cloud Through a Proxy? The network requirements for the proxy server are as follows:
      • Regardless whether the proxy server is on the source intranet environment or on the cloud, it must be able to access the source servers to be migrated over an intranet.
      • The proxy server must be configured to allow inbound traffic from the source servers over the proxy port.
      After the proxy server is configured, set the migration network to Private, and enter the private IP address of the proxy server and the port specified for the proxy software.
      Figure 3 Migration over a private network

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback