Creates a Border Gateway Protocol (BGP) group for a specified virtual border router (VBR).
Usage notes
You can use BGP to connect a VBR to a data center. Each BGP group is associated with a VBR. You can add a BGP peer that needs to communicate with a VBR to a BGP group and advertise the BGP network in the VBR.
BGP groups are used to simplify BGP configurations. You can add BGP peers that use the same configurations to one BGP group. Before you start, you must create a BGP group with the requested autonomous system number (ASN).
When you call this operation, take note of the following limits:
- You can specify only the data center that is connected to the VBR through an Express Connect circuit as a BGP peer.
- VBRs support only BGP-4.
- You can create at most eight BGP peers for each VBR.
- Each BGP peer supports at most 110 dynamic routes.
- The ASN of Alibaba Cloud is 45104. You can specify a 2-byte or 4-byte ASN for the data center.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateBgpGroup | The operation that you want to perform. Set the value to CreateBgpGroup. |
RegionId | String | Yes | cn-shanghai | The region ID of the VBR. You can call the DescribeRegions operation to query the most recent region list. |
RouterId | String | Yes | vbr-bp1ctxy813985gkuk**** | 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 letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. |
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 and cannot start with |
LocalAsn | Long | No | 45104 | The custom ASN on the Alibaba Cloud side. Valid values:
Note 65025 is reserved by Alibaba Cloud. By default, Alibaba Cloud uses 45104 as LocalAsn. If you use a custom LocalAsn in scenarios where multiple connections are used, BGP loops may occur. Proceed with caution. |
PeerAsn | Long | Yes | 1**** | The ASN of the gateway device in the data center. |
AuthKey | String | No | !PWZ2**** | The authentication key of the BGP group. |
IsFakeAsn | Boolean | No | true | Specifies whether to use a fake ASN. Valid values:
Note In most cases, a router that runs BGP belongs to only one AS. If you want to use a different ASN to communicate with the peer but you cannot modify the BGP configuration because it may cause service downtime, you can use a fake ASN. For example, you can use a fake ASN to communicate with the peer when you migrate or merge ASs. This prevents service interruptions. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 | 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 make sure that it is unique among all requests. ClientToken can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different. |
IpVersion | String | No | IPv4 | The IP version. Valid values:
|
RouteQuota | Integer | No | 110 | The maximum number of routes supported by a BGP peer. Default value: 110. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
BgpGroupId | String | bgpg-bp1k25cyp26cllath**** | The ID of the BGP group. |
RequestId | String | C1221A1F-2ACD-4592-8F27-474E02883159 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateBgpGroup
&RegionId=cn-shanghai
&RouterId=vbr-bp1ctxy813985gkuk****
&Name=test
&Description=BGP
&LocalAsn=45104
&AuthKey=!PWZ2****
&IsFakeAsn=true
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&IpVersion=IPv4
&RouteQuota=110
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateBgpGroupResponse>
<BgpGroupId>bgpg-bp1k25cyp26cllath****</BgpGroupId>
<RequestId>C1221A1F-2ACD-4592-8F27-474E02883159</RequestId>
</CreateBgpGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"BgpGroupId" : "bgpg-bp1k25cyp26cllath****",
"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 of the 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 advertised to the VBR has reached the upper limit. |
400 | InvalidPeerIpAddress | multi pconn peer ip can not be null. | The error message returned because the IP addresses of Express Connect circuits must be specified. |
400 | InvalidVbrNetwork | vbr netowrk not exists | The error message returned because the specified VBR does not exist. Check whether the specified 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. |
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 the AS number on the Alibaba Cloud side. |
400 | InvalidParams.NotNull | params must not null. | The error message returned because the parameter is required. |
400 | InvalidBgpGroup.LocalAsnInvalid | The specified BgpGroup LocalAsn is invalid, only support 64512 to 65534 or 4200000000 to 4294967294, but cannot be 65025. | The error message returned because the local ASN of the BGP group is invalid. You must set a value from 64512 to 65534 or from 420000000 to 429496729. |
400 | InvalidParams.NotFound | instance not found | The error message returned because the specified instance does not exist. |
400 | InvalidParams.NotFound | vpc instance not found | The error message returned because the specified virtual private cloud (VPC) does not exist. Check whether the specified 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 you cannot perform the operation when the specified resource is in the current state. |
400 | InvalidParams.PeerIpAddressMustPointOut | vbr has 0 or more than 1 subif ,point out peerIpAddress. | The error message returned because you must set the PeerIpAddress parameter. |
400 | InvalidParams.PeerIpAddressInUse | peer ip address in use ,cannot create bgp peer. | The error message returned because the peer IP address is being used. Therefore, you cannot use it to create a BGP peer. |
400 | QuotaExceeded.Bgp | bgp group count per vbr quota exceed. | The error message returned because the number of BGP groups of the VBR has reached the upper limit. |
400 | IllegalParam.PeerAsn | The param of PeerAsn is illegal | The error message returned because the PeerAsn parameter is set to an invalid value. |
400 | IllegalParam.LocalAsn | The param of LocalAsn is illegal | The error message returned because the LocalAsn parameter is set to an invalid value. |
400 | OperationFailed.PconnTrafficNotEnable | The operation is failed because of PconnTrafficNotEnable. | The error message returned because billing for outbound data transfer is disabled. |
400 | OperationUnsupport | Operation is unsupport, not in vbr support custom local asn white list. | The error message returned because the operation is not supported. |
404 | InvalidRegionId.NotFound | The specified RegionId is not found. | The error message returned because the specified region ID is invalid. Check whether the service is available in the specified region. |
For a list of error codes, see Service error codes.