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 need only to add BGP peers that communicate with the VBR to the corresponding BGP group, and then advertise the BGP CIDR blocks on the VBR.

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

BGP overview

BGP is a dynamic routing protocol based on Transmission Control Protocol (TCP), and is used to exchange routing information and network accessibility information among autonomous systems. You can use BGP to connect an on-premises data center to a VBR for physical connections. BGP can help you build hybrid clouds in a more efficient, flexible, and reliable manner.

Before you configure BGP, you must create a BGP group. A BGP group is used to simplify BGP configurations. You can combine repeated configurations into a BGP group to make configurations easier. You need only to create a BGP group based on the Autonomous System Number (ASN) and add qualified BGP peers to the group. The added BGP peers inherits the configurations of the BGP group. You do not need to configure the BGP peers.

Limits

BGP has the following limits:
  • BGP peers can be established only between a VBR and the peered on-premises data center of a physical connection. Static routing is still required between a VBR and a VPC.
  • Only BGP4 is supported for VBRs.
  • You can create up to eight BGP peers under each VBR.
  • You can add up to 110 dynamic route entries to each 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 you configure BGP routing, you must create a BGP group based on the requested ASN.

To create a BGP group, perform the following operations:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, click Virtual Border Routers (VBRs).
  3. Select a region and click the ID of a VBR.
  4. Click the BGP Groups tab and click Create BGP Group.
  5. Configure the BGP group.
    Parameter Description
    IPv6 Select IPv6 to enable IPv6.
    Name Enter a name for the BGP group.
    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.
    Note After you enable IPv6, only lowercase IPv6 global unique addresses (GUAs) are supported.
  6. Click OK.

Step 2: Add a BGP peer

To add a BGP peer, perform the following operations:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, click Virtual Border Routers (VBRs).
  3. Select a region and click the ID of a VBR.
  4. Click the BGP Peers tab and click Create BGP Peer.BGP peer
  5. Configure the BGP peer and click OK.
    Parameter Description
    BGP Group Select the BGP group to which you want to add the BGP peer.
    BGP Peer IP Address The IP address of the BGP peer.

    By default, the IPv4 address of the BGP peer is used. If you enable IPv6 for the BGP group, enter the IPv6 address of the BGP peer.

    BGP peer status
    A BGP peer can be in the following states:
    • Idle: This is the first state that a newly added BGP peer enters. In this 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 this 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 this 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: This state indicates that an Open message has been sent. BGP is awaiting 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 by using Update messages. The Hold Timer is reset.
    • UnEstablished: indicates that the neighbor relationship is not established.

Step 3: Advertise the BGP CIDR block

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

To advertise the CIDR block of the VPC, perform the following operations:
  1. Log on to the Express Connect console.
  2. In the left-side navigation pane, click Virtual Border Routers (VBRs).
  3. Select a region and click the ID of a VBR.
  4. Click the Advertised BGP Subnets tab and click Advertise BGP Subnet.
  5. Enter the CIDR block to be advertised, and click OK.
    Note
    • If Cloud Enterprise Network (CEN) is used to connect the VPC and the VBR, skip this step.
    • If IPv6 is enabled for the VBR, you can advertise the IPv6 CIDR block of the VPC.
    • If IPv6 is disabled for the VBR, you can advertise the IPv4 CIDR block of the VPC.

Step 4: Configure BGP for the on-premises data center

After you configure BGP in Alibaba Cloud by performing the preceding operations, 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.