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

Transfer Client IP Address

Scenarios

Generally, load balancers use IP addresses in 100.125.0.0/16 and 100.126.0.0/16 to communicate with backend servers. If you want a load balancer to communicate with backend servers using real IP addresses of the clients, you can enable Transfer Client IP Address to pass the IP addresses of the clients to backend servers.

  • Shared load balancers: This function is available only for TCP and UDP listeners.
  • Dedicated load balancers: This function is enabled for TCP and UDP listeners by default and cannot be disabled.
  • For HTTP and HTTPS listeners, if you want to obtain the IP addresses of clients, refer to "Layer 7 Load Balancing" in How Can I Transfer the IP Address of a Client?

Constraints and Limitations

When you enable or disable the function, if the listener has backend servers associated, traffic to this listener will be interrupted for about 10 seconds. The interruption duration is twice the health check interval configured for the backend server group.

Enabling the Function

  • Xen ECSs do not support this function.
  • BMSs do not support this function.
  • After this function is enabled, traffic, such as unidirectional download or push traffic, may be interrupted when backend servers are being migrated. After backend servers are migrated, retransmit the packets to restore the traffic.
  • After this function is enabled, the associated backend servers cannot be used as clients to access the listener.
  • If a backend server has been associated with the listener and health checks are enabled, enabling this function will check the health of the backend server, and traffic to this server will be interrupted for one or two health check intervals.
  1. Perform the following steps to enable the function:
    1. Log in to the management console.
    2. In the upper left corner of the page, click and select the desired region and project.
    3. Hover on in the upper left corner to display Service List and choose Network > Elastic Load Balance.
    4. On the Load Balancers page, click the name of the load balancer.
    5. Click Listeners.
      • To add a listener, click Add Listener.
      • To modify a listener, identify the row where the target listener is located, and click Edit in Operation column.
    6. Enable Transfer Client IP Address.
  2. Configure security groups, network ACLs, OS, and software security policies so that IP addresses of the clients can access these backend servers.

    If Transfer Client IP Address is enabled, a server cannot serve as both a backend server and a client. If the client and the backend server use the same server and the Transfer Client IP Address option is enabled, the backend server will think the packet from the client is sent by itself and will not return a response packet to the load balancer. As a result, the return traffic will be interrupted.

Disabling the Function

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Hover on in the upper left corner to display Service List and choose Network > Elastic Load Balance.
  4. Locate the load balancer and click its name.
  5. Click Listeners, locate the listener, and click the name of the listener.
  6. On the Summary tab page, click Edit on the top right.
  7. Disable Transfer Client IP Address.
  8. Confirm the configuration and click Finish.
  9. Confirm the configuration and click OK.