Updated on 2024-11-19 GMT+08:00

Configuring the Network

Configure the network so that Lite Server can communicate with the Internet. Network configuration involves the following two scenarios:

Binding an EIP to a Single Server

  1. Log in to the ModelArts management console.
  2. In the navigation pane on the left, choose AI Dedicated Resource Pools > Elastic Servers.
  3. Click the server name to go to the details page. On the displayed page, click the BMS name.

    Figure 1 BMS

  4. Click the EIPs tab and then click Bind EIP.

    The Bind EIP dialog box is displayed.

    Select the EIP to be bound and click OK.
    Figure 2 Binding an EIP

    Only one EIP can be bound to a NIC.

Binding an EIP to Multiple Servers

All servers must be deployed in the same VPC which does not have a NAT gateway or default route.

  1. Buy an EIP.

    1. Log in to Huawei Cloud console.
    2. In the service list on the left, choose Networking > Elastic IP.
    3. Click Buy EIP.
    4. Retain the default settings and click Next.
    5. Confirm the configurations and select "I have read and agree to the Elastic IP Service Statement".
      • If you set Billing Mode to Pay-per-Use, click Submit.
      • If you set Billing Mode to Yearly/Monthly, click Pay Now.

        On the payment page, confirm the order information, and click Pay.

  2. Buy a public NAT gateway.

    1. Log in to Huawei Cloud console.
    2. In the service list on the left, choose Network > NAT Gateway.
    3. Click Buy Public NAT Gateway.
    4. Set VPC, Subnet, and Billing Mode. Retain the default settings for other parameters and click Next.
    5. On the displayed page, confirm the information and click Submit.
      • If you set Billing Mode to Pay-per-Use, click Submit.
      • If you set Billing Mode to Yearly/Monthly, click Pay Now.

        On the payment page, confirm the order information, and click Pay.

      The VPC and subnet must be that of the server.

  3. Add an SNAT rule.

    SNAT translates private IP addresses into EIPs, allowing servers in a VPC to share an EIP to access the Internet securely and efficiently.

    1. On the Public NAT Gateways page, click the name of the created NAT gateway.
    2. In the SNAT Rules tab, click Add SNAT Rule.
    3. In the displayed dialog box, configure the SNAT rule as follows:
      • Scenario: Select VPC.
      • Subnet: Choose an existing subnet.
      • EIP: Select a created EIP.
    4. Click OK.

  4. Configure a DNAT rule.

    By adding a DNAT rule, the servers in a VPC can access services using SSH. For each server, a port corresponds to a DNAT rule, and one port can be mapped to only one EIP.

    1. In the DNAT Rules tab, click Add DNAT Rule.
    2. In the displayed dialog box, configure the DNAT rule as follows:
      • Scenario: Select VPC.
      • Port Type: Select Specific port.
      • Protocol: Select TCP.
      • EIP: Select a created EIP.
      • Outside Port: The recommended value ranges from 20000 to 30000. Ensure that the port number is unique.
      • Instance Type: Click Server and select a server.
      • NIC: Select a NIC.
      • Inside Port: Choose 22.
    3. Click OK.