跳转到主要内容

API - 连接到 Microsoft Azure ExpressRoute

建立与 Microsoft Azure 的直接第 2 层连接以访问 Azure 云基础设施和其他 Azure 云服务。

注意

本文档介绍从API中的端口,服务令牌或云路由器创建连接。有关从虚拟设备(包括在API中)创建连接的信息,请参阅Network Edge to Azure ExpressRoute

先决条件​

  1. 身份验证 - 提交您的 OAuth2 用户凭据、客户端 ID 和客户端密钥 验证。有关如何致电OAuth API以验证和验证您的凭据的说明,请参阅API验证。

  2. 确定A侧信息。以下任一项:

    • 向端点发送请求/fabric/v4/ports,以确定您的Equinix Fabric端口信息GET。端口UUID和链路协议类型(Dot1q或QinQ),

    或

    • 通过向端点发送请求/fabric/v4/serviceTokens来检索A端服务令牌GET。您需要令牌的UUID。A端令牌提供配置连接A端的相关信息。

    或

    • 确定您的Fabric Cloud Router信息。向端点发送请求/fabric/v4/routers/search,以检查可用的云路由器POST。您需要路由器的UUID。
  3. 识别Azure ExpressRoute服务配置文件信息。您应该选择哪种服务配置文件的详细信息,请参见Azure ExpressRoute概述页面。

    • Azure ExpressRoute -a1390b22-bbe0-4e93-ad37-85beef9d254d
    • Azure政府ExpressRoute -0de4e413-edd7-4325-912f-7c8a4428e156
  4. 识别并验证您的ExpressRoute服务密钥。向端点发送POST请求/fabric/v4/connections/validate,以验证您的ExpressRoute服务密钥是否可用于在给定都会区创建与选定服务配置文件的连接。

从 DOT1Q端口连接​

要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。

在对象中提供您的端口信息aSide,包括:

  • accessPoint.typeASCOLO
  • 将您的端口UUID提供给port.uuid
  • LinkProtocol.type ASDOT1Q
  • 将VLAN ID提供给linkProtocol.vlanTag

在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:

  • 设置accessPoint.type为SP。
  • 设置profile.type为L2_PROFILE。
  • 在中指定您要连接的Azure ExpressRoute服务配置文件profile.uuid。
  • 在中指定您要连接的Equinix都会区位置location.metroCode。
  • 设置authenticationKey为您的ExpressRoute服务密钥。
  • 设置peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。
  • (可选)设置linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。

redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。

cURL 请求示例:

curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "<your_port_uuid>"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": <vlan_id>
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "DC"
},
"linkProtocol": {
"type": "QINQ",
"vlanCTag": <vlan_id>
},
"peeringType": "<peering_type>",
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}

从 QINQ端口连接​

要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。

在对象中提供您的端口信息aSide,包括:

  • accessPoint.typeASCOLO
  • 将您的端口UUID提供给port.uuid
  • LinkProtocol.type ASQINQ
  • 向提供内部标记IDlinkProtocol.vlanCTag
  • 向提供外部标记IDlinkProtocol.vlanSTag

在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:

  • 设置accessPoint.type为SP。
  • 设置profile.type为L2_PROFILE。
  • 在中指定您要连接的Azure ExpressRoute服务配置文件profile.uuid。
  • 在中指定您要连接的Equinix都会区位置location.metroCode。
  • 设置authenticationKey为您的ExpressRoute服务密钥。
  • 设置peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。
  • (可选)设置linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。

redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。

cURL 请求示例:

curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "<port_uuid>"
},
"linkProtocol": {
"type": "QINQ",
"vlanSTag": <vlan_id>,
"vlanCTag": <vlan_id>
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

使用服务令牌进行连接​

要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。

在对象中提供服务令牌UUIDaSide。服务令牌提供建立连接所需的所有其他必要信息。

在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:

  • 设置accessPoint.type为SP。
  • 设置profile.type为L2_PROFILE。
  • 在中指定您要连接的Azure ExpressRoute服务配置文件profile.uuid。
  • 在中指定您要连接的Equinix都会区位置location.metroCode。
  • 设置authenticationKey为您的ExpressRoute服务密钥。
  • 设置peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。
  • (可选)设置linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。

redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。

cURL 请求示例:

curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
   "serviceToken": {
"uuid": "<your_aside_service_token>"
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

从Fabric Cloud Router连接​

要建立从Network Edge设备到AWS的连接,请向端点发送POST请求/fabric/v4/connections。连接type为IP_VC。

在对象中定义Fabric Cloud RouteraSide,包括:

  • 设置accessPoint.type为CLOUD_ROUTER。
  • 设置router.uuid为路由器的UUID。

在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:

  • 设置accessPoint.type为SP。
  • 设置profile.type为L2_PROFILE。
  • 在中指定您要连接的Azure ExpressRoute服务配置文件profile.uuid。
  • 在中指定您要连接的Equinix都会区位置location.metroCode。
  • 设置authenticationKey为您的ExpressRoute服务密钥。
  • 设置peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。
  • (可选)设置linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。

redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。

curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "IP_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "CLOUD_ROUTER",
"router": {
"uuid": "<router_uuid>"
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

监控连接状态​

向端点发送GET监控连接状态的请求fabric/v4/connections/{connectionId}。

Equinix 连接状态Azure 状态
**equinixStatus**属性值**providerStatus**属性值提供商状态Peerings状态描述
PROVISIONINGPROVISIONING未配置未配置连接请求尚未发送给微软。
PENDING_BGP_PEERINGPENDING_BGP已配置未配置连接已获批,等待客户在Microsoft Azure门户网站上配置Microsoft对等互连。如果您从端口连接到Azure ExpressRoute,该状态将保持不变PENDING_BGP_PEERING,直至在Microsoft Azure门户中完成对等互连,且状态仅在Equinix Fabric与Microsoft同步后才会更改为PROVISIONED。要立即同步BGP对等互连,请使用连接操作API Endpoint。如果要从Fabric Cloud Router连接到Azure ExpressRoute,还需要在Equinix Customer Portal中配置连接的路由详细信息。
PROVISIONINGPROVISIONED微软端配置已完成,Equinix 端正在配置连接。
PROVISIONEDPROVISIONED连接已建立。
这个页面对您有帮助吗?