服務供應商為合作夥伴互連網路連線設定 VLAN 連結後,您必須先啟用連結,然後連結才能開始傳輸流量。啟用 VLAN 連結後,您就可以在連結開始傳輸流量之前,檢查您是否正在與預期的服務供應商連線,也可以控制連結開始傳輸流量的時間。
如果您預先啟用了 VLAN 連結,該連結會在設定後自動啟用。
如要瞭解本頁面使用的術語定義,請參閱 Cloud Interconnect 重要術語。
如要解決使用合作夥伴互連網路時可能遇到的常見問題,請參閱疑難排解。
如要啟用 VLAN 連結,請按照下列步驟操作。
主控台
在 Google Cloud 主控台中,前往「Cloud Interconnect」分頁的「VLAN 連結」分頁。
選取 VLAN 連結以查看其詳細資料頁面。
如果您的連結狀態為
Waiting for service provider
,請等候服務供應商完成 VLAN 設定。查看互連網路資訊,檢查預期的服務供應商是否已設定了 VLAN 連結。
如果非預期的第三方與您的 VLAN 連結配對,請刪除 VLAN 連結,然後建立新的連結,如此便能產生新的配對金鑰。請使用新的配對金鑰向您的服務供應商要求建立另一個連線。
按一下「Activate」。
gcloud
說明 VLAN 連結以查看詳細資料。連結的狀態必須是
PENDING_CUSTOMER
,您才能啟用:gcloud compute interconnects attachments describe ATTACHMENT_NAME \ --region=REGION
更改下列內容:
ATTACHMENT_NAME
:VLAN 連結名稱REGION
:VLAN 連結所在的區域
針對 IPv4 VLAN 附件,輸出結果會與下列內容類似:
adminEnabled: false edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1 bandwidth: BPS_1G cloudRouterIpAddress: 169.254.67.201/29 creationTimestamp: '2017-12-01T08:29:09.886-08:00' customerRouterIpAddress: 169.254.67.202/29 id: '7976913826166357434' kind: compute#interconnectAttachment labelFingerprint: 42WmSpB8rSM= name: ATTACHMENT_NAME pairingKey: 7e51371e-72a3-40b5-b844-2e3efefaee59/REGION/2 partnerMetadata: interconnectName: New York (2) partnerName: My Service Provider Inc portalUrl: https://service-provider-portal.com region: https://www.googleapis.com/compute/v1/projects/customer-project/regions/REGION router: https://www.googleapis.com/compute/v1/projects/customer-project/regions/REGION/routers/my-router selfLink: https://www.googleapis.com/compute/v1/projects/customer-project/regions/REGION/interconnectAttachments/my-attachment stackType: IPV4_ONLY state: PENDING_CUSTOMER type: PARTNER vlanTag8021q: 1000
對於 IPv4 和 IPv6 (雙重堆疊) VLAN 附件,輸出內容會與下列內容相似:
adminEnabled: false edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1 bandwidth: BPS_1G cloudRouterIpAddress: 169.254.67.201/29 cloudRouterIpv6Address: 2600:2d00:0:1::1/125 creationTimestamp: '2017-12-01T08:31:11.580-08:00' customerRouterIpAddress: 169.254.67.202/29 customerRouterIpv6Address: 2600:2d00:0:1::2/125 description: Interconnect for Customer 1 id: '7193021941765913888' interconnect: https://www.googleapis.com/compute/alpha/projects/partner-project/global/interconnects/lga-2 kind: compute#interconnectAttachment labelFingerprint: 42WmSpB8rSM= name: ATTACHMENT_NAME partnerMetadata: interconnectName: New York (2) partnerName: Partner Inc portalUrl: https://partner-portal.com region: https://www.googleapis.com/compute/alpha/projects/partner-project/regions/REGION selfLink: https://www.googleapis.com/compute/alpha/projects/partner-project/regions/REGION/interconnectAttachments/customer-attachment stackType: IPV4_IPV6 state: PENDING_CUSTOMER type: PARTNER vlanTag8021q: 1000
服務供應商設定了您的 VLAN 連結後,您的連結狀態將從
PENDING_PARTNER
變更為PENDING_CUSTOMER
。如果狀態仍為PENDING_PARTNER
,請等候服務供應商完成 VLAN 設定。檢查
partnerMetadata
欄位是否顯示您預期的服務供應商。如果非預期的第三方與您的 VLAN 連結配對,請刪除 VLAN 連結,然後建立新的連結,如此便能產生新的配對金鑰。請使用新的配對金鑰向您的服務供應商要求建立另一個連線。
使用
--adminEnabled
旗標來啟用連結:gcloud compute interconnects attachments partner update ATTACHMENT_NAME \ --region=REGION \ --admin-enabled
啟用後,您的 VLAN 連結就可以開始傳輸流量。對於第 3 層連線,您不需要進行任何其他設定。設定 VLAN 連結時,您的服務供應商會提供其自治系統編號 (ASN),然後 Google 會自動將 ASN 新增至 Cloud Router 上的邊界閘道通訊協定 (BGP) 工作階段。
如果您已啟用加密 VLAN 連結,只要建立高可用性 VPN 閘道和通道,即可完成採用 Cloud Interconnect 的高可用性 VPN 部署作業。
如要使用第 2 層連線,您必須將內部部署路由器的 ASN 新增至 Cloud Router。
如要設定 Cloud Router,請按照下列步驟操作。
主控台
在 Google Cloud 控制台中,前往「VLAN attachments」(VLAN 連結) 分頁。
選取您已啟用的 VLAN 連結,即可查看其詳細資料頁面。
按一下 [Configure BGP] (設定 BGP)。
在「對等 ASN」欄位中,新增您內部部署路由器的 ASN。
按一下 [儲存並繼續]。
gcloud
針對與 VLAN 連結相關聯的每個 BGP 對等點,請描述與 VLAN 連結相關聯的 Cloud Router,然後找出與 VLAN 連結相關聯且自動建立的 BGP 對等點名稱。
執行下列指令:
gcloud compute routers describe ROUTER_NAME \ --region=REGION
更改下列內容:
ROUTER_NAME
:Cloud Router 的名稱REGION
:Cloud Router 所在的地區
針對 IPv4 VLAN 附件,輸出結果會與下列內容類似:
bgp: advertiseMode: DEFAULT asn: 16550 bgpPeers: - interfaceName: auto-ia-if-my-attachment-c2c53a710bd6c2e ipAddress: 169.254.67.201 managementType: MANAGED_BY_ATTACHMENT name: auto-ia-bgp-my-attachment-c2c53a710bd6c2e peerIpAddress: 169.254.67.202 creationTimestamp: '2018-01-25T07:14:43.068-08:00' description: 'test' id: '4370996577373014668' interfaces: - ipRange: 169.254.67.201/29 linkedInterconnectAttachment: https://www.googleapis.com/compute/alpha/projects/customer-project/regions/REGION/interconnectAttachments/my-attachment-partner managementType: MANAGED_BY_ATTACHMENT name: auto-ia-if-my-attachment-c2c53a710bd6c2e kind: compute#router name: partner network: https://www.googleapis.com/compute/v1/projects/customer-project/global/networks/default region: https://www.googleapis.com/compute/v1/projects/customer-project/regions/REGION selfLink: https://www.googleapis.com/compute/v1/projects/customer-project/regions/REGION/routers/my-router
對於 IPv4 和 IPv6 (雙重堆疊) VLAN 附件,輸出內容會與下列內容相似:
bgp: advertiseMode: DEFAULT asn: 16550 bgpPeers: - enableIpv4: true enableIpv6: false ipAddress: 169.254.67.201 interfaceName: auto-ia-if-my-attachment-0098154607ecb20 managementType: MANAGED_BY_ATTACHMENT name: auto-ia-bgp4-my-attachment-0098154607ecb20 peerIpAddress: 169.254.67.202 - enableIpv4: false enableIpv6: true ipAddress: 2600:2d00:0:1::1 interfaceName: auto-ia-if6-my-attachment-0098154607ecb20 managementType: MANAGED_BY_ATTACHMENT name: auto-ia-bgp6-my-attachment-0098154607ecb20 peerIpAddress: 2600:2d00:0:1::2 creationTimestamp: '2018-03-29T09:58:25.476-07:00' description: '' id: '466013140766729694' interfaces: - ipRange: 169.254.67.201/29 linkedInterconnectAttachment: https://www.googleapis.com/compute/alpha/projects/customer-project/regions/REGION/interconnectAttachments/customer-attachment managementType: MANAGED_BY_ATTACHMENT name: auto-ia-if-customer-attach-0098154607ecb20 - ipRange: 2600:2d00:0:1::1/125 linkedInterconnectAttachment: https://www.googleapis.com/compute/alpha/projects/customer-project/regions/REGION/interconnectAttachments/customer-attachment managementType: MANAGED_BY_ATTACHMENT name: auto-ia-if6-customer-attach-0098154607ecb20 kind: compute#router name: customer-router network: https://www.googleapis.com/compute/alpha/projects/customer-project/global/networks/default region: https://www.googleapis.com/compute/alpha/projects/customer-project/regions/REGION selfLink: https://www.googleapis.com/compute/alpha/projects/customer-project/regions/REGION/routers/customer-router
使用內部部署路由器的 ASN 更新每個 BGP 對等點。
如為 IPv4 BGP 同級網關,請執行下列指令:
gcloud compute routers update-bgp-peer ROUTER_NAME \ --peer-name=IPV4_PEER_NAME \ --peer-asn=ON_PREM_ASN \ --region=REGION
更改下列內容:
IPV4_PEER_NAME
:bgpPeers
項目的name
,其中包含gcloud compute routers describe
指令輸出的enableIpv4: true
ON_PREM_ASN
:內部部署路由器的 ASN
如為 IPv6 BGP 對等端,請執行下列指令:
gcloud compute routers update-bgp-peer ROUTER_NAME \ --peer-name=IPV6_PEER_NAME \ --peer-asn=ON_PREM_ASN \ --region=REGION
將
IPV6_PEER_NAME
替換為gcloud compute routers describe
指令輸出內容中bgpPeers
項目的name
,並使用enableIpv6: true
。