Forwarding modes in Express Connect Router (ECR) networking
ECR supports the load balancing (ECMP) mode and the nearest-availability-zone forwarding mode, of which the load balancing (ECMP) mode is the default. For scenarios in which multiple physical connections within the same region connect to different access points, the load balancing (ECMP) mode can distribute and forward traffic, while the nearest-availability-zone forwarding mode can select the optimal path to forward traffic, achieving low-latency traffic transmission.
Load balancing (ECMP) forwarding mode (default)
In the load balancing (ECMP) mode, data packets can be simultaneously transmitted over multiple equal-cost paths, achieving load balancing (ECMP) across links. This effectively prevents congestion on any single link and improves the utilization of network resources and the stability of your services.
For more information about combining physical connections and the Express Connect Router (ECR) to enable your on-premises data center (IDC) to connect to the cloud through the ECR over redundant dedicated links, see Connect a data center to the cloud with an ECR and load-balanced circuits.
Nearest-availability-zone forwarding mode
The nearest-availability-zone forwarding mode is a routing strategy that, during the transmission of network traffic from a source address to a destination address, selects the path with the shortest distance for transmission to avoid traffic detour. This mode aims to reduce traffic transmission latency, conserve bandwidth resources, and eliminate unnecessary costs by shortening the physical transmission distance and reducing the number of cross-data-center hops. It generally includes the following aspects:
Forwarding within the same physical location: If The access point corresponding to the on-premises data center and the zone where the cloud VPC vSwitch is located are in the same physical location, data traffic is restricted to be forwarded within this zone.
Forwarding based on the location closest to the user: If the access point corresponding to the on-premises data center and the zone where the cloud VPC vSwitch is located are not in the same region, data traffic is forwarded to the geographically nearest zone.
Contact your account manager to obtain the mapping between zones and access points.
If one of the two links used for nearest-availability-zone forwarding is disconnected due to a fault, nearest-availability-zone forwarding automatically becomes invalid, and the traffic on the faulty link is fully shifted to the other links.
If a zone has no corresponding nearest access point, the traffic remains in load balancing (ECMP) mode.
If you use the Enterprise Edition TR as the cloud forwarding gateway, we recommend that you create a vSwitch instance in each zone supported by the Enterprise Edition transit router (each vSwitch instance must have at least one idle IP address) to create a VPC connection. This reduces traffic detour and achieves lower transmission latency and higher performance during traffic exchange between the VPC and the Enterprise Edition transit router. For more information, seeCreate a VPC connection.
After the specified prefix route is published, the original specific route loses its zone (AZ) attribute, and the newly published prefix route does not carry the AZ attribute. In this case, the nearest-availability-zone forwarding mode no longer takes effect for these specified prefix routes.
Scenario 1: ECR associated with multiple TRs
Procedure
Contact your account manager to obtain the data center location where cloud resources are deployed.
Contact your account manager to query the Express Connect access point corresponding to this data center location.
Complete the physical connection to the Alibaba Cloud data center at this access point. For more information, see Dedicated circuit access and Shared circuit access process.
Create a physical connection, a VBR, and configure BGP. For more information, see Apply for Classic Mode and Create and manage VBRs.
Create an Express Connect Router (ECR), and add the VBR and the corresponding VPC. For more information, see Create and manage an ECR.
Scenario 2: ECR and IP Target networking
Before using this feature, ensure that your Alibaba Cloud account has been granted the IP Target feature permission for Elastic IP. To enable it, contact your Alibaba Cloud account manager to apply.
In the scenario where the ECR and IP Target enable on-premises IDC servers to access the Internet:
When the VBR access point and the zone where the VPC vSwitch is located are in the same physical location, and an EIP exists in the path direction, traffic accesses the Internet only from within the current zone and does not cross zones. For example, the traffic path between VBR2 at access point B and EIP-1.
When the VBR access point and the zone where the VPC vSwitch is located are in the same physical location, but no EIP exists in the path direction, traffic is routed to the geographically nearest zone to access the Internet. For example, the traffic path between VBR1 at access point A and EIP-1.
When the zone where the VPC vSwitch is located has no corresponding nearest access point, traffic is forwarded in load balancing (ECMP) mode. For example, the traffic path between EIP-2 and the on-premises IDC.
Procedure
Contact your account manager to obtain the data center location where cloud resources are deployed.
Contact your account manager to query the Express Connect access point corresponding to this data center location.
Refer to the best practices in Internet access for data centers using ECR and IP Target to deploy your specific network scenario.
Change the forwarding mode
Log on to the Express Connect console.
In the left-side navigation pane, click Express Connect Router (ECR). On the Express Connect Router (ECR) page, find the ECR and click its name. The details page appears.
In the Basic Information section, click Edit next to Forwarding Mode.
In the Edit Forwarding Mode among Regions dialog box, select ECMP Load Balancing or Nearby Forwarding, then click OK.

Related documents
DescribeExpressConnectRouterInterRegionTransitMode: Query the inter-region forwarding mode of the Express Connect Router (ECR).
ModifyExpressConnectRouterInterRegionTransitMode: Modify the inter-region forwarding mode of the Express Connect Router (ECR).