Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive come ottenere le chiavi MACsec per
MACsec per Cloud Interconnect.
MACsec per Cloud Interconnect genera i valori della chiave di associazione di connettività (CAK) GCM-AES-256 e del nome della chiave di associazione di connettività (CKN). Utilizzi i valori generati da MACsec per Cloud Interconnect quando configuri il router on-premise. Puoi ottenere i valori in qualsiasi momento dopo aver configurato le chiavi precondivise sulla connessione Cloud Interconnect.
Se scegli di utilizzare ruoli personalizzati, assicurati che il ruolo personalizzato per l'amministrazione di MACsec per Cloud Interconnect includa l'autorizzazione IAM compute.interconnects.getMacsecConfig.
Recupera le chiavi precondivise
Seleziona una delle seguenti opzioni:
Console
Nella console Google Cloud , vai alla scheda Connessioni
fisiche di Cloud Interconnect.
Nella scheda MACsec, vai alla sezione Chiavi precondivise, trova il nome della chiave precondivisa e fai clic su Visualizza. In una finestra vengono visualizzati
la chiave di associazione della connettività (CAK) e il nome della chiave di associazione
della connettività (CKN). Fai clic sul pulsante Copia per copiare ogni valore negli appunti del computer.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[],[],null,["# Get MACsec keys\n\nThis page describes how to get your MACsec keys for\nMACsec for Cloud Interconnect.\n\nMACsec for Cloud Interconnect generates GCM-AES-256 connectivity\nassociation key (CAK) and connectivity association key name (CKN) values. You\nuse the values that MACsec for Cloud Interconnect generates when you\nconfigure your on-premises router. You can get the values at any time after\nconfiguring pre-shared keys on your Cloud Interconnect connection.\n\nFor more information, see\n[Configure your on-premises router](/network-connectivity/docs/interconnect/how-to/macsec/set-up-macsec#configure-your-on-premises-router).\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to retrieve MACsec keys,\n\nask your administrator to grant you the\n\n\n[Compute Network Admin](/iam/docs/roles-permissions/compute#compute.networkAdmin) (`roles/compute.networkAdmin`)\nIAM role on your project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nIf you choose to use custom roles, ensure that your custom role for\nadministrating MACsec for Cloud Interconnect includes the\n`compute.interconnects.getMacsecConfig` IAM permission.\n\nGet pre-shared keys\n-------------------\n\nSelect one of the following options: \n\n### Console\n\n1. In the Google Cloud console, go to the Cloud Interconnect **Physical\n connections** tab.\n\n [Go to Physical connections](https://console.cloud.google.com/hybrid/interconnects/list?tab=interconnects)\n2. Select the connection that you want to view.\n\n3. On the **MACsec** tab, go to the **Pre-shared keys** section and find the\n name of the pre-shared key, and then click **View** . A window displays the\n connectivity association key (**CAK** ) and the connectivity association\n key name (**CKN** ). Click the **Copy** button to copy each value to your\n computer's clipboard.\n\n4. Click **Close**.\n\n### gcloud\n\nRun the following command: \n\n gcloud compute interconnects macsec get-config \u003cvar translate=\"no\"\u003eINTERCONNECT_CONNECTION_NAME\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003eINTERCONNECT_CONNECTION_NAME\u003c/var\u003e with the name of your\nCloud Interconnect connection.\n\nThe output is similar to the following: \n\n preSharedKeys:\n - cak: 0123456789abcdef...0123456789abcdef\n ckn: 0101016789abcdef...0123456789abcdef\n name: key1\n startTime: 2023-07-01T21:00:01.000Z\n\nWhat's next?\n------------\n\n- [Rotate MACsec\n keys](/network-connectivity/docs/interconnect/how-to/macsec/rotate-macsec-keys)\n- [View MACsec status](/network-connectivity/docs/interconnect/how-to/macsec/view-macsec-status)\n- [Troubleshoot MACsec](/network-connectivity/docs/interconnect/how-to/macsec/troubleshoot-macsec)"]]