Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 2.73 KB

04-MACsec_PSK.md

File metadata and controls

71 lines (54 loc) · 2.73 KB

Configure MACsec PSK on VLAN Trunk Link

MACsec enables wire-speed AES encryption. This wire-speed encryption comes with all Catalyst 9000 switches. MACsec is the protocol that performs bulk data encryption. MACsec requires MKA (MACsec Key Agreement). MKA is the process that is used for key generation and key exchange.

Refer to our network diagram and see that our Cat9300 switches are connected via GigabitEthernet1/0/1. Network Diagram

In this example we create the necessary MKA configuration, MKA policy to enable AES-256 encryption, and enable MACsec on the switchports. Configuring MACsec PSK is fairly simple for such a powerful encryption method.

MACsec can also use Certificates instead of PSK, but we aren't going to do that today. :-)

  1. View the MACsec Playbook using cat
  2. You will notice that this is a very long playbook with several tasks. Because all of these tasks are configured with NETCONF RPCs, putting them all into the same playbook is the most efficient. So now we will look at each of the RPCs in detail below.
    cat playbooks/04-config-macsec-psk.yaml

    This task will shutdown the interface. When making changes like this the interface should be shutdown.

    This task will configure the MKA Keys, which will be attached to the interface later. The MKA Keys consist of a CKN (Connectivity Key Name) and a CAK (Connectivity Association Key). The CAK is the root of all other keys, including the SAK (Security Association Key), the actual key that does bulk data encryption.












  3. Run the Playbook

  4. ansible-playbook -i inventories/devnet-switches.yaml playbooks/04-config-macsec-psk.yaml --ask-vault-pass




  5. Check the MKA Status on the Switch

  6. show mka session




  7. Check the MACsec Status on the Switch

  8. show macsec summary