# 使用 Fabric 端口订购互联网接入 Equinix Internet Access (EIA) 使用多个一级互联网服务提供商 (ISP) 和Equinix Internet Exchange (IX) 提供混合互联网接入,以实现高可用性、可靠性和速度。 * 您的 Fabric 端口与 Equinix Internet Access 服务配置文件之间的 Fabric 连接是免费提供的。 * 当您[取消配置您的互联网接入服务实例](https://docs.equinix.com/zh-Hans/internet-access/eia-api/deprovision-eia-api.md)时,关联的 Fabric 连接也会被取消配置。 * 如果配置Internet Access服务实例时出现问题,则关联的 Fabric 连接将自动取消配置。 Equinix Internet Access with Fabric 适用于已加入 [Equinix Identity and Access Management](https://docs.equinix.com/zh-Hans/iam.md) 的组织,并且用于发送 API 请求的帐户必须具有“Equinix Fabric Manager”角色。 如果您的组织尚未加入 Equinix 身份和访问管理,您可以[订购带有专用端口的 Equinix Internet Access](https://docs.equinix.com/zh-Hans/internet-access/eia-api/order-eia-dedicated-port-api.md)。 ## 先决条件 1. 身份验证 - 提交您的 OAuth2 用户凭据、客户端 ID 和客户端密钥 身份验证。请参阅[API身份验证](https://docs.equinix.com/zh-Hans/equinix-api/api-authentication.md)以获取有关如何调用OAuth API来验证和认证您的凭据的说明。 2. 确定 A 端信息。要获取 Fabric 端口信息,请向 [`/fabric/v4/ports`](https://docs.equinix.com/zh-Hans/api-catalog/fabricv4.md#tag/Ports/operation/getPorts) 端点发送 `GET` 请求。您需要端口 UUID 和链路协议类型(DOT1Q 或 QINQ)。如果您要创建冗余连接,请同时选择一个 `PRIMARY` 端口和一个 `SECONDARY` 端口。创建连接请求需要这些信息。 3. 确定 Z 端信息。互联网接入服务配置文件类型为 `IA_PROFILE`,其 ID 为 `32d81829-0bf8-45d5-84e2-7289a553dbb6`。要确定您的服务所在都市区,请向 `/internetAccess/v2/ibxs` 端点发送 `GET` 请求,以查找互联网接入服务可用的位置。您需要此信息才能订购互联网接入服务。 ## 创建互联网连接 要创建 Internet 接入服务的连接,请向 [`/fabric/v4/connections`](https://docs.equinix.com/zh-Hans/api-catalog/fabricv4.md#tag/Connections/operation/createConnection) 端点发送 `POST` 请求。连接类型为 `IA_VC`。 请在 `aSide` 对象中提供端口信息,包括: * `accessPoint.type` 作为 `COLO` * 将端口的 UUID 提供给 `port.uuid` 如果您是从 Dot1q 端口连接的: * linkProtocol.type 为 `DOT1Q` * 向 `linkProtocol.vlanTag` 提供 VLAN ID 如果您是从 QinQ 端口连接的: * linkProtocol.type 为 `QINQ` * 将内部标签 ID 提供给 `linkProtocol.vlanCTag` * 将外部标签 ID 提供给 `linkProtocol.vlanSTag` * 如果要创建冗余连接,请发出两个请求。 一个请求应该使用你的主端口并将 `redundancy.priority` 设置为 `PRIMARY`,另一个请求应该使用你的备用端口。 将 `redundancy.priority` 设置为 `SECONDARY`,并将 `redundancy.group` 指定为第一个连接的 UUID。 在 `zSide` 对象中提供 Internet 访问服务配置文件,包括: * `accessPoint.type` as `SP`. * `profile.type` 作为 `IA_PROFILE` * `profile.uuid` 作为 `32d81829-0bf8-45d5-84e2-7289a553dbb6` * `metroCode` 是您要连接的Internet Access都会区的两位字母都会区代码。 cURL 请求示例: Primary connection example ``` curl -X POST 'https://api.equinix.com/fabric/v4/connections' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "type": "IA_VC", "name": "", "bandwidth": , "redundancy": { "priority": "PRIMARY" }, "aSide": { "accessPoint": { "type": "COLO", "port": { "uuid": "" }, "linkProtocol": { "type": "DOT1Q", "vlanTag": } } }, "zSide": { "accessPoint": { "type": "SP", "profile": { "type": "IA_PROFILE", "uuid": "32d81829-0bf8-45d5-84e2-7289a553dbb6" }, "location": { "metroCode": "" } } }, "project": { "projectId": "" }, "order": { "purchaseOrderNumber": "" }, "notifications": [ { "type": "ALL", "emails": [ "" ] } ] }' ``` Secondary connection example ``` curl -X POST 'https://api.equinix.com/fabric/v4/connections' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "type": "IA_VC", "name": "", "bandwidth": , "redundancy": { "priority": "SECONDARY", "group": "" }, "aSide": { "accessPoint": { "type": "COLO", "port": { "uuid": "" }, "linkProtocol": { "type": "DOT1Q", "vlanTag": } } }, "zSide": { "accessPoint": { "type": "SP", "profile": { "type": "IA_PROFILE", "uuid": "32d81829-0bf8-45d5-84e2-7289a553dbb6" }, "location": { "metroCode": "" } } }, "project": { "projectId": "" }, "order": { "purchaseOrderNumber": "" }, "notifications": [ { "type": "ALL", "emails": [ "" ] } ] }' ``` 重要的 响应中包含一个 `uuid`,它是您的互联网接入服务的连接 ID。您必须拥有此连接 UUID 才能订购互联网接入服务。 ## 使用提供商分配的 IP 块订购服务 要订购您的互联网接入服务,请向 [`/internetAccess/v2/services`](https://docs.equinix.com/zh-Hans/api-catalog/internetaccessv2.md#tag/EIA-Service/operation/createEquinixInternetAccessv2) 端点发送 `POST` 请求。 为了实现冗余,如果您为服务创建了两个连接,请将 `type` 设置为 `DUAL`,并将两个连接 ID 都提供给 `connections` 数组。 如果您为服务创建了单个连接,请将 `type` 设置为 `SINGLE`,并将连接 ID 提供给 `connections` 数组。 在 `routingProtocol` 对象中指定: * 您的 `routingProtocol.type` 来自 `STATIC`、`DIRECT` 或 `BGP`。 * 当您使用 Equinix 拥有的 (PA) IP 块订购服务时,请将 `ipBlock.prefixLength` 值设置为您需要的 IP 块的大小。 注意 在亚太地区订购位于我们IBX数据中心之一的EIA服务实例时,如果启用了PA IPv4地址块,请务必将`addressingPlans`和`questions`信息添加到`ipBlock`对象中。更多信息,请参阅[API参考](https://docs.equinix.com/zh-Hans/api-catalog/internetaccessv2.md#tag/EIA-Service/operation/createEquinixInternetAccessv2)。 ### 静态路由 有关静态路由的文档可以在这里找到:[../routing/static-routing.md](https://docs.equinix.com/zh-Hans/internet-access/routing/static-routing.md)。 cURL 请求示例: Single Static Service in APAC region example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "STATIC", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": , "addressingPlans": [ { "afterThreeMonths": , "immediate": , "purpose": "", "size": } ], "questions": [ { "answer": "YES", "type": "PRIVATE_SPACE_CONSIDERED" }, { "answer": "NO", "type": "REFUSED_PREVIOUSLY" }, { "answer": "NO", "type": "RETURNING_ADDRESS_SPACE" } ] } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual Static Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "STATIC", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ### 直接路由 有关直接路由的文档可以[在这里](https://docs.equinix.com/zh-Hans/internet-access/routing/direct-routing.md)。 cURL 请求示例: Single Direct Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "DIRECT", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual Direct Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "DIRECT", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ### BGP路由 在 `routingProtocol` 对象中指定您的 BGP 配置详细信息: * 在 `routingProtocol.exportPolicy` 中指定要向 Internet 通告的路由,可以是 `FULL`、`DEFAULT`、`FULL_DEFAULT` 或 `PARTIAL`。 * 在 `routingProtocol.customerAsnRange` 中提供客户 ASN 范围 BITS\_16(16 位 ASN)或 BITS\_32(32 位 ASN)。 * 如果需要,请在 `routingProtocol.bgpAuthKey` 中提供 bgpAuthKey。 有关 BGP 路由的文档可以在这里找到:[../routing/bgp-routing.md](https://docs.equinix.com/zh-Hans/internet-access/routing/bgp-routing.md)。 cURL 请求示例: Single BGP Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "My Internet Access Service", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "BGP", "customerAsnRange": "", "bgpAuthKey": "", "exportPolicy": "", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual BGP Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "BGP", "customerAsnRange": "", "bgpAuthKey": "", "exportPolicy": "", "ipv4": { "customerRoutes": [ "ipBlock": { "prefixLength": } } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ## 使用独立于提供商的 IP 块的订购服务 当您使用自己的 IP 地址块 (PI) 订购服务时,请在 `customerRoutes.prefix` 中指定它。 ### 静态路由 cURL 请求示例: Single Static Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "STATIC", "ipv4": { "customerRoutes": [ { "prefix": "" } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual Static Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "STATIC", "ipv4": { "customerRoutes": [ { "prefix": "" } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ### 直接路由 在“对等互连”对象中指定 IP 块中的哪些 IP 可用于对等互连。 对于单服务类型,请在 `equinixPeerIps` 数组中仅提供一个 IP 地址。 对于双服务类型,请在 `equinixPeerIps` 数组中提供两个 IP 地址,并在 `equinixVRRPIp` 字段中提供 VRRP IP 地址。 cURL 请求示例: Single Direct Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "DIRECT", "ipv4": { "customerRoutes": [ { "prefix": "" } ], "peerings": [ { "equinixPeerIps": [ "" ] } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ], "peerings": [ { "equinixPeerIps": [ "" ] } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual Direct Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "DIRECT", "ipv4": { "customerRoutes": [ { "prefix": "" } ], "peerings": [ { "equinixPeerIps": [ "", "" ], "equinixVRRPIp": "" } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ], "peerings": [ { "equinixPeerIps": [ "", "" ], "equinixVRRPIp": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ### BGP路由 cURL 请求示例: Single BGP Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "BGP", "customerAsnRange": "", "bgpAuthKey": "", "exportPolicy": "", "ipv4": { "customerRoutes": [ { "prefix": "" } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` Dual BGP Service example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "DUAL", "connections": [ "", "" ], "routingProtocol": { "type": "BGP", "customerAsnRange": "", "bgpAuthKey": "", "exportPolicy": "", "ipv4": { "customerRoutes": [ { "prefix": "" } ] }, "ipv6": { "customerRoutes": [ { "prefix": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ## 使用 PA 和 PI IP 块的订购服务 当您订购的服务同时包含提供商分配 (PA) 和提供商独立 (PI) IP 块时,请指定两个或多个包含相应字段的客户路由对象: * `ipBlock.prefixLength` 表示Equinix提供的 IP 块 (PA)。 * `customerRoutes.prefix` 表示使用您自己的 IP 块 (PI)。 重要的 只能通过静态路由和 BGP 路由协议请求多个IP 块。 cURL 请求示例: Provider Assigned and Provider Independent IP Blocks example ``` curl -X POST 'https://api.equinix.com/internetAccess/v2/services' \ -H 'content-type: application/json' \ -H 'authorization: Bearer ' \ -d '{ "name": "", "type": "SINGLE", "connections": [ "" ], "routingProtocol": { "type": "STATIC", "ipv4": { "customerRoutes": [ { "ipBlock": { "prefixLength": } }, { "prefix": "" } ] }, "ipv6": { "customerRoutes": [ { "ipBlock": { "prefixLength": } }, { "prefix": "" } ] } }, "order": { "purchaseOrder": { "number": "" } } }' ``` ## 监控您的请求 要查看创建连接请求的状态,请向 [`fabric/v4/connections/{connectionId}`](https://docs.equinix.com/zh-Hans/api-catalog/fabricv4.md#tag/Connections/operation/getConnectionByUuid) 端点发送 `GET` 请求。 要查看您的互联网接入服务的详细信息,请使用 [`internetAccess/v2/services/{serviceId}`](https://docs.equinix.com/zh-Hans/api-catalog/internetaccessv2.md#tag/EIA-Service/operation/getEquinixInternetAccessServiceDetails) 端点。 如果您的互联网接入服务实例配置出现问题,则关联的连接将自动取消配置。