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: Bind an EIP to a single server. The server exclusively uses network resources.
- Binding an EIP to Multiple Servers: An EIP is configured for a VPC. All servers in the VPC can access the Internet through the EIP and share network resources.
Binding an EIP to a Single Server
- Log in to the ModelArts management console.
- In the navigation pane on the left, choose AI Dedicated Resource Pools > Elastic Servers.
- Click the server name to go to the details page. On the displayed page, click the BMS name.
Figure 1 BMS
- 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.
- Buy an EIP.
- Log in to Huawei Cloud console.
- In the service list on the left, choose Networking > Elastic IP.
- Click Buy EIP.
- Retain the default settings and click Next.
- 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.
- Buy a public NAT gateway.
- Log in to Huawei Cloud console.
- In the service list on the left, choose Network > NAT Gateway.
- Click Buy Public NAT Gateway.
- Set VPC, Subnet, and Billing Mode. Retain the default settings for other parameters and click Next.
- 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.
- 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.
- On the Public NAT Gateways page, click the name of the created NAT gateway.
- In the SNAT Rules tab, click Add SNAT Rule.
- In the displayed dialog box, configure the SNAT rule as follows:
- Scenario: Select VPC.
- Subnet: Choose an existing subnet.
- EIP: Select a created EIP.
- Click OK.
- 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.
- In the DNAT Rules tab, click Add DNAT Rule.
- 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.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot