View a markdown version of this page

在 AWS Transit Gateway 中建立靜態路由 - Amazon VPC

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在 AWS Transit Gateway 中建立靜態路由

為 VPC、VPN 或傳輸閘道對等連接建立靜態路由,或者您可以建立黑洞路由,以捨棄符合路由的流量。

Site-to-Site VPN 不會篩選傳輸閘道路由表中以 VPN 連接為目標的靜態路由。使用以 BGP 為基礎的 VPN 時,這可能會允許未預期的傳出流量。

使用主控台建立靜態路由
  1. 在 https://console.aws.amazon.com/vpc/ 開啟 Amazon VPC 主控台。

  2. 在導覽窗格中,選擇 Transit Gateway Route Tables (傳輸閘道路由表)。

  3. 選取要為其建立路由的路由表。

  4. 選擇 Actions (動作)、Create static route (建立靜態路由)。

  5. 在 Create static route (建立靜態路由) 頁面上,輸入要建立路由的 CIDR 區塊,然後選擇 Active (作用中)。

  6. 選擇此路由的連接。

  7. 選擇 Create static route (建立靜態路由)。

使用主控台建立黑名單路由
  1. 在 https://console.aws.amazon.com/vpc/ 開啟 Amazon VPC 主控台。

  2. 在導覽窗格中,選擇 Transit Gateway Route Tables (傳輸閘道路由表)。

  3. 選取要為其建立路由的路由表。

  4. 選擇 Actions (動作)、Create static route (建立靜態路由)。

  5. 在 Create static route (建立靜態路由) 頁面上輸入要建立路由的 CIDR 區塊,然後選擇 Blackhole (黑名單)。

  6. 選擇 Create static route (建立靜態路由)。

使用 建立靜態路由或黑洞路由 AWS CLI

使用 create-transit-gateway-route 命令。