Use two Express Connect circuits and an Express Connect Router (ECR) to connect a data center to a VPC over active/standby circuits.
Scenario
An enterprise has an on-premises data center, a VPC, and a Transit Router (TR) in the China (Beijing) region. The enterprise uses an ECR to connect servers in the data center to cloud services over active/standby circuits. Under normal conditions, traffic flows through the active circuit. If Bidirectional Forwarding Detection (BFD) detects that the active circuit is down, traffic switches to the standby circuit.
Key steps:
-
Deploy Express Connect circuits: Deploy two Express Connect circuits that connect different CPE devices in the data center to VBRs to create an active/standby connection.
-
Create Virtual Border Routers (VBRs): Create two VBRs (VBR1 and VBR2) in the China (Beijing) region to act as a bridge between the data center and the VPC.
-
Create an Express Connect Router (ECR): Create an ECR to serve as the forwarding component between the data center and the VPC.
-
Associate VBRs and TR with the ECR: Associate VBR1, VBR2, and the TR with the ECR to establish a logical connection between the Express Connect circuits and cloud resources.
-
Configure BGP and enable BFD: Configure BGP dynamic routing between the data center and the VBRs and enable BFD to accelerate route convergence and enable automatic failover.
Prerequisites
-
You have created a Virtual Private Cloud (VPC) in the China (Beijing) region, and your business workloads are deployed on ECS instances within this VPC.
-
You have created a Transit Router (TR) in the China (Beijing) region and created a VPC connection for the TR.
-
The security group rules for the ECS instances in the VPC must allow inbound traffic from your data center. For more information, see Add a security group rule.
Procedure
Step 1: Apply for physical ports
Apply for ports in high-reliability mode, which provides strong disaster recovery capabilities. After your application is approved, the system creates two physical port instances.
Step 2: Create VBRs
-
Log on to the Express Connect console and select the China (Beijing) region.
-
On the Physical Port page, click a physical port instance ID. On the details page, click Create VBR to create VBR1.
-
In the Create VBR panel, set Account Type to Current Account, configure the key parameters, then click OK.
Key parameters: For Physical Connection Interface, select Leased Line and choose the corresponding physical connection interface instance. Set VLAN ID to
1308, VBR Bandwidth to200 Mbps, Alibaba Cloud-side IPv4 to10.10.1.3, On-premises-side IPv4 to10.10.1.2, and IPv4 Subnet Mask to255.255.255.0. -
Repeat the preceding steps to create VBR2, and then click OK.
Key parameters for VBR2: For Physical Connection Interface, select Leased Line. Set VLAN ID to
1309, VBR Bandwidth to 200 Mbps, Alibaba Cloud-side IPv4 to10.10.2.3, On-premises-side IPv4 to10.10.2.2, IPv4 Subnet Mask to255.255.255.0, and set Enable IPv6 to Disabled.
Step 3: Create and associate an ECR
-
Create an Express Connect Router (ECR)
-
In the left-side navigation pane, click Express Connect Router (ECR), and then click Create ECR.
-
In the dialog box that appears, enter
64512for ASN, keep the default values for the other parameters, select the checkbox to agree to the billing rules, then click OK.
-
-
Associate the ECR with the VBRs
-
Click the ID of the ECR instance that you created. On the VBR tab, click Add VBR.
-
In the dialog box that appears, configure the following parameters and click OK.
-
Resource Ownership: Select
Same Account. -
Region:
China (Beijing). -
Networks: Select the VBR1 instance.
-
-
Repeat the preceding steps to associate the ECR with VBR2.
-
-
Associate the ECR with the TR
-
Click the ID of the ECR instance, and then click the TR tab.
-
Click Associate TR. In the dialog box that appears, configure the following parameters, keep the default values for the other parameters, then click OK.
-
CEN ID: Select the Cloud Enterprise Network (CEN) instance that you created.
-
Region:
China (Beijing). -
Transit Router: Select the Transit Router (TR) instance that you created.
-
-
Step 4: Configure BGP and enable BFD
Configure BGP peers between your on-premises gateway devices and the VBRs. When the BGP peer status shows Established, the session can exchange routing information.
After the BGP peers are established, your data center automatically learns routes from the cloud. To allow the VBRs to learn the route to your data center, advertise its CIDR block from your on-premises gateway device.
Configure BGP routing on the VBRs
-
Log on to the Express Connect console to configure BGP routing for VBR1.
-
In the left-side navigation pane, click Virtual Border Router (VBR), find the VBR1 instance ID, and go to the details page to configure BGP routing:
-
Click Create BGP Group, configure the following parameters, and then click OK.
-
Peer ASN: Enter the ASN of the on-premises data center network, such as
6***3. -
Local ASN: Enter the ASN for the Alibaba Cloud side, which is
64512. The BGP ASN of the VBR is inherited from the ECR.
-
-
Click Create BGP Peer, configure the following parameters, select Enable BFD, and then click OK.
-
BGP Groups: Select the BGP group that you created.
-
BGP Peer IP: Enter the IP address of the BGP peer. In this example, enter the IP address of the CPE1 interface that is connected to the Express Connect circuit, which is 10.10.1.5.
-
-
-
Repeat the preceding steps to configure BGP routing for VBR2.
Configure BGP routing in the data center
BGP routes from data center to VPC
On CPE1 and CPE2, adjust the AS-Path length for the route to the 192.168.0.0/16 network to control route selection priority for traffic from the VPC to the data center.
In this example, prepend the AS-Path on CPE2 to lower the priority of the route advertised through VBR2. This makes VBR1 the active circuit and VBR2 the standby circuit for cloud-to-data-center traffic.
The configuration commands may vary based on the vendor and model of your device. This document provides only the key parameters. For specific commands, consult your device vendor.
|
Parameter |
CPE1 |
CPE2 |
|
VLAN Tag |
1308 |
1309 |
|
Network |
192.168.0.0/16 |
192.168.0.0/16 |
|
BGP ASN |
6***3 |
6***4 |
|
Interface IP |
10.10.1.5 |
10.10.2.5 |
|
AS-Path |
A |
B, A |
BGP routes from VPC to data center
On your data center's CPEs, adjust BGP attributes to prefer the route to the VPC (10.0.0.0/8) learned from VBR1. This makes VBR1 the active circuit and VBR2 the standby circuit for data-center-to-cloud traffic.
Step 5: Verification
-
Test network connectivity.
Log on to the ECS instance in the VPC instance, and run the
ping <the IP address of the client in the on-premises IDC>command to access the client in the on-premises IDC.A response confirms that the data center and the VPC are connected.
[root@China xxx 2564ek5zZ ~]$ ping 192.168.3.20 PING 192.168.3.20 (192.168.3.20) 56(84) bytes of data. 64 bytes from 192.168.3.20: icmp_seq=1 ttl=60 time=1.38 ms 64 bytes from 192.168.3.20: icmp_seq=2 ttl=60 time=1.17 ms 64 bytes from 192.168.3.20: icmp_seq=3 ttl=60 time=1.16 ms 64 bytes from 192.168.3.20: icmp_seq=4 ttl=60 time=1.15 ms 64 bytes from 192.168.3.20: icmp_seq=5 ttl=60 time=1.16 ms 64 bytes from 192.168.3.20: icmp_seq=6 ttl=60 time=1.16 ms 64 bytes from 192.168.3.20: icmp_seq=7 ttl=60 time=1.11 ms ^C --- 192.168.3.20 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6006ms rtt min/avg/max/mdev = 1.113/1.179/1.379/0.086 ms -
Run the
traceroutecommand to check if the two Express Connect circuits provide primary/standby circuit redundancy. Iftracerouteis not installed, for example, on a CentOS system, you can runsudo yum install tracerouteto install it.-
VPC-to-IDC direction
Log on to an ECS instance in the VPC and run the
traceroute <IP address of the on-premises IDC client>command. The following response message indicates that traffic from the VPC to the IDC is forwarded through the active circuit VBR1.$ traceroute 192.168.3.20 traceroute to 192.168.3.20 (192.168.3.20), 30 hops max, 60 byte packets 1 100.64.1.241 (100.64.1.241) 1.451 ms 2.301 ms 2.827 ms 2 100.64.1.241 (100.64.1.241) 2.047 ms 2.559 ms 1.790 ms 3 10.10.1.5 (10.10.1.5) 1.124 ms 1.208 ms 1.320 ms # VBR1 4 192.168.3.20 (192.168.3.20) 1.391 ms 1.283 ms 1.385 ms -
IDC-to-VPC direction
Log on to a client in the on-premises IDC and execute the
traceroute <IP address of the ECS instance in the VPC>command. The following response indicates that traffic from the IDC to the VPC is forwarded through the active circuit VBR1.[xxx@alf3tw6Z ~]$ traceroute 10.1.2.61 traceroute to 10.1.2.61 (10.1.2.61), 30 hops max, 60 byte packets 1 100.64.0.81 (100.64.0.81) 0.890 ms 1.154 ms 1.360 ms 2 100.64.0.81 (100.64.0.81) 1.618 ms 1.871 ms 2.099 ms 3 10.10.1.3 (10.10.1.3) 0.854 ms 0.976 ms 0.686 ms 4 10.1.2.61 (10.1.2.61) 1.360 ms 1.349 ms 1.338 ms
-
-
Simulate a failure on the VBR1 circuit. Use the failover test feature to simulate a disconnection of the active circuit (VBR1) and verify that traffic switches to the standby circuit.
-
Run the
traceroutecommand again to test whether the traffic is switched to the VBR2 link.-
VPC-to-IDC direction
Log in to an ECS instance in the VPC and run the
traceroute <IP address of the on-premises IDC client>command. The following response indicates that traffic from the VPC to the IDC has been switched to VBR2.Hop 3,
10.10.2.5, is VBR2.[root@lppy32564ek5zZ ~]$ traceroute 192.168.3.20 traceroute to 192.168.3.20 (192.168.3.20), 30 hops max, 60 byte packets 1 100.64.2.1 (100.64.2.1) 1.774 ms 2.834 ms 2.048 ms 2 100.64.2.1 (100.64.2.1) 1.360 ms 2.279 ms 2.585 ms 3 10.10.2.5 (10.10.2.5) 1.201 ms 1.455 ms 1.340 ms 4 192.168.3.20 (192.168.3.20) 1.342 ms 1.358 ms 1.332 ms -
IDC-to-VPC direction
Log in to a client in the local IDC and run the
traceroute <IP address of an ECS instance in the VPC>command. The following response indicates that traffic from the IDC to the VPC has been switched to VBR2.[xxx zazcq7ialf3tw6Z ~]$ traceroute 10.1.2.61 traceroute to 10.1.2.61 (10.1.2.61), 30 hops max, 60 byte packets 1 100.64.1.65 (100.64.1.65) 1.442 ms 1.360 ms 1.469 ms 2 100.64.1.65 (100.64.1.65) 2.082 ms 2.069 ms 2.056 ms 3 10.10.2.3 (10.10.2.3) 1.292 ms 1.281 ms 1.266 ms 4 10.1.2.61 (10.1.2.61) 1.411 ms 1.995 ms 1.982 ms
-
Related documents
To load-balance traffic across your circuits, see Connect a data center to the cloud over load-balanced circuits by using an ECR.