服務供應商為合作夥伴互連網路連線設定 VLAN 連結後,您必須先啟用,連結才能開始傳輸流量。啟用 VLAN 連結後,您就可以在連結開始傳輸流量之前,檢查您是否正在與預期的服務供應商連線,也可以控制連結開始傳輸流量的時間。
如果您預先啟用了 VLAN 連結,該連結會在設定後自動啟用。
如要瞭解本頁面使用的詞彙定義,請參閱「Cloud Interconnect 重要詞彙」一文。
如要解決使用合作夥伴互連時可能遇到的常見問題,請參閱「疑難排解」。
如要啟用 VLAN 連結,請按照下列步驟操作。
控制台
前往 Google Cloud 控制台的 Cloud Interconnect「VLAN attachments」(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項目中的gcloud compute routers describename,來自gcloud compute routers describe指令的輸出內容enableIpv4: trueON_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項目帶有enableIpv6: true的name。