Enabling IPv4/IPv6 Translation to Enable IPv6 Clients to Access IPv4 Services
Scenarios
If your Layer 4 service is running in an IPv4 network but needs to be accessed by IPv6 clients, you can use IPv4/IPv6 translation to enable IPv6 clients to access your IPv4 service, without having to deploying your service on an IPv6 network.

IPv4/IPv6 Translation is available in certain regions. You can see which regions support this option on the console. If you want to use this feature, submit a service ticket.
What Is IPv4/IPv6 Translation?
ELB supports IPv4/IPv6 translation, which works with both NAT64 and NAT46. Clients accessing either the IPv4 or IPv6 address of a load balancer can communicate with IPv4 or IPv6 backend servers.
- NAT64: converts IPv6 traffic into IPv4 traffic. After IPv4/IPv6 translation is enabled, IPv6 clients can access IPv4 servers through the load balancer.
- NAT46: converts IPv4 traffic into IPv6 traffic. After IPv4/IPv6 translation is enabled, IPv4 clients can access IPv6 servers through the load balancer.

Prerequisites
- You have purchased an ECS (ECS01). The primary network interface of the ECS uses an IPv4 address. You have deployed an application on ECS01. For details, see Deploy the Application.
- There is a TCP or UDP backend server group. This practice uses a TCP backend server group as an example, with ECS01 in it.
Procedure

Step 1: Create a Load Balancer That Can Route IPv6 Requests
- Go to the Buy Elastic Load Balancer page.
- Complete the basic configuration of the load balancer as prompted. For example, select Network load balancing (TCP/UDP/TLS) for Specifications.
Figure 3 Creating a network load balancer (Dedicated)
- Configure the network as prompted.
Select IPv6 network for Network Type. The VPC subnet must support IPv6.
Figure 4 Selecting IPv6 network - Confirm the information, click Buy Now.
Step 2: Add a TCP Listener and Enable IPv4/IPv6 Translation
- Go to the load balancer list page.
- Locate the target load balancer and click Add Listener in the Operation column.
- On the Add Listener page, set Frontend Protocol to TCP and enable IPv4/IPv6 Translation.
Figure 5 Adding a TCP listener and enabling IPv4/IPv6 translation
- Click Next: Configure Request Routing Policy and select Use existing for Backend Server Group. Select an existing backend server group and click Next: Confirm.
- Confirm the configurations and click Submit.
Step 3: Add Security Group Rules to Allow Access
IPv6 clients use IP addresses in the backend subnet of the load balancer to access ECS01. So the security group of ECS01 must have rules to allow access from the backend subnet of the load balancer. For details, see Configuring Security Group Rules for Backend Servers.
Step 4: Verify the Connectivity Between the IPv6 Client and the IPv4 Backend Server
- Run the following command on the IPv6 client to access the IPv6 address of the load balancer:
telnet -6 ${IPv6-address} ${port-number}
If information similar to the following is displayed, the client can access the IPv6 address.
Figure 6 Successful IPv6 client access to the IPv6 address of the load balancer
- Run the curl command to verify the connectivity of the web application.
curl -6 [${IPv6-address-of-the-load-balancer}]:${listening-port-of-the load-balancer} -g -v
If information similar to the following is displayed, the web application is reachable.
Figure 7 Verifying the connectivity of the web application - Run the following command to determine whether the IPv6 client can access the backend server:
ss -antp |grep ${backend-server-port}
If information similar to the following is displayed, the IPv6 client can access the backend server. This means that the load balancer translates the source IPv6 address into an IPv4 address in its backend subnet and routes the request to ECS01.
Figure 8 Successful IPv6 client access to the IPv4 backend server
Reference
After IPv4/IPv6 translation is enabled, Transfer Client IP Address does not work. If TCP listeners are used, you can obtain client IP addresses by referring to Using ProxyProtocol to Transfer Client IP Addresses.
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