首页 > 解决方案 > 如何在 AWS 中提高本地与 VPC 连接的容错能力?

问题描述

我在 AWS 研究中遇到了这个问题,并对原始答案感到困惑,感谢任何启发:

一家公司已配置和对等两个 VPC:VPC-1 和 VPC-2。VPC-1 仅包含私有子网,VPC-2 仅包含公有子网。该公司使用单个 AWS Direct Connect 连接和私有虚拟接口将其本地网络与 VPC-1 连接起来。哪两种方法可以提高与 VPC-1 连接的容错能力?选择 2 个答案

Options:
A.  Establish a hardware VPN over the internet between VPC-2 and the on-premises network.
B.  Establish a hardware VPN over the internet between VPC-1 and the on-premises network
C.  Establish a new AWS Direct Connect connection and private virtual interface in the same region as VPC-2
D.  Establish a new AWS Direct Connect connection and private virtual interface in a different AWS region than VPC-1.
E.  Establish a new AWS Direct Connect connection and private virtual interface in the same AWS region as VPC-1 

正确答案

B. Establish a hardware VPN over the internet between VPC-1 and the on-premises network
E. Establish a new AWS Direct Connect connection and private virtual interface in the same AWS region as VPC-1

我的问题是为什么我们不需要在两个 VPC 之间建立连接?如果这样做,是否有助于提供容错?由于 VPC 之间已经存在对等互连,在这种情况下,A 和 C 是否有助于本地和 VPC-1 之间的链接?

非常感谢。

标签: amazon-web-servicesamazon-vpc

解决方案


默认情况下,DX 连接和 VPC 对等互连本身不支持传递路由

让我们了解什么是传递路由。

  • OnPrem <---DX Link---> VPC-1 <---Peering---> VPC-2
  • 看起来一切都已连接,但事实并非如此,OnPrem 只能与 VPC-1 通信,因为 DX 通过私有 VIF 学习路由的方式是通过其 BGP 邻居 Amazon ASN(由 VGW 定义,特定于 VPC)及其BGP 术语中的路由域。所以 OnPrem 只知道 VPC-1。所以 OnPrem 无法与 VPC-2 对话

  • 现在从 VPC-2 开始,通过对等互连,它知道如何到达 VPC-1,但甚至不知道如何通过 VPC-1 到达 OnPrem,因为这就是 VPC 对等互连的工作方式,对等 VPC 仅交换其 VPC 的 CIDR

  • 甚至 VPN 在 AWS 端使用相同的逻辑实体 VGW(与 DX Private VIF 相同),因此假设它是在 BGP 上工作的动态 VPN,现在您可以将 VPC 和本地之间交换路由的方式与私有类似VIF。
  • 选项 D 不可行,因为要直接连接到 DX,DX 连接位置和 VPC 必须位于同一区域。

推荐阅读