Creates a Border Gateway Protocol (BGP) group for a virtual border router (VBR).

BGP groups allow VBRs to communicate with data centers. Each BGP group is associated with a VBR. You can add a BGP peer that needs to communicate with a VBR to the corresponding BGP group and advertise the BGP network in the VBR.

BGP groups are used to simplify BGP configurations. You can save time and effort by adding BGP peers that use the same configurations to one BGP group. You must use an autonomous system (AS) number to create a BGP group.

When you call this operation, take note of the following limits:

  • Only BGP4 is supported by the BGP groups.
  • BGP groups support IPv4 BGP. IPv6 BGP is not supported.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateBgpGroup

The operation that you want to perform.

Set the value to CreateBgpGroup.

PeerAsn Long Yes 1111

The AS number of the BGP peer.

RegionId String Yes cn-shanghai

The ID of the region where the BGP group is deployed.

You can call the DescribeRegions operation to query region IDs.

RouterId String Yes vrt-bp1lhl0taikrtee******

The ID of the VBR.

Name String No test

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description String No BGP

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

LocalAsn Long No 443

The AS number on the Alibaba Cloud side.

AuthKey String No ! PWZ2wsq

The authentication key of the BGP group.

IsFakeAsn Boolean No true

A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

ClientToken String No 02fb3da4-130e-11e9-8e44-0016e04115b

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Response parameters

Parameter Type Example Description
BgpGroupId String bgpg-2zendnzngq9lkjkhvlrsr

The ID of the BGP group.

RequestId String C1221A1F-2ACD-4592-8F27-474E02883159

The ID of the request.

Examples

Sample requests

https://vpc.aliyuncs.com/?Action=CreateBgpGroup
&PeerAsn=1111
&RegionId=cn-shanghai
&RouterId=vrt-bp1lhl0taikrteen80oxx
&<Common request parameters>

Sample success responses

XML format

<CreateBgpGroupResponse>
      <BgpGroupId>bgpg-2zendnzngq9lkjkhvlrsr</BgpGroupId>
      <RequestId>C1221A1F-2ACD-4592-8F27-474E02883159</RequestId>
</CreateBgpGroupResponse>

JSON format

{
  "BgpGroupId": "bgpg-2zendnzngq9lkjkhvlrsr",
  "RequestId": "C1221A1F-2ACD-4592-8F27-474E02883159"
}

Error codes

HttpCode Error code Error message Description
400 QuotaExceeded.Bgp bgp peer count per vbr quota exceed. The error message returned because the number of BGP groups in the virtual border router (VBR) has reached the upper limit.
400 QuotaExceeded.Nqa nqa count per vbr quota exceed. The error message returned because the Network Quality Analyzer (NQA) number has reached the upper limit.
400 QuotaExceeded.BgpNetwork bgp network count per vbr quota exceed. The error message returned because the number of BGP networks in the VBR has reached the upper limit.
400 InvalidPeerIpAddress multi pconn peer ip can not be null. The IP addresses of multiple physical connections cannot be empty.
400 InvalidVbrNetwork vbr netowrk not exists The error message returned because the specified VBR does not exist. Check whether the specified VBR ID is valid.
400 InvalidBgpGroup bgp group not exists The error message returned because the BGP group does not exist.
400 InvalidBgpName.Malformed Specified Bgp Group name is not valid. The error message returned because the name of the BGP group is invalid.
400 InvalidBgpDescription.Malformed Specified Bgp Group description is not valid. The error message returned because the description of the BGP group is invalid.
400 InvalidBgpAuthkey.Malformed Specified Bgp Group authkey is not valid. The error message returned because the authentication key of the BGP group is invalid.
404 InvalidRegionId.NotFound The specified RegionId is not found. The error message returned because the specified region ID does not exist. Check whether the region ID is valid.
400 InvalidIP.Malformed Ip malformed. The error message returned because the format of the IP address is invalid.
400 InvalidPeerAsn.Malformed invalid peer asn cannot equals aliyun asn:45104 The error message returned because the AS number cannot be the same as that of Alibaba Cloud.
400 InvalidParams.NotFound instance not found The error message returned because the instance does not exist.
400 InvalidParams.NotFound vpc instance not found The error message returned because the specified VPC does not exist. Check whether the specified VPC ID is valid.
400 InvalidParams.AlreadyExists bgp network already exists The error message returned because the BGP network already exists.
400 InvalidStatus.CannotOperate invalid status cannot operate The error message returned because the state is invalid and the operation cannot be performed.
400 QuotaExceeded.Bgp bgp group count per vbr quota exceed. The error message returned because the number of BGP groups in the VBR has reached the upper limit.

For a list of error codes, visit the API Error Center.