鏡像端點會做為 Google 管理的中介或代理,處理鏡像網路流量。收到鏡像流量後,鏡像端點會使用額外的 GENEVE 中繼資料強化網路封包,並將流量鏡像至多個生產者鏡像流量部署項目群組。
只有在鏡像模式為中介模式時,才需要鏡像端點,直接模式則不需要。
事前準備
您必須在 Google Cloud 專案中啟用 Compute Engine API。
您必須在要用於帳單的Google Cloud 專案中啟用 Network Security API。
如要執行本指南中的
gcloud指令列範例,請安裝 gcloud CLI。您必須擁有鏡像部署群組。
角色
如要取得建立、查看或刪除鏡像端點所需的權限,請要求管理員在 Google Cloud 專案中授予您必要的 Identity and Access Management (IAM) 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。
如要查看這個頁面列出的作業進度,請確認您的使用者角色具備「鏡像端點管理員」(roles/networksecurity.mirroringEndpointAdmin) 權限。
配額
如要查看與鏡像端點相關聯的配額,請參閱「配額與限制」。
建立鏡像端點
在特定區域中建立鏡像端點。
gcloud
如要建立鏡像端點,請使用 gcloud network-security mirroring-endpoint create 指令:
gcloud beta network-security mirroring-endpoint create ENDPOINT \
--location ZONE \
--project PROJECT_NAME \
--mirroring-endpoint-group ENDPOINT_GROUP \
--no-async
更改下列內容:
ENDPOINT:鏡像端點的名稱。ZONE:鏡像端點的可用區。您只能在一個區域中建立一個鏡像端點。PROJECT_NAME:要在其中建立鏡像端點的專案名稱。ENDPOINT_GROUP:鏡像端點群組的名稱。
查看鏡像端點的詳細資料
查看特定鏡像端點的詳細資料。
gcloud
如要查看鏡像端點的詳細資料,請使用 gcloud network-security mirroring-endpoint describe 指令:
gcloud beta network-security mirroring-endpoint describe ENDPOINT \
--location ZONE \
--project PROJECT_NAME
更改下列內容:
ENDPOINT:鏡像端點的名稱。ZONE:鏡像端點所在的可用區。PROJECT_NAME:建立鏡像端點的專案名稱。
列出鏡像端點
列出專案中的所有鏡像端點。
gcloud
如要列出所有鏡像端點,請使用 gcloud network-security mirroring-endpoint list 指令:
gcloud beta network-security mirroring-endpoint list \
--project PROJECT_NAME \
--location ZONE
更改下列內容:
PROJECT_NAME:建立鏡像端點的專案名稱。ZONE:鏡像端點所在的可用區。
刪除鏡像端點
您可以指定名稱、位置和專案,刪除鏡像端點。
gcloud
如要刪除鏡像端點,請使用 gcloud network-security mirroring-endpoint delete 指令:
gcloud beta network-security mirroring-endpoint delete ENDPOINT \
--project PROJECT_NAME \
--location ZONE \
--no-async
更改下列內容:
ENDPOINT:鏡像端點的名稱。PROJECT_NAME:建立鏡像端點的專案名稱。ZONE:鏡像端點所在的可用區。