排解 Distributed Cloud connected 問題

Google 會從遠端監控及維護 Google Distributed Cloud connected 硬體。為此,Google 工程師可透過安全殼層 (SSH) 存取 Distributed Cloud 連線硬體。如果 Google 偵測到問題,Google 工程師會與您聯絡,協助排解及解決問題。如果您自行發現問題,請立即與 Google 支援團隊聯絡,以便診斷及解決問題。

VPN 連線使用的 Cloud Router 資源中,BGP 工作階段已損毀

Distributed Cloud VPN 連線會透過對應 Cloud Router 資源建立及管理的 BGP 工作階段,在 Distributed Cloud 連線叢集和 Google Cloud之間播送路徑。如果您修改與 Distributed Cloud VPN 連線相關聯的 Cloud Router 資源設定,該連線可能會停止運作。

如要復原受影響 Cloud Router 中已損毀的 BGP 工作階段設定,請完成下列步驟:

  1. 在 Google Cloud 控制台中,取得損毀的 BGP 工作階段名稱。例如:

    INTERFACE=anthos-mcc-34987234
    
  2. 取得發生問題的 BGP 工作階段的對等互連 BGP 和 Cloud Router BGP IP 位址,以及受影響的 Distributed Cloud VPN 連線所用的對等互連 ASN。例如:

    GDCE_BGP_IP=168.254.208.74
    CLOUD_ROUTER_BGP_IP=168.254.208.73
    PEER_ASN=65506
    

    如果刪除 BGP 工作階段,請改為從 Distributed Cloud 連線叢集取得這項資訊:

    1. 取得叢集憑證:

      gcloud edge-cloud container clusters get-credentials CLUSTER_ID \
        --location REGION \
        --project PROJECT_ID
      

      更改下列內容:

      • CLUSTER_ID:目標叢集的名稱。
      • REGION:建立目標叢集的 Google Cloud 區域。
      • PROJECT_ID:目標 Google Cloud 專案的 ID。
    2. 取得 MultiClusterConnectivityConfig 資源的設定:

      kubectl get multiclusterconnectivityconfig -A
      

      指令會傳回類似以下內容的輸出結果:

       NAMESPACE     NAME                   LOCAL ASN              PEER ASN
       kube-system   MultiClusterConfig1    65505                   65506
       ```
      
    3. 取得對等互連 BGP IP 位址、Cloud Router IP 位址和 BGP 工作階段 ASN:

      kubectl describe multiclusterconnectivityconfig -n kube-system MCC_CONFIG_NAME   
      

      MCC_CONFIG_NAME 替換為您在上一個步驟中取得的 MultiClusterConfigResource 名稱。

      指令會傳回類似以下內容的輸出結果:

       ​​Spec:
       Asns:
         Peer:  65505
         Self:  65506 # GDCE ASN
       Tunnels:
         Ike Key:
           Name:       MCC_CONFIG_NAME-0
           Namespace:  kube-system
         Peer:
           Bgp IP:      169.254.208.73 # Cloud Router BGP IP
           Private IP:  34.157.98.148
           Public IP:   34.157.98.148
         Self:
           Bgp IP:      169.254.208.74 # GDCE BGP IP
           Private IP:  10.100.29.49
           Public IP:   208.117.254.68
       ```
      
  3. 在 Google Cloud 控制台中,取得損毀 VPN 通道的名稱、區域和Google Cloud 專案名稱。例如:

    VPN_TUNNEL=VPNTunnel1
    REGION=US-East1
    VPC_PROJECT_ID=VPC-Project-1
    
  4. 從 Cloud Router 設定中刪除損毀的 BGP 工作階段。

  5. 建立新的 Cloud Router 介面:

    gcloud compute routers add-interface --interface-name=INTERFACE_NAME \
       --vpn-tunnel=TUNNEL_NAME \ 
       --ip-address=ROUTER_BGP_IP \
       --project=VPC_PROJECT_ID \
       --region=REGION \      
       --mask-length=30
    

    更改下列內容:

    • INTERFACE_NAME:可唯一識別這個介面的說明名稱。
    • TUNNEL_NAME:您在上一個步驟中取得的 VPN 通道名稱。
    • ROUTER_BGP_IP:Cloud Router 的 BGP IP 位址,您已在本程序稍早取得。
    • VPC_PROJECT_ID:目標 VPCGoogle Cloud 專案的 ID。
    • REGION:建立目標虛擬私有雲 Google Cloud 專案的 Google Cloud 區域。
  6. 建立 BGP 對等互連:

    gcloud compute routers add-bgp-peer --interface=INTERFACE_NAME \
       --peer-name=TUNNEL_NAME \
       --region REGION \
       --project=VPC_PROJECT_ID \
       --peer-ip-address=GDCE_BGP_IP \
       --peer-asn=GDCE_BGP_ASN \
       --advertised-route-priority=100 \
       --advertisement-mode=DEFAULT
    

    更改下列內容:

    • INTERFACE_NAME:您在上一個步驟中建立的介面名稱。
    • TUNNEL_NAME:您在上一個步驟中用來建立介面的 VPN 通道名稱。
    • REGION:建立目標虛擬私有雲 Google Cloud 專案的 Google Cloud 區域。
    • VPC_PROJECT_ID:目標 VPCGoogle Cloud 專案的 ID。
    • GDCE_BGP_IP:您在本程序稍早取得的 Distributed Cloud 對等互連 BGP IP 位址。
    • GDCE_BGP_ASN:您在本程序稍早取得的 Distributed Cloud 對等互連 BGP ASN。

此時 BGP 工作階段會恢復運作。