Help Center/ Elastic IP/ Getting Started/ Using a Global EIP to Enable Cross-Region Communications on an IPv4 Network
Updated on 2025-07-29 GMT+08:00

Using a Global EIP to Enable Cross-Region Communications on an IPv4 Network

You can use a global EIP and an ECS to enable Internet access and cloud communications on an IPv4 network across regions.

A global EIP requires a global connection bandwidth for private network communications and a global internet bandwidth for Internet access. To enable an ECS to communicate with the Internet through a global EIP, you also need to bind a global internet gateway to the global EIP.

Figure 1 shows the IPv4 network architecture in this example. The network communication requirements are as follows:

Figure 1 IPv4 network architecture (VPC, ECS, and global EIP)
  1. The local PC (IP address: 10.1.0.7) can remotely log in to ECS-A01 across regions.
  2. ECS-A01 can access the Internet across regions.

Operation Process

Step

Description

Preparations

Before using cloud services, sign up for a HUAWEI ID and enable Huawei Cloud services.

Step 1: Create a VPC and an ECS

Create a VPC and an ECS.

  1. Create a VPC with an IPv4 CIDR block and a subnet.
    • VPC IPv4 CIDR block: 192.168.0.0/16
    • Subnet IPv4 CIDR block: 192.168.0.0/24
  2. Buy an ECS in the subnet and VPC in 1 and configure security group rules for the ECS.

Step 2: Create a Global Internet Gateway

Create a global internet gateway with Default Route set to Enable in the VPC of the ECS. The default route with the destination 0.0.0.0/0 will be automatically added to the route table of the selected VPC to direct traffic to the global internet gateway.

Step 3: Buy a Global EIP

Assign a global EIP (G-EIP1) with a global internet bandwidth.

You can add the global EIP to an existing global internet bandwidth or purchase one.

Step 4: Bind the Global EIP to an ECS and a Global Internet Gateway

Bind the global EIP to the ECS and then to a global connection bandwidth.

You can add the global EIP to an existing global connection bandwidth or purchase one.

Step 5: Test Network Connectivity

Test ECS connectivity:

  1. Log in to the ECS from the local PC.
  2. Access the Internet from the ECS.

Preparations

Before creating resources, such as global EIPs and global internet gateways, you need to sign up for a HUAWEI ID and enable Huawei Cloud services.

If you already have a HUAWEI ID, skip this part.

Step 1: Create a VPC and an ECS

  1. Create a VPC with a subnet.
    1. Go to the page for creating a VPC.
    2. On the Create VPC page, set parameters as needed.

      In this example, you need to create a VPC and a subnet.

      Figure 2 Creating a VPC
      Figure 3 Setting a subnet
      Table 1 VPC parameters

      Parameter

      Example Value

      Description

      Region

      CN-Hong Kong

      The region where the VPC is created. Select the region nearest to you to ensure the lowest possible latency. The VPC, ECS, and EIP used in this example must be in the same region.

      The region cannot be changed after the VPC is created.

      Name

      VPC-A

      The VPC name.

      This parameter can be changed after the VPC is created.

      IPv4 CIDR Block

      192.168.0.0/16

      The IPv4 CIDR block of the VPC. You are advised to select from the following CIDR blocks:
      • 10.0.0.0/8–24: The IP address ranges from 10.0.0.0 to 10.255.255.255, and the netmask ranges from 8 to 24.
      • 172.16.0.0/12–24: The IP address ranges from 172.16.0.0 to 172.31.255.255, and the netmask ranges from 12 to 24.
      • 192.168.0.0/16–24: The IP address ranges from 192.168.0.0 to 192.168.255.255, and the netmask ranges from 16 to 24.

      The IPv4 CIDR block cannot be changed after the VPC is created.

      Enterprise Project

      default

      The enterprise project by which resources are centrally managed. Select an existing enterprise project for the VPC.

      The enterprise project cannot be changed after the VPC is created.

      Advanced Settings (Optional) > Tag

      No configuration is required.

      The tag that is used to classify and identify resources. Add tags to the VPC as required.

      After the VPC is created, you can edit tags added to the VPC.

      Advanced Settings (Optional) > Description

      No configuration is required.

      Supplementary information about the VPC. Enter a description as required.

      This parameter can be changed after the VPC is created.

      Table 2 Subnet parameters

      Parameter

      Example Value

      Description

      Subnet Name

      Subnet-A01

      The subnet name.

      The name can be modified after the subnet is created.

      IPv4 CIDR Block

      192.168.0.0/24

      The IPv4 CIDR block of the subnet, which is a unique CIDR block with a range of IP addresses in the VPC.

      The CIDR block cannot be changed after the subnet is created.

      IPv6 CIDR Block (Optional)

      Disabled

      Whether to automatically assign an IPv6 CIDR block to the subnet.

      You can enable or disable this option after the subnet is created.

      Associated Route Table

      Default

      The default route table that the subnet is associated with. Each VPC comes with a default route table. Subnets in the VPC are then automatically associated with the default route table.

      The default route table has a preset system route that allows subnets in a VPC to communicate with each other.

      After the subnet is created, you can create a custom route table and associate the subnet with it.

      Advanced Settings (Optional) > Gateway

      192.168.0.1

      The gateway address of the subnet. You are advised to retain the default address.

      The gateway address cannot be changed after the subnet is created.

      Advanced Settings (Optional)
      • DNS Server Address
      • Domain Name
      • NTP Server Address
      • IPv4 DHCP Lease Time

      No configuration is required.

      The parameters that are configured for the ECS in the VPC. In this example, retain the default values or leave them blank.

      You can change the values after the subnet is created.

      Advanced Settings (Optional) > Tag

      No configuration is required.

      The tag that is used to classify and identify resources. Add tags to the subnet as required.

      After the subnet is created, you can edit the tags added to the subnet.

      Advanced Settings (Optional) > Description

      No configuration is required.

      Supplementary information about the subnet. Enter a description as required.

      This parameter can be changed after the subnet is created.

    3. Click Create Now.

      You will be redirected to the VPC list, where you can find the VPC you have created.

  2. Buy an ECS.
    1. Go to the page for buying an ECS.
    2. On the Buy ECS page, configure parameters as required.
      In this example, set the ECS name to ECS-A01 and configure other parameters as follows:
      • Network: Select VPC-A and Subnet-A01 you have created.
        Figure 4 Network settings
      • Security Group: Create security group Sg-A and add inbound and outbound rules to it. Each security group comes with system rules. You need to check and modify the rules as required to ensure that all rules in Table 3 are added.
        Figure 5 Inbound rules of Sg-A
        Figure 6 The outbound rule of Sg-A
        Table 3 Sg-A rules

        Direction

        Action

        Type

        Protocol & Port

        Source/Destination

        Description

        Inbound

        Allow

        IPv4

        TCP: 22

        Source: 10.1.0.7/32

        Allows the local PC (10.1.0.7/32) to remotely log in to the Linux ECS over SSH port 22.

        Inbound

        Allow

        IPv4

        TCP: 3389

        Source: 10.1.0.7/32

        Allows the local PC (10.1.0.7/32) to remotely log in to the Windows ECS over RDP port 3389.

        Inbound

        Allow

        IPv4

        ICMP: All

        Source: 0.0.0.0/0

        Allows ping traffic to ECSs in the VPC over all ICMP ports to test network connectivity.

        Inbound

        Allow

        IPv4

        All

        Source: current security group (Sg-A)

        Allows the ECSs in the security group to communicate with each other.

        Outbound

        Allow

        IPv4

        All

        Destination: 0.0.0.0/0

        Allows the ECSs in the security group to access the external networks.

      • EIP: Select Not required.
        Figure 7 Selecting Not required

      Configure other ECS parameters s as required. For details, see Purchasing an ECS in Custom Config Mode.

    3. Click Submit.

      Return to the ECS list to view ECS-A01 you have bought.

Step 2: Create a Global Internet Gateway

  1. Go to the Global Internet Gateways page.
  2. In the upper right corner of the page, click Create Global Internet Gateway.

    The Create Global Internet Gateway dialog box is displayed.

  3. Configure the parameters based on Table 4.
    Table 4 Parameter descriptions

    Parameter

    Example Value

    Description

    Name

    IGW-A

    Enter the name of the global internet gateway as required. The name:
    • Can contain 1 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    This parameter can be modified after a global internet gateway is created.

    Version

    Retain the default value.

    The default protocol version of a global internet gateway is IPv4.

    This parameter cannot be modified after a global internet gateway is created.

    VPC

    VPC-A

    Select the VPC of the ECS. Ensure that the VPC is in the same region as the ECS.

    This parameter cannot be modified after a global internet gateway is created.

    Subnet

    Subnet-A01

    Select a subnet in the VPC where you want to bind the global internet gateway.

    This parameter cannot be modified after a global internet gateway is created.

    Default Route

    Enable

    Select this option, so the default route with the destination 0.0.0.0/0 will be automatically added to the default route table of the selected VPC to direct traffic to the global internet gateway.

    This parameter cannot be modified after a global internet gateway is created.

  4. Click OK.

Step 3: Buy a Global EIP

  1. Go to the Assign Global EIP page.
  2. Configure the parameters based on Table 5.
    Table 5 Parameter descriptions

    Parameter

    Example Value

    Description

    Region

    CN-East

    Select a region that is close to your services for lower latency.

    This parameter cannot be modified after the global EIP is assigned.

    City

    Shanghai

    Select a city that is close to your services for lower latency.

    This parameter cannot be modified after the global EIP is assigned.

    Type

    Global EIP

    Select Global EIP or Global EIP range.

    This parameter cannot be modified after the global EIP is assigned.

    Version

    IPv4

    Select IPv4 or IPv6.

    This parameter cannot be modified after the global EIP is assigned.

    Global EIP Type

    Dynamic BGP

    Select the global EIP type.

    After you select a global EIP pool, the system will allocate a global EIP to you from the pool. Select a resource pool close to your services for lower latency.

    This parameter cannot be modified after the global EIP is assigned.

    Global Internet Bandwidth

    Assign now

    Select Assign now to purchase a new global internet bandwidth.

    Billing Mode

    Pay-per-use

    Select the billing mode for the global internet bandwidth as required.

    This parameter cannot be modified after the global EIP is assigned.

    Bandwidth Type

    Standard

    Select the type of the global internet bandwidth as required.

    This parameter cannot be modified after the global EIP is assigned.

    Billed By

    95th percentile bandwidth (standard)

    Select the billing option for the global internet bandwidth as required.

    This parameter can be modified after the global internet bandwidth is created.

    Guaranteed Bandwidth

    No configuration is required.

    The value is automatically configured based on the selected billing option.

    Bandwidth (Mbit/s)

    300

    Select the size of the global internet bandwidth as required.

    This parameter can be modified after the global internet bandwidth is created.

    Global EIP Name

    G-EIP1

    Enter the name of the global EIP as required. The name:
    • Can contain 0 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    This parameter can be modified after the global EIP is assigned.

    Enterprise Project

    default

    The enterprise project by which resources are centrally managed. Select an existing enterprise project for the global EIP.

    This parameter cannot be modified after the global EIP is assigned.

    Advanced Settings

    Retain the default settings.

    Click the drop-down arrow and configure advanced parameters for the global EIP.

    Bandwidth Name

    IBW-A

    Enter the name of the global internet bandwidth as required. The name:
    • Can contain 0 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    This parameter can be modified after the global internet bandwidth is created.

    Tag

    No configuration is required.

    Add tags to classify and identify the global EIP as required.

    This parameter can be modified after the global EIP is assigned.

    Monitoring

    No configuration is required.

    By default, the following information is monitored for free:

    • Network traffic at one-minute intervals
    • Bandwidth fluctuations and inbound and outbound bandwidth rates

    Quantity

    1

    Set it to 1.

  3. Click Next.
  4. Confirm the configuration and click Submit.

    The global EIP list is displayed.

  5. In the global EIP list, view the global EIP status.

    If the status of the global EIP is Unbound, the EIP is assigned successfully.

Step 4: Bind the Global EIP to an ECS and a Global Internet Gateway

  1. Go to the global EIP list page.
  2. In the global EIP list, search for G-EIP1 to locate it.
  3. Locate the row that contains G-EIP1 and click Bind Instance in the Progress column.

    The page for binding an instance is displayed.

  4. On the Bind Instance page, configure the parameters.
    • Instance Region: Select the region CN-Hong Kong where ECS-A01 is located.
    • Instance Type: Select ECS (IPv4) and select ECS-A01.
    • Global Internet Gateway: Select IGW-A created in Step 2: Create a Global Internet Gateway.
  5. Click Next.
  6. On the Bind Global Connection Bandwidth page, create a global connection bandwidth to be bound to the global EIP.
    Table 6 Parameter descriptions

    Parameter

    Example Value

    Description

    EIP Region

    No configuration is required.

    The region is determined by that of G-EIP1 and does not need to be configured.

    Instance Region

    No configuration is required.

    The region is determined by that of ECS-A01 and does not need to be configured.

    Bandwidth Type

    No configuration is required.

    The value is determined by the access point of the global EIP and the region where the instance is located. You do not need to set it.

    Global Connection Bandwidth

    Assign now

    Select Assign now to create a global connection bandwidth.

    Bandwidth Name

    Bandwidth-A

    Enter the name of the global connection bandwidth as required. The name:
    • Can contain 0 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    This parameter can be modified after the global connection bandwidth is created.

    Bandwidth (Mbit/s)

    300

    Select the size of the global connection bandwidth as required.

    This parameter can be modified after the global connection bandwidth is created.

  7. Click Finish.

    In the global EIP list, you can see that the global EIP has an instance bound.

Step 5: Test Network Connectivity

  1. Use the local PC to remotely log in to ECS-A01.

    Multiple methods are available for logging in to an ECS. For details, see Logging In to an ECS.

  2. Test the network connectivity between ECS-A01 and the Internet:

    ping <IPv4-public-address-or-domain-name>

    Example command:

    ping support.huaweicloud.cn

    If information similar to the following is displayed, ECS-A01 can communicate with the Internet.
    [root@ecs-a01 ~]# ping support.huaweicloud.cn
    PING hcdnw.cbg-notzj.c.cdnhwc2.com (203.193.226.103) 56(84) bytes of data.
    64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=1 ttl=51 time=2.17 ms
    64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=2 ttl=51 time=2.13 ms
    64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=3 ttl=51 time=2.10 ms
    64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=4 ttl=51 time=2.09 ms
    ...
    --- hcdnw.cbg-notzj.c.cdnhwc2.com ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3004ms
    rtt min/avg/max/mdev = 2.092/2.119/2.165/0.063 ms