以下設定會使用專屬互連網路,達到 99.99% 的可用性。Google 建議將此設定用於產品等級應用程式,例如對停機時間容忍度較低的關鍵作業。
如要瞭解本頁面使用的 Cloud Interconnect 術語,請參閱「重要術語」。
如要瞭解如何建立備援專屬互連網路連線,以便在備援情況下提供足夠的容量,請參閱最佳做法。
需求條件
需要下列資源和設定才能達到 99.99% 的可用性:
至少有四個專屬互連網路連線,其中兩個連線位於同一個都會區 (都會區),另外兩個連線位於另一個都會區。位於同一個都會區的連線必須放置在不同的 邊緣可用性網域 (都會區可用區),才能達到 99.99% 的可用性。在同一個都會區的兩個不同邊緣可用性網域中放置專用互連網路連線非常重要,因為維護時段會在同一個都會區的邊緣可用性網域之間進行協調,但不會跨都會區協調。
至少有兩個 Cloud Router 放置在至少兩個不同的 Google Cloud 區域中。即使所有虛擬機器 (VM) 執行個體都位於單一地區,您仍必須將 Cloud Router 放置在至少兩個地區。如此一來,如果一個地區發生問題, Google Cloud 還可以透過其他地區將流量重新轉送至您的 VM。每個 Cloud Router 都必須連結至都會區內的一組專用互連網路連線 (每個 Cloud Router 有兩個 VLAN 連結)。
當 Cloud Router 連線至不同邊緣可用性網域中的 VLAN 連結時, Google Cloud 會使用兩個軟體工作來提供備援功能。雖然只需要兩個 Cloud Router,但四個 Cloud Router 的拓樸 (每個 VLAN 連結一個) 也符合服務水準協議規定。
虛擬私有雲 (VPC) 網路的動態轉送模式必須是全域。利用全域動態轉送功能,Cloud Router 可以公告所有子網路,並將路由器發現的路徑傳播至所有子網路,不論子網路的地區為何。
視可用性需求而定,您的內部部署網路中可以有兩個路由器,每個路由器連線至其中一個Google Cloud 地區。
拓撲範例
以下拓撲範例顯示位於兩個不同的都會區和不同邊緣可用性網域的四個專屬互連網路連線:lga-zone1-16
、lga-zone2-1422
、iad-zone1-1
和 iad-zone2-1
。Cloud Router (每個地區一個) 位於 us-central1
和 us-east1
地區的 vpc1
網路中。每個路由器都有自己的邊界閘道通訊協定 (BGP) 工作階段。
設定偏好路徑
利用全域動態轉送功能,Cloud Router 可以將路徑公告至虛擬私有雲網路中的所有子網路。Cloud Router 會將路徑通告至優先順序比本機子網路 (位於 Cloud Router 地區中的子網路) 低的遠端子網路 (Cloud Router 地區之外的子網路)。詳情請參閱 Cloud Router 說明文件中的動態轉送模式。
在拓撲範例中,進入虛擬私人雲端網路的輸入流量偏好通過 us-central1
地區,因為這些路徑的優先順序比來自 us-east1
地區的路徑高。只有當 us-central1
中的連線失敗時,流量才會通過 us-east1
。
您可以在設定 Cloud Router 的 BGP 工作階段時變更路徑優先順序。BGP 工作階段具有公告路徑優先順序 (MED 值) 的選項。值越低,優先順序越高。例如,您可以將 us-east1
中的 BGP 工作階段設定為具有較高的優先順序,使該地區成為偏好的路徑。詳情請參閱 Cloud Router 說明文件中的「公告前置字串和優先順序」。
建立 99.99% 拓撲
以下各節將逐一介紹建立此拓撲的步驟。如要建立個人化的拓撲,請使用您自己的值取代範例輸入值。例如,使用您的虛擬私人雲端網路名稱取代 vpc1
網路名稱。
變更虛擬私人雲端網路的動態轉送模式
針對 vpc1
網路,將其動態轉送模式變更為全域。
主控台
在 Google Cloud 控制台中,前往「VPC Networks」(虛擬私有雲網路) 頁面。
選取
vpc1
聯播網,然後按一下 「編輯」。在「動態轉送模式」下方,選取「全球」。
按一下 [儲存]。
gcloud
gcloud compute networks update vpc1\ --bgp-routing-mode global
訂購專屬互連網路連線
您可以使用 Google Cloud 控制台或 Google Cloud CLI 訂購備援連線。
主控台
在 Google Cloud 控制台中,前往「Interconnect Hybrid Connectivity」頁面。
按一下「開始使用」。
選取「專屬互連網路」,然後按一下「繼續」。
選取「訂購新的專屬互連網路」,然後按一下「繼續」。
指定連線詳細資料:
- 「Name」:輸入
int-lga1
。 - 說明:輸入
Example connection in LGA ZONE1
。 - Location:選擇
Digital Realty | Telx New York (111 8th Ave)
,這是lga-zone1-16
位置的 PeeringDB 名稱。 - 容量:使用預設容量 (10 Gb/s)。
- 「Name」:輸入
點按「Next」。
指定備援連線的詳細資料:
- 「Name」:輸入
int-lga2
。 - 說明:輸入
Example connection in LGA ZONE2
。 - 位置:選擇
zColo New York - 60 Hudson St
,這是lga-zone2-1422
位置的 PeeringDB 名稱。 - 容量:使用預設容量 (10 Gb/s)。
- 「Name」:輸入
點按「Next」。
指定聯絡資訊:
- 公司名稱:輸入
The Customer
。這個名稱會用於 LOA-CFA,做為獲授權要求 Cloud Interconnect 連線的一方。 - 技術聯絡人:輸入
customer@customer.com
。您不需要輸入自己的地址,系統會將您列入所有通知的聯絡人名單。
- 公司名稱:輸入
點按「Next」。
檢查您的訂單內容。請確認連線的詳細資料和聯絡資訊正確無誤。如果一切都正確無誤,請按一下「下單」。如果沒有,請返回並編輯連結詳細資料。
在訂單確認頁面上查看後續步驟,然後按一下「完成」。
在位置
Equinix Ashburn (DC1-DC11)
另外訂購兩個連線 (int-iad1
和int-iad2
),這是iad-zone1-1
和iad-zone2-1
位置的 PeeringDB 名稱。由於阿什本服務供應商擁有兩個區域,因此主控台會自動為備援連線選取同一個服務供應商但不同的區域。 Google Cloud
gcloud
訂購四個專屬互連網路連線,名稱分別為
int-lga1
、int-lga2
、int-iad1
和int-iad2
:gcloud compute interconnects create int-lga1 \ --customer-name "The Customer" \ --description "Example connection in LGA ZONE1" \ --interconnect-type DEDICATED \ --link-type ETHERNET_10G_LR \ --location lga-zone1-16 \ --requested-link-count 1 \ --noc-contact-email customer@customer.com
gcloud compute interconnects create int-lga2 \ --customer-name "The Customer" \ --description "Example connection in LGA ZONE2" \ --interconnect-type DEDICATED \ --link-type ETHERNET_10G_LR \ --location lga-zone2-1422 \ --requested-link-count 1 \ --noc-contact-email customer@customer.com
gcloud compute interconnects create int-iad1 \ --customer-name "The Customer" \ --description "Example connection in IAD ZONE1" \ --interconnect-type DEDICATED \ --link-type ETHERNET_10G_LR \ --location iad-zone1-1 \ --requested-link-count 1 \ --noc-contact-email customer@customer.com
gcloud compute interconnects create int-iad2 \ --customer-name "The Customer" \ --description "Example connection in IAD ZONE2" \ --interconnect-type DEDICATED \ --link-type ETHERNET_10G_LR \ --location iad-zone2-1 \ --requested-link-count 1 \ --noc-contact-email customer@customer.com
當您訂購專屬互連網路連線後,Google 會傳送確認電子郵件給您,並分配通訊埠給您。分配完成後,Google 會為您的連線產生 LOA-CFA,並透過電子郵件傳送給您。系統也會將所有自動化電子郵件傳送給 NOC 聯絡人和訂購連線的使用者。
只有在佈建並測試連線後,您才能使用連線。如要進一步瞭解佈建程序,請參閱佈建總覽。
建立 Cloud Router
建立兩個 Cloud Router,每個地區一個。
主控台
前往 Google Cloud 控制台的「Create a Cloud Router」頁面。
指定 Cloud Router 詳細資料:
- 名稱:輸入
rtr-cent1
做為第一個 Cloud Router 的名稱。 - 「Network」:選取
vpc1
,這是內部部署網路延伸的目的地網路名稱。 - 地區:選取
us-central1
,這是 Cloud Router 的設定地區,如同範例拓撲所示。 - 「Google ASN」:輸入
64513
,這是範例 Cloud Router 的 ASN。
- 名稱:輸入
在「路徑」下方,選取「公告 Cloud Router 可使用的所有子網路 (預設)」,然後按一下「建立」。
在
us-east1
地區中,使用名稱rtr-east1
建立另一個具有相同屬性的 Cloud Router。
gcloud
在
us-central1
地區的vpc1
網路中建立 Cloud Router,並使用 ASN64513
:gcloud compute routers create rtr-cent1 \ --asn 64513 \ --network vpc1 \ --region us-central1
在
us-east1
地區的vpc1
網路中建立 Cloud Router,並使用 ASN64513
:gcloud compute routers create rtr-east1 \ --asn 64513 \ --network vpc1 \ --region us-east1
建立 VLAN 連結
可以開始使用連線 (處於 ACTIVE
狀態) 後,請建立 VLAN 連結,以將連線與 Cloud Router 連接在一起。建立四個連結,每個 Cloud Interconnect 連線一個,並使用下列清單所述的路由器:
rtr-cent1
連結至int-lga1
和int-lga2
rtr-east1
連結至int-iad1
和int-iad2
主控台
在 Google Cloud 控制台中,前往「VLAN attachments」(VLAN 連結) 分頁。
按一下 [Add VLAN attachment] (新增 VLAN 連結)。
選取「專屬互連網路」,然後按一下「繼續」。
選取「In this project」。
選取
int-lga1
連線,然後按一下「繼續」。選取「Add VLAN attachment」:
- 「Name」:輸入
attachment-lga1-central1
。 - Router:選取
rtr-cent1
Cloud Router。
- 「Name」:輸入
按一下「建立」,連結的建立作業需要一些時間才能完成。
針對該連結,如要將 BGP 工作階段新增至
rtr-cent1
,請按一下「Configure」。VLAN 連結已填入 Google 和對等 BGP IP 位址。記錄每個連結的 IP 位址、ASN 和 VLAN 標記。這些是設定內部部署路由器的必要資訊。
如要新增 BGP 工作階段,請按一下「儲存設定」。在內部部署路由器上設定 BGP 之前,BGP 工作階段會一直保持停用狀態。
為其他連線建立另外三個連結:
int-lga2
(rtr-cent1
)int-iad1
(rtr-east1
)int-iad2
(rtr-east1
)
記錄每個連結的資訊。
gcloud
建立四個附件:
gcloud compute interconnects attachments create attachment-lga1-central1 \ --interconnect int-lga1 \ --router rtr-cent1 \ --region us-central1
gcloud compute interconnects attachments create attachment-lga2-central1 \ --interconnect int-lga2 \ --router rtr-cent1 \ --region us-central1
gcloud compute interconnects attachments create attachment-iad1-east1 \ --interconnect int-iad1 \ --router rtr-east1 \ --region us-east1
gcloud compute interconnects attachments create attachment-iad2-east1 \ --interconnect int-iad2 \ --router rtr-east1 \ --region us-east1
描述
attachment-lga1-central1
連結以擷取其分配的資源,例如 VLAN ID 和 BGP 對等互連位址;使用這些值設定 Cloud Router 和內部部署路由器:gcloud compute interconnects attachments describe attachment-lga1-central1 \ --region us-central1
先前的指令會輸出以下資訊:
cloudRouterIpAddress: 169.254.58.49/29 creationTimestamp: '2017-08-15T08:34:11.137-07:00' customerRouterIpAddress: 169.254.58.50/29 id: '5630382895290821276' interconnect: https://www.googleapis.com/compute/v1/projects/customer-project/global/interconnects/int-lga1 kind: compute#interconnectAttachment name: attachment-lga1-central1 operationalStatus: ACTIVE privateInterconnectInfo: tag8021q: 1000 region: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1 router: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/routers/router1 selfLink: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/interconnectAttachments/attachment-lga1-central1
記錄下列值:
- tag8021q:指定 VLAN ID,即
1000
。VLAN ID 可用於識別通過這個連結的流量。使用這個值可在內部部署路由器上設定具有標記的 VLAN 子介面。 - 「cloudRouterIpAddress」cloudRouterIpAddress:Cloud Router IP 位址,即
169.254.58.49/29
。將這個位址指派給 Cloud Router 介面,並將這個位址指定為內部部署路由器上的相鄰 BGP。 - 「customerRouterIpAddress」customerRouterIpAddress:客戶路由器 IP 位址,即
169.254.58.50/29
。在 Cloud Router 上,將這個位址指定為獲指派 Cloud Router IP 位址的介面上的 BGP 對等位址,並將這個位址指派給內部部署路由器上的 VLAN 子介面。
- tag8021q:指定 VLAN ID,即
在
rtr-cent1
Cloud Router 上,為attachment-lga1-central1
連結新增一個介面:gcloud compute routers add-interface rtr-cent1 \ --interface-name rtr-cent1-1 \ --interconnect-attachment attachment-lga1-central1 \ --ip-address 169.254.58.49 \ --mask-length 29 \ --region us-central1
將 BGP 對等點新增至介面。在這個範例中,內部部署 ASN 為
12345
:gcloud compute routers add-bgp-peer rtr-cent1 \ --interface rtr-cent1-1 \ --peer-name central1 \ --peer-ip-address 169.254.58.50 \ --peer-asn 12345 \ --advertised-route-priority 100 \ --region us-central1
說明其他連結,然後在適當的 Cloud Router 上以類似的方式設定新的 BGP 工作階段。
設定地端部署路由器
如要設定內部部署路由器,請使用 VLAN 連結中的資訊。以下範例是 Juniper 路由器設定中的節錄內容。您可以使用此範例做為設定自有路由器的起點。詳情請參閱「設定內部部署路由器」。
interface ae20 { flexible-vlan-tagging; native-vlan-id 1; aggregated-ether-options { lacp { active; } } unit 1000 { vlan-id 1000; family inet { address 169.254.58.50/29; } } } protocols bgp { group google { type external; multihop { ttl 4; } hold-time 60; peer-as 64513; local-as 12345; local-address 169.254.58.50; neighbor 169.254.58.49 { ... } } }
後續步驟
如要進一步瞭解這些步驟,請參閱專屬互連網路佈建總覽。
如要取得非必要應用程式的相關資訊,請參閱「為專屬互連網路建立 99.9% 的可用性」。
如要解決使用 Cloud Interconnect 時可能遇到的常見問題,請參閱疑難排解。