Macsec Cert Based Encrypt
Macsec Cert Based Encrypt
The Certificate-based MACsec Encryption feature uses 802.1X port-based authentication with Extensible
Authentication Protocol – Transport Layer Security (EAP-TLS) to carry Certificates for router ports where
MACsec encryption is required. EAP-TLS mechanism is used to mutually authenticate and get the Master
Session Key (MSK) from which the Connectivity Association Key (CAK) is derived for the MACsec Key
Agreement (MKA) protocol.
Certificate-based MACsec encryption can be done using either remote authentication or local authentication.
• Feature Information for Certificate-based MACsec Encryption, on page 1
• Prerequisites for Certificate-based MACsec Encryption, on page 2
• Restrictions for Certificate-based MACsec Encryption, on page 2
• Information About Certificate-based MACsec Encryption, on page 2
• Configuring Certificate-based MACsec Encryption using Remote Authentication, on page 4
• Configuring Certificate-based MACsec Encryption using Local Authentication, on page 10
• Verifying Certificate-based MACsec Encryption, on page 16
• Configuration Examples for Certificate-based MACsec Encryption, on page 18
• Additional References, on page 19
Certificate-based Cisco IOS XE The Certificate-based MACsec Encryption feature uses 802.1X
MACsec Encryption Everest Release port-based authentication with Extensible Authentication Protocol
16.6.1 – Transport Layer Security (EAP-TLS) to carry Certificates for
router ports where MACsec encryption is required. EAP-TLS
mechanism is used to do the mutual authentication and to get the
Master Session Key (MSK) from which the Connectivity
Association Key (CAK) is derived for the MACsec Key
Agreement (MKA) protocol.
When the interface is configured for 802.1x role as both, The authentication manager on a router creates a
session with two EAP session (blue and red with separate EAP session ID) flows with supplicant as well as
an authenticator role and both trigger EAP-TLS mutual authentication with the remote authenticating server
(AAA server/ISE/RADIUS).
After mutual authentication, the MSK of the flow corresponding to the router with the higher MAC address
and role as authenticator is picked to derive the CAK.
In the diagram above, if Router 1 MAC address is less than Router 2, then the master session key (MSK)
obtained from the EAP session (blue flow) is used as EAP-MSK for the MKA (Router 1 acts as authenticator
and Router 2 as supplicant). This ensures that Router 1 acts as MKA Key Server and Router 2 is the Non-Key
Server.
If the Router 2 MAC Address is less than Router 1 then the MSK obtained from the EAP session (red flow)
is used (by both routers) as EAP-MSK for the MKA to derive the CAK.
The figure below depicts two EAP call flows (with separate EAP-Session ID) on the router. The red flow
depicts Router 1 as supplicant and Router 2 as authenticator and the blue flow is vice-versa.
When the interface is configured for 802.1x role as both, The authentication manager on a router creates a
session with two EAP session (blue and red with separate EAP session ID) flows with supplicant as well as
an authenticator role and both trigger EAP-TLS mutual authentication with the local authenticating server.
After mutual authentication, the MSK of the flow corresponding to the router with the higher MAC address
and role as authenticator is picked to derive the CAK.
In the diagram above, if Router 1 MAC address is less than Router 2, then the master session key (MSK)
obtained from the EAP session (blue flow) is used as EAP-MSK for the MKA (Router 1 acts as authenticator
and Router 2 as supplicant). This ensures that Router 1 acts as MKA Key Server and Router 2 is the Non-Key
Server.
If the Router 2 MAC Address is less than Router 1 then the MSK obtained from the EAP session (red flow)
is used (by both routers) as EAP-MSK for the MKA to derive the CAK.
ConfiguringCertificate-basedMACsecEncryptionusingRemote
Authentication
To configure MACsec with MKA on point-to-point links, perform these tasks:
Procedure
Step 6 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Procedure
Step 3 crypto pki trustpoint server name Declares the trustpoint and a given name and enters
ca-trustpoint configuration mode.
Step 4 enrollment url url name pem Specifies the URL of the CA on which your device should
send certificate requests.
An IPv6 address can be added in the URL enclosed in
brackets. For example: http:// [2001:DB8:1:1::1]:80.
The pem keyword adds privacy-enhanced mail (PEM)
boundaries to the certificate request.
Step 5 rsakeypair label Specifies which key pair to associate with the certificate.
Note The rsakeypair name must match the
trust-point name.
Step 7 ip-address none The none keyword specifies that no IP address should be
included in the certificate request.
Step 8 revocation-check crl Specifies CRL as the method to ensure that the certificate
of a peer has not been revoked.
Step 10 crypto pki authenticate name Retrieves the CA certificate and authenticates it.
Step 12 show crypto pki certificate trustpoint name Displays information about the certificate for the trust
point.
Procedure
Step 3 crypto pki trustpoint server name Declares the trustpoint and a given name and enters
ca-trustpoint configuration mode.
Step 4 enrollment url url name pem Specifies the URL of the CA on which your device should
send certificate requests.
An IPv6 address can be added in the URL enclosed in
brackets. For example: http:// [2001:DB8:1:1::1]:80.
The pem keyword adds privacy-enhanced mail (PEM)
boundaries to the certificate request.
Step 5 rsakeypair label Specifies which key pair to associate with the certificate.
Step 6 serial-number none The none keyword specifies that a serial number will not
be included in the certificate request.
Step 7 ip-address none The none keyword specifies that no IP address should be
included in the certificate request.
Step 8 revocation-check crl Specifies CRL as the method to ensure that the certificate
of a peer has not been revoked.
Step 10 crypto pki authenticate name Retrieves the CA certificate and authenticates it.
Step 11 crypto pki enroll name Generates certificate request and displays the request for
copying and pasting into the certificate server.
Enter enrollment information when you are prompted. For
example, specify whether to include the device FQDN and
IP address in the certificate request.
You are also given the choice about displaying the
certificate request to the console terminal.
The base-64 encoded certificate with or without PEM
headers as requested is displayed.
Step 12 crypto pki import name certificate Imports a certificate via TFTP at the console terminal,
which retrieves the granted certificate.
The device attempts to retrieve the granted certificate via
TFTP using the same filename used to send the request,
except the extension is changed from “.req” to “.crt”. For
usage key certificates, the extensions “-sign.crt” and
“-encr.crt” are used.
The device parses the received files, verifies the
certificates, and inserts the certificates into the internal
certificate database on the switch.
Step 14 show crypto pki certificate trustpoint name Displays information about the certificate for the trust
point.
Step 15 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Step 5 radius server name Specifies the name of the RADIUS server configuration
for Protected Access Credential (PAC) provisioning and
enters RADIUS server configuration mode.
Step 6 address ip-address auth-port port-number acct-port Configures the IPv4 address for the RADIUS server
port-number accounting and authentication parameters.
Step 7 automate-tester username username Enables the automated testing feature for the RADIUS
server.
With this practice, the device sends periodic test
authentication messages to the RADIUS server. It looks
for a RADIUS response from the server. A success
message is not necessary - a failed authentication suffices,
because it shows that the server is alive.
Step 8 key string Configures the authentication and encryption key for all
RADIUS communications between the device and the
RADIUS server.
Step 11 aaa group server radius group-name Groups different RADIUS server hosts into distinct lists
and distinct methods, and enters server group configuration
mode.
Step 14 aaa authentication dot1x default group group-name Sets the default authentication server group for IEEE
802.1x.
Step 15 aaa authorization network default group group-name Sets the network authorization default group.
Step 3 eap profile profile-name Configures EAP profile and enters EAP profile
configuration mode.
Step 7 dot1x credentials profile-name Configures 802.1x credentials profile and enters dot1x
credentials configuration mode.
Procedure
Step 3 interface interface-id Identifies the MACsec interface, and enter interface
configuration mode. The interface must be a physical
interface.
Step 7 access-session host-mode multi-domain Allows hosts to gain access to the interface.
Step 10 dot1x pae both Configures the port as an 802.1X port access entity (PAE)
supplicant and authenticator.
Step 11 dot1x credentials profile Assigns a 802.1x credentials profile to the interface.
Step 12 dot1x supplicant eap profile name Assigns the EAP-TLS profile to the interface.
Step 13 service-policy type control subscriber control-policy Applies a subscriber control policy to the interface.
name
Step 14 exit Returns to privileged EXEC mode.
Step 15 show macsec interface Displays MACsec details for the interface.
Step 16 copy running-config startup-config (Optional) Saves your entries in the configuration file.
Step 4 aaa local authentication default authorization default Sets the default local authentication and default local
authorization method.
Step 5 aaa authentication dot1x default local Sets the default local username authentication list for IEEE
802.1x.
Step 6 aaa authorization network default local Sets an authorization method list for local user.
Step 7 aaa authorization credential-download default local Sets an authorization method list for use of local credentials.
Step 4 dot1x credentials profile-name Configures the dot1x credentials profile and enters dot1x
credentials configuration mode.
Step 5 username name password password Sets the authentication user ID and password.
Step 7 aaa attribute list list-name (Optional) Sets the AAA attribute list definition and enters
attribute list configuration mode.
Step 8 aaa attribute type linksec-policy must-secure (Optional) Specifies the AAA attribute type.
Procedure
Step 3 crypto pki trustpoint server name Declares the trustpoint and a given name and enters
ca-trustpoint configuration mode.
Step 4 enrollment url url name pem Specifies the URL of the CA on which your device should
send certificate requests.
An IPv6 address can be added in the URL enclosed in
brackets. For example: http:// [2001:DB8:1:1::1]:80.
The pem keyword adds privacy-enhanced mail (PEM)
boundaries to the certificate request.
Step 5 rsakeypair label Specifies which key pair to associate with the certificate.
Note The rsakeypair name must match the
trust-point name.
Step 6 serial-number none The none keyword specifies that a serial number will not
be included in the certificate request.
Step 7 ip-address none The none keyword specifies that no IP address should be
included in the certificate request.
Step 8 revocation-check crl Specifies CRL as the method to ensure that the certificate
of a peer has not been revoked.
Step 10 crypto pki authenticate name Retrieves the CA certificate and authenticates it.
Step 12 show crypto pki certificate trustpoint name Displays information about the certificate for the trust
point.
Procedure
Step 3 crypto pki trustpoint server name Declares the trustpoint and a given name and enters
ca-trustpoint configuration mode.
Step 4 enrollment url url name pem Specifies the URL of the CA on which your device should
send certificate requests.
An IPv6 address can be added in the URL enclosed in
brackets. For example: http:// [2001:DB8:1:1::1]:80.
The pem keyword adds privacy-enhanced mail (PEM)
boundaries to the certificate request.
Step 6 serial-number none The none keyword specifies that a serial number will not
be included in the certificate request.
Step 7 ip-address none The none keyword specifies that no IP address should be
included in the certificate request.
Step 8 revocation-check crl Specifies CRL as the method to ensure that the certificate
of a peer has not been revoked.
Step 10 crypto pki authenticate name Retrieves the CA certificate and authenticates it.
Step 11 crypto pki enroll name Generates certificate request and displays the request for
copying and pasting into the certificate server.
Enter enrollment information when you are prompted. For
example, specify whether to include the device FQDN and
IP address in the certificate request.
You are also given the choice about displaying the
certificate request to the console terminal.
The base-64 encoded certificate with or without PEM
headers as requested is displayed.
Step 12 crypto pki import name certificate Imports a certificate via TFTP at the console terminal,
which retrieves the granted certificate.
The device attempts to retrieve the granted certificate via
TFTP using the same filename used to send the request,
except the extension is changed from “.req” to “.crt”. For
usage key certificates, the extensions “-sign.crt” and
“-encr.crt” are used.
The device parses the received files, verifies the
certificates, and inserts the certificates into the internal
certificate database on the switch.
Note Some CAs ignore the usage key information in
the certificate request and issue general purpose
usage certificates. If your CA ignores the usage
key information in the certificate request, only
import the general purpose certificate. The
router will not use one of the two key pairs
generated.
Step 14 show crypto pki certificate trustpoint name Displays information about the certificate for the trust
point.
Step 3 eap profile profile-name Configures EAP profile and enters EAP profile
configuration mode.
Step 7 dot1x credentials profile-name Configures 802.1x credentials profile and enters dot1x
credentials configuration mode.
Procedure
Step 3 interface interface-id Identifies the MACsec interface, and enter interface
configuration mode. The interface must be a physical
interface.
Step 7 access-session host-mode multi-domain Allows hosts to gain access to the interface.
Step 10 dot1x pae both Configures the port as an 802.1X port access entity (PAE)
supplicant and authenticator.
Step 11 dot1x credentials profile Assigns a 802.1x credentials profile to the interface.
Step 12 dot1x authenticator eap profile name Assigns the EAP-TLS authenticator profile to the interface.
Step 13 dot1x supplicant eap profile name Assigns the EAP-TLS supplicant profile to the interface.
Step 14 service-policy type control subscriber control-policy Applies a subscriber control policy to the interface.
name
Step 15 exit Returns to privileged EXEC mode.
Step 16 show macsec interface Displays MACsec details for the interface.
Step 17 copy running-config startup-config (Optional) Saves your entries in the configuration file.
The show mka sessions command displays a summary of active MACsec Key Agreement (MKA)
Protocol sessions.
====================================================================================================
Interface Local-TxSCI Policy-Name Inherited Key-Server
====================================================================================================
Te0/1/3 74a2.e625.4413/0013 *DEFAULT POLICY* NO YES
19 74a2.e625.4c22/0012 1 Secured
1000000000000000000000000000000000000000000000000000000000000000
The show macsec status interface interface-id displays MACsec status information for the given
interface.
Capabilities:
Ciphers Supported: GCM-AES-128 GCM-AES-256
Cipher: GCM-AES-128
Confidentiality Offset: 0
Replay Window: 64
Delay Protect Enable: FALSE
Access Control: must-secure
Transmit SC:
SCI: 74A2E6254C220012
Transmitting: TRUE
Transmit SA:
Next PN: 412
Delay Protect AN/nextPN: 99/0
Receive SC:
SCI: 74A2E62544130013
Receiving: TRUE
Receive SA:
Next PN: 64
AN: 0
Delay Protect AN/LPN: 0/0
The show access-session interface interface-id details displays detailed information about the access
session for the given interface.
Interface: TenGigabitEthernet1/0/1
IIF-ID: 0x17298FCD
MAC Address: f8a5.c592.13e4
IPv6 Address: Unknown
IPv4 Address: Unknown
User-Name: DOT1XCRED
Status: Authorized
Domain: DATA
Oper host mode: multi-host
Oper control dir: both
Session timeout: N/A
Common Session ID: 000000000000000BB72E8AFA
Acct Session ID: Unknown
Handle: 0xc3000001
Current Policy: MUSTS_1
Local Policies:
Security Policy: Must Secure
Security Status: Link Secured
Server Policies:
Method State
dot1xSup Authc Success
dot1x Authc Success
aaa new-model
dot1x system-auth-control
radius server ISE
address ipv4 <ISE ipv4 address> auth-port 1645 acct-port 1646
automate-tester username dummy
key dummy123
radius-server deadtime 2
!
aaa group server radius ISEGRP
server name ISE
!
aaa authentication dot1x default group ISEGRP
aaa authorization network default group ISEGRP
interface TenGigabitEthernet0/1
macsec network-link
authentication periodic
authentication timer reauthenticate <reauthentication interval>
access-session host-mode multi-host
access-session closed
access-session port-control auto
dot1x pae both
dot1x credentials EAPTLSCRED-IOSCA
dot1x supplicant eap profile EAPTLS-PROF-IOSCA
service-policy type control subscriber DOT1X_POLICY_RADIUS
Additional References
Related Documents
Standard/RFC Title
Technical Assistance
Description Link