> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/cloud-networking/best-practice/create-a-multi-cloud-connection-in-cloud-networking.md).

# 创建多云三层连接

Zenlayer 的全球骨干网提供了多个公有云连接，以便您在 AWS 云、谷歌云和腾讯云等云服务提供商之间管理数据。多云连接非常适合在不同云之间同步或迁移大量数据。

<figure><img src="/files/XkJS92mrjl9lpudbTGFj" alt=""><figcaption><p>多云连接</p></figcaption></figure>

## 背景信息 <a href="#background-information" id="background-information"></a>

* 在此演示中，我们将使用 Zenlayer 三层网络产品——三层网络。如果您需要二层网络连接，仍然可以参考本指南，因为部署过程非常相似。请根据您的实际网络拓扑选择最适合的连接类型。
* 有关详细部署步骤，请参阅 [**三层连接**](/welcome/cn/cloud-networking/get-started/create-a-layer-3-connection.md)。演示配置如下。

## 操作步骤 <a href="#procedures" id="procedures"></a>

创建多云连接的基本步骤如下。

1. 登录 [**zenConsole**](https://console.zenlayer.com/)，并在导航栏中选择 **解决方案** > **多云连接**。
2. 选择您希望互连的云访问点。

   <div align="left"><figure><img src="/files/Yacfd8oRvacuZ3ZRdET5" alt=""><figcaption><p>创建多云连接</p></figcaption></figure></div>

   \
   在这里我们假设您有：\
   \- 在香港激活的 AWS 服务\
   \- 在法兰克福激活的腾讯云服务\
   \- 在达拉斯激活的谷歌云服务
3. 点击 **前往配置**，给您的三层网络（Cloud Router）命名并配置每个访问点。\
   详细信息请参阅 [**配置公有云访问点**](#add-access-point-of-tencent-cloud)。\\

   <div align="left"><figure><img src="/files/UT0etpFzIwlzSbZQdfzf" alt=""><figcaption><p>配置云访问点</p></figcaption></figure></div>
4. 在您的公有云控制台上验证连接。\
   详细信息请参阅 [**验证公有云连接**](#configurations-on-the-aws-side-1)。

### 配置公有云访问点 <a href="#add-access-point-of-tencent-cloud" id="add-access-point-of-tencent-cloud"></a>

### 1. 配置 AWS 访问点 <a href="#add-access-point-of-aws" id="add-access-point-of-aws"></a>

假设您在香港激活了 AWS 服务：

<div align="left"><figure><img src="/files/6I07YNFZttJSsLC80Juv" alt="" width="513"><figcaption><p>配置 AWS 接入点</p></figcaption></figure></div>

1. 将连接标记为 `aws-hk` 并输入您的 AWS 账户 ID。
2. 配置 BGP 路由。
   * 本地内网 IP 地址: `10.0.0.1/24`
   * 对等内网 IP 地址: `10.0.0.2/24`
   * 本地 ASN: AWS 的 ASN，默认为 **64512**
   * 对等 ASN: **62610**
   * BGP MD5: 您可以自定义或复制 AWS 系统生成的密钥。只需确保与 AWS 上的 BGP 认证密钥同步即可。
3. 配置带宽。AWS Direct Connect 提供的带宽上限包括 50 Mbps、100 Mbps、200 Mbps、300 Mbps、400 Mbps、500 Mbps、1 Gbps、2 Gbps、5 Gbps 和 10 Gbps。您将按高于您配置的最近带宽上限计费作为云连接带宽。访问点的实际访问带宽仍然是您配置的带宽。

最终配置如下：

<figure><img src="/files/NpjKaWBDg8IsC0Rczohg" alt=""><figcaption><p>配置 AWS 接入点</p></figcaption></figure>

### 2. 配置腾讯云访问点 <a href="#add-access-point-of-tencent-cloud" id="add-access-point-of-tencent-cloud"></a>

假设您在法兰克福激活了腾讯云服务：

<div align="left"><figure><img src="/files/gyppURyfULe5WQsxsuYQ" alt="" width="509"><figcaption><p>配置腾讯云接入点</p></figcaption></figure></div>

1. 将连接标记为 `tencent-fra` 并输入您的腾讯云账户 ID。
2. 配置 BGP 路由。
   * 内网 IP 地址: `10.0.2.1/24`
   * 对端私有 IP 地址: `10.0.2.2/24`
   * 本地 ASN: 腾讯云的 ASN，默认为 **45090**
   * 对端 ASN: **62610**
   * BGP MD5: 您可以自定义或与腾讯云上的 BGP 认证密钥同步。
3. 配置带宽。腾讯云直连提供的带宽规格包括 50 Mbps、100 Mbps、200 Mbps、300 Mbps、400 Mbps、500 Mbps、1 Gbps、2 Gbps、5 Gbps、8 Gbps、10 Gbps、40 Gbps 和 100 Gbps。您将按高于您的配置的最近带宽上限计费作为云连接带宽。接入点的实际访问带宽仍为您所配置的带宽。

最终配置如下：

<figure><img src="/files/rOK4JgN4hMCerx15fhZG" alt=""><figcaption><p>腾讯云接入点的配置</p></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">注意</mark> <mark style="color:blue;">**连接提供商 ID**</mark> <mark style="color:blue;">和</mark> <mark style="color:blue;">**共享隧道 ID**</mark><mark style="color:blue;">，这些将在腾讯云上的配置中使用。</mark>
{% endhint %}

### 3. 配置谷歌云接入点 <a href="#configurations-on-the-aws-side" id="configurations-on-the-aws-side"></a>

假设您在达拉斯激活了谷歌云服务：

<div align="left"><figure><img src="/files/felclWe52Q2cgw1YGnzM" alt="" width="563"><figcaption><p>配置谷歌云接入点</p></figcaption></figure></div>

1. [提供您在谷歌云上生成的配对密钥](#generate-a-pairing-key) 并选择达拉斯的位置。
2. 将连接标记为 `gcp-dfw`。
3. 配置 BGP 路由。\
   云连接成功创建后，IP 地址将自动分配。
   * 本地 ASN: GCP 的 ASN，默认为 **16550**
   * 对端 ASN: **62610**
   * BGP MD5: 您可以自定义或复制 GCP 自动生成的密钥。只需确保与 GCP 上的 BGP 认证密钥同步。
4. 配置带宽。谷歌云直连提供的带宽上限包括 50 Mbps、100 Mbps、200 Mbps、300 Mbps、400 Mbps、500 Mbps、1 Gbps、2 Gbps、5 Gbps 和 10 Gbps。您将按高于您的配置的最近带宽上限计费作为云连接带宽。接入点的实际访问带宽仍为您所配置的带宽。

### 验证公有云连接 <a href="#configurations-on-the-aws-side" id="configurations-on-the-aws-side"></a>

### 1. 验证 AWS 连接 <a href="#configurations-on-the-aws-side" id="configurations-on-the-aws-side"></a>

1. 前往 [**AWS 控制台**](https://console.aws.amazon.com/console/home?nc2=h_ct\&src=header-signin) > [**Direct Connect**](https://us-east-1.console.aws.amazon.com/directconnect/v2/home?region=us-east-1#/connections)。点击 **虚拟私有网关** 创建一个新的虚拟私有网关并为其命名（例如命名为 **test-VGW**）。选择默认的 AWS ASN - **64512**。

   <div align="left"><figure><img src="/files/cyYcmfcJzwdv5AdKNe92" alt="" width="563"><figcaption><p>虚拟私有网关创建</p></figcaption></figure></div>
2. 点击 **直连网关** 创建一个新的网关，然后为其命名（例如命名为 **test-DC-VGW**）。输入默认的 AWS ASN - **64512**。

   <div align="left"><figure><img src="/files/mNZpC2Lo0sDv6WAtPuOk" alt="" width="563"><figcaption><p>直连网关创建</p></figcaption></figure></div>
3. 单击您创建的虚拟私有网关 - **test-VGW**，然后转到 **Your VPCs** 并创建一个名为 **test-VPC** 的 VPC。

   <div align="left"><figure><img src="/files/BhuhIiXmsIbtgNATtQhZ" alt="" width="563"><figcaption><p>VPC 创建</p></figcaption></figure></div>
4. 将 **test-VGW** 附加到 VPC - **test-VPC**。

   <figure><img src="/files/HVQf4fuIPZ1jsqkhqzcP" alt=""><figcaption><p>VPC 绑定</p></figcaption></figure>
5. 关联 直连网关 - **test-DC-VGW**。

   <figure><img src="/files/hYtEwEgXwKmGGYyzu9Qr" alt=""><figcaption></figcaption></figure>

   <div align="left"><figure><img src="/files/h7zYukVulufRgQBMnFzH" alt="" width="563"><figcaption><p>直连网关关联</p></figcaption></figure></div>
6. 转到 **Connections** 并单击 **aws-hk** 连接，确认信息，然后单击 **Accept**。

   <figure><img src="/files/rGvEGCs830hphX9QGnFm" alt=""><figcaption><p>接受连接</p></figcaption></figure>
7. 创建一个虚拟接口并命名为 **test-hk**。

   <figure><img src="/files/QOuu6aiHzJgTcOYn6eaN" alt=""><figcaption></figcaption></figure>

   <div align="left"><figure><img src="/files/ZC5WtUeTL6vlW0KH96vW" alt="" width="560"><figcaption><p>虚拟接口创建</p></figcaption></figure></div>

   * VLAN: zenConsole 上的 **VLAN ID**。在这里，它是 **5**。
   * BGP ASN: Zenlayer 的 ASN - **62610**

     <figure><img src="/files/xN5lg0bvnVXqpAuw1nKa" alt=""><figcaption></figcaption></figure>
8. 单击 **test-hk**，然后单击 **Add BGP Peering**。

   <figure><img src="/files/kPGgJyl1kT96gO7XVhaN" alt=""><figcaption></figcaption></figure>

   <div align="left"><figure><img src="/files/SASIdoFvLwqz82BePDiB" alt="" width="560"><figcaption><p>添加 BGP 互联</p></figcaption></figure></div>

   * BGP ASN: Zenlayer 的 ASN - **62610**
   * Amazon 路由器对等 IP: zenConsole 上的 **Your intranet address** - `10.0.0.1/24`
   * 您的路由器对等 IP: zenConsole 上的 **Zenlayer intranet address** - `10.0.0.2/24`
   * BGP 认证密钥: zenConsole 上的 **BGP MD5 of customer** - **123**

     <figure><img src="/files/jV6AaQwS4wPIAbfeaI5W" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">虚拟接口至少有一个对等连接，无论是 IPv4 还是 IPv6。您将无法创建新的 IPv4 对等连接，因为创建虚拟接口时会自动生成一个默认的 IPv4 对等连接。</mark> <mark style="color:blue;">**test-hk**</mark><mark style="color:blue;">。</mark>

<mark style="color:blue;">要创建您自己的 IPv4 对等连接，只需先创建一个 IPv6 对等连接，然后删除现有的 IPv4 对等连接。</mark>
{% endhint %}

#### **结果**

等待几分钟，直到您的 AWS Direct Connect 可用且 BGP 对等连接可用且激活。

<figure><img src="/files/gkTAkVaFVoRPbMrKLcFx" alt=""><figcaption><p>AWS 直连 &#x26; BGP 互联可用</p></figcaption></figure>

### 2. 验证腾讯云连接 <a href="#configurations-on-the-tencent-cloud-side" id="configurations-on-the-tencent-cloud-side"></a>

1. 前往 [**VPC console**](https://console.tencentcloud.com/vpc)，选择 VPC 的区域，然后单击 **+New** 创建一个 VPC 并为其命名（例如，**test-VPC**）。

   <div align="left"><figure><img src="/files/qqJOV5AojA6tjAMDM6lU" alt="" width="359"><figcaption><p>VPC 创建</p></figcaption></figure></div>
2. 前往 [**Direct Connect**](https://console.tencentcloud.com/dc/dc)，点击 **直连网关**，然后点击 **+新建** 以创建一个直连网关，并为其命名（例如 **test-GW**）。将 **test-GW** 关联到 VPC - **test-VPC**。

   <div align="left"><figure><img src="/files/1hpRUou0j4onkTj5fCzd" alt="" width="375"><figcaption><p>直连网关创建</p></figcaption></figure></div>
3. 前往 [**Direct Connect**](https://console.tencentcloud.com/dc/conn) > **专用隧道**，点击 **+新建** 以申请一个共享隧道，并命名为 **test-fra**。将 **test-fra** 关联到 VPC - **test-VPC** 和直连网关 - **test-GW**。
   * 连接提供商 ID：Zenlayer 是连接提供商。这里的 ID 是 **100000669731**。
   * 共享隧道 ID：用于创建共享隧道的连接实例 ID，通常以 **dc-** 开头。这里的 ID 是 **dc-povc6phh**。
   * VLAN ID：zenConsole 上的 VLAN ID。这里的 ID 是 **3**。
   * 带宽：接入带宽。这里的带宽是 **1 Mbps**。
   * 腾讯云主 IP：zenConsole 上**您的内网 IP** - - `10.0.2.1/24`。
   * 腾讯云备用 IP：当 **腾讯云主 IP** 故障且不可用时，用于确保您的业务正常运行。这里的备用 IP 是 `10.0.2.3/24`（示例）。
   * CPE 对端 IP：zenConsole 上 **Zenlayer 内网 IP** - `10.0.2.2/24`。
   * BGP ASN：Zenlayer BGP 自治系统号 - **62610**。
   * BGP 密钥：zenConsole 上**客户 BGP MD5** - **456**。

     <figure><img src="/files/WSxJE2ywWHcgxGy0qEbZ" alt=""><figcaption></figcaption></figure>

**结果**

等待几分钟，直到您的共享专用隧道连接成功并且 BGP 路由建立完成。

您可以在共享专用隧道的高级配置中检查状态 - **test-fra**。

### 3. 验证谷歌云连接

#### 生成配对密钥

1. 前往 [**谷歌云控制台**](https://console.cloud.google.com/)，在导航菜单中点击 **VPC 网络** > **VPC 网络**。

   <div align="left"><figure><img src="/files/7pUTWssHQmvOdN23JrKG" alt="" width="188"><figcaption><p>导航菜单</p></figcaption></figure></div>
2. 点击 **创建 VPC 网络**。配置 VPC（例如 **test-vpc**）信息。选择 MTU 为 `1500`。

   <div align="left"><figure><img src="/files/SgWSkGDNI7GZZ0FmSI7X" alt="" width="375"><figcaption><p>创建 VPC</p></figcaption></figure></div>
3. 配置子网（例如 **test-subnet**）信息。选择地区为 `us-south1`。参考 [**区域和可用区**](https://cloud.google.com/compute/docs/regions-zones/regions-zones?authuser=1\&hl=en&_ga=2.24046782.-52980460.1706170042) 选择最近的地区。

   <div align="left"><figure><img src="/files/hX8RDa0Etaxr9gw0krKT" alt="" width="375"><figcaption><p>创建子网</p></figcaption></figure></div>
4. 配置动态路由模式为 `Regional`。

   <div align="left"><figure><img src="/files/bnaZy6wmHk2w4KI6pWD9" alt="" width="563"><figcaption><p>配置动态路由模式</p></figcaption></figure></div>
5. 在导航菜单中前往 **网络连接性** > **云路由器**。点击 **创建云路由器**。将 **test-vpc** 关联到此云路由器 **test-vgw**，并选择地区为 `us-south1 (Dallas)`。谷歌云的默认 ASN 为 `16550`。

   <div align="left"><figure><img src="/files/JuQ9QZ2WKmpJ01hh00UR" alt="" width="375"><figcaption><p><strong>创建云路由器</strong></p></figcaption></figure></div>
6. 在导航菜单中前往 **网络连接** > **互联**。点击 **添加 VLAN 关联**。\
   1\) 选择互联类型为 **合作伙伴互联连接**，并点击 **继续**。

   <div align="left"><figure><img src="/files/O8tnCScZRVZE7P3LtznA" alt="" width="444"><figcaption><p>合作伙伴互联连接</p></figcaption></figure></div>

   2\) 点击 **我已有服务提供商** > **创建单个 VLAN（无冗余）** 并关联 **test-vpc** 和 **test-vgw**。点击 **创建** 生成配对密钥。

   <figure><img src="/files/78X1ZAGrw5YNhw3FEXCF" alt=""><figcaption><p>添加 VLAN 关联</p></figcaption></figure>

   <div align="left"><figure><img src="/files/CQiPm6djQKpmZjUmn5fw" alt=""><figcaption><p>生成配对密钥</p></figcaption></figure></div>

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">使用在谷歌云上生成的配对密钥来</mark> [<mark style="color:blue;">**创建三层网络**</mark>](#configurations-on-the-aws-side)<mark style="color:blue;">。</mark>
{% endhint %}

#### 验证云连接

1. 在 zenConsole 上创建谷歌云访问点后，返回 [**谷歌云控制台**](https://console.cloud.google.com/)，您可以在 VLAN 连接列表中看到服务状态为 **需要激活**。

   <figure><img src="/files/oFNzxCoLkv3CGD7FHsIA" alt=""><figcaption><p>互联等待激活</p></figcaption></figure>
2. 点击 **激活** 以验证连接。激活后，选择您激活的 VLAN 连接以查看其详细页面。

   <div align="left"><figure><img src="/files/G1nBoEtddZxnngiIVF7p" alt="" width="375"><figcaption><p>配置 BGP</p></figcaption></figure></div>
3. 点击 **配置 BGP**。
4. 在 **对等方 ASN** 字段中，添加 Zenlayer 的 ASN：`62610`。
5. 点击 **保存并继续**。

完成所有配置后，状态将变为 **正常运行**。

<div align="left"><figure><img src="/files/ZHlqQ8KqieDoDTkCgeNM" alt=""><figcaption><p>已激活的云连接</p></figcaption></figure></div>

### 结果

现在您的 AWS 云、腾讯云和谷歌云通过 Zenlayer 三层网络连接，您可以轻松安全地在这三者之间传输数据。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/cloud-networking/best-practice/create-a-multi-cloud-connection-in-cloud-networking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
