This topic describes how to establish Border Gateway Protocol (BGP) routing between an on-premises data center and a Virtual Border Router (VBR). To do so, you only need to add BGP peers that communicate with the VBR to the corresponding BGP group, and then advertise the BGP CIDR blocks in the VBR.

Note Express Connect allows you to establish BGP routing only between a VBR and an on-premises data center. In the VBR, you must add a route entry destined for the physical connection and a route entry destined for the Virtual Private Cloud (VPC). For more information, see Add route entries.

BGP overview

BGP is a dynamic routing protocol based on TCP. It is mainly used to exchange routing and network accessibility information among Autonomous Systems (ASs). You can use BGP to connect an on-premises data center and a VBR through an internal network when you establish a physical connection. BGP can help you build a hybrid cloud in a more efficient, flexible, and reliable manner.

Before configuring BGP, you need to create a BGP group. A BGP group is used to simplify BGP configurations. Combining repeated configurations into a BGP group can make configurations easier. You only need to create a BGP group according to the Autonomous System Number (ASN) and add qualified BGP peers to the group. The added BGP peers will inherit the configurations of the BGP group. You do not need to configure the BGP peers separately.

Limits

BGP has the following limits:
  • VBR can establish BGP peers only with the peer on-premises data center. Static routing is required between the VBR and the VPC.
  • The supported BGP version is BGP4.
  • VBR supports IPv4 BGP, but does not support IPv6 BGP.
  • Up to eight BGP peers can be established with a VBR.
  • Up to 100 dynamic route entries can be added to a BGP peer.
  • The ASN of Alibaba Cloud is 45104. It supports the transmission of 2-byte or 4-byte ASNs from the customer side.

Step 1: Create a BGP group

Before configuring BGP routing, you must create a BGP group based on the requested ASN.

To create a BGP group, follow these steps:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, choose Virtual Border Routers (VBRs) > Virtual Border Routers (VBRs).
  3. Select a region, find the target VBR, and click the VBR ID.
  4. Click the BGP Groups tab, and then click Create BGP Group.
  5. Configure the BGP group according to the following information.
    configuration Description
    Name Enter a name for the BGP group to be created.
    Peer ASN Enter the AS number of the on-premises data center network.
    BGP Key Enter the Key of the BGP group.
    Description Enter a description of the BGP group.
  6. Click OK.

Step 2: Add a BGP peer

To add a BGP peer, follow these steps:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, choose Virtual Border Routers (VBRs) > Virtual Border Routers (VBRs).
  3. Select a region, find the target VBR, and click the VBR ID.
  4. Click the BGP Peers tab, and then click Create BGP Peer.BGP peer
  5. Configure the BGP peer, and click OK.
    Configuration Description
    BGP Group Select the BGP group to which you want to add the BGP peer.
    BGP Peer IP Address Enter the IP address of the BGP peer.
    BGP peer status
    A BGP peer can be in the following states:
    • Idle: Indicates that BGP is in the idle state, which is the first state that a newly added BGP peer enters. In the Idle state, BGP waits for a start event. After the start event appears, BGP initializes resources, resets the ConnectRetry timer, initiates a TCP connection, and then enters the Connect state.
    • Connect: In the Connect state, BGP initiates the first TCP connection. If the ConnectRetry timer depletes before the TCP connection is established, a new TCP connection is initiated and the BGP peer remains in the Connect state.
      • If the new TCP connection is successful, the BGP peer enters the OpenSent state.
      • If the new TCP connection fails, the BGP peer enters the Active state.
    • Active: In the Active state, BGP starts a new TCP connection. If the ConnectRetry timer depletes, the state moves to Connect.
      • If the TCP connection is successful, the BGP peer enters the OpenSent state.
      • If the TCP connection fails, the BGP peer remains in the Active state and a new TCP connection is initiated.
    • OpenSent: In this state, an Open message has been sent. BGP is awaiting for an Open message from the peer. After the OPEN message is received from the peer, BGP checks both OPEN messages for errors.
      • If an error occurs, the system sends an error message and BGP returns to the Idle state.
      • If the Open messages do not have any errors, BGP sends a Keepalive message and resets the Keepalive timer. The connection state is moved to OpenConfirm.
    • OpenConfirm: In this state, BGP waits for a Keepalive packet.
      • If BGP receives a Keepalive packet, the state changes to Established, which indicates that the BGP neighbor relationship is established.
      • If the TCP connection is interrupted, the BGP peer returns to the Idle state.
    • Established: In this state, the BGP neighbor relationship is established. BGP peers exchange routes through Update messages. The Hold Timer is reset.
    • UnEstablished: Indicates that the neighbor relationship is not established.

Step 3: Advertise the BGP CIDR block

After configuring the BGP peer, you must advertise the CIDR block of the VPC. After BGP configuration is completed, the VBR automatically learns the CIDR block of the on-premises data center.

To advertise the CIDR block of the VPC, follow these steps:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, choose Virtual Border Routers (VBRs) > Virtual Border Routers (VBRs).
  3. Select a region, find the target VBR, and click the VBR ID.
  4. Click the Advertised BGP Subnets tab, and then click Advertise BGP Subnet.
  5. Enter the CIDR block to be advertised, and click OK.

Configure BGP for the on-premises data center

After you complete the BGP configuration in Alibaba Cloud by performing the preceding steps, you must configure BGP and advertise corresponding routes on the network device at the on-premises data center. For more information about the configuration command, consult the manufacturer of the network device.