Media Access Control Security (MACsec) on Chassis Cluster
Media Access Control Security (MACsec) is an industry-standard security technology that provides secure communication for all traffic on Ethernet links. For more information, see the following topics:
Understanding Media Access Control Security (MACsec)
Media Access Control Security (MACsec) is an industry-standard security technology that provides secure communication for all traffic on Ethernet links. MACsec provides point-to-point security on Ethernet links between directly connected nodes and is capable of identifying and preventing most security threats, including denial of service, intrusion, man-in-the-middle, masquerading, passive wiretapping, and playback attacks.
MACsec allows you to secure an Ethernet link for almost all traffic, including frames from the Link Layer Discovery Protocol (LLDP), Link Aggregation Control Protocol (LACP), Dynamic Host Configuration Protocol (DHCP), Address Resolution Protocol (ARP), and other protocols that are not typically secured on an Ethernet link because of limitations with other security solutions. MACsec can be used in combination with other security protocols such as IP Security (IPsec) and Secure Sockets Layer (SSL) to provide end-to-end network security.
Starting in Junos OS Release 15.1X49-D60, Media Access Control Security(MACsec) is supported on control and fabric ports of SRX340 and SRX345 devices in chassis cluster mode.
Starting in Junos OS Release 20.1R1, MACsec is supported on control ports, fabric ports and revenue ports of SRX380 devices in chassis cluster mode to secure the traffic. MACsec is supported on 16X1Gigabit Ethernet ports (ge-0/0/0 to ge-0/0/15) and 4X10Gigabit Ethernet ports (xe-0/0/16 to xe-0/0/19).
Starting in Junos OS Release 17.4R1, MACsec is supported on HA control and fabric ports of SRX4600 devices in chassis cluster mode.
For SRX1600, SRX2300, and SRX4300 devices, MACsec is supported on dual control ports in chassis cluster mode.
This topic contains the following sections:
- How MACsec Works
- Understanding Connectivity Associations and Secure Channels
- Understanding Static Connectivity Association Key Security Mode
- MACsec Considerations
How MACsec Works
To determine if a feature is supported by a specific platform or Junos OS release, see Feature Explorer.
MACsec provides industry-standard security through the use of secured point-to-point Ethernet links. The point-to-point links are secured after matching security keys. When you enable MACsec using static connectivity association key (CAK) security mode, user-configured pre-shared keys are exchanged and verified between the interfaces at each end of the point-to-point Ethernet link.
Once MACsec is enabled on a point-to-point Ethernet link, all traffic traversing the link is MACsec-secured through the use of data integrity checks and, if configured, encryption.
The data integrity checks verify the integrity of the data. MACsec appends an 8-byte header and a 16-byte tail to all Ethernet frames traversing the MACsec-secured point-to-point Ethernet link, and the header and tail are checked by the receiving interface to ensure that the data was not compromised while traversing the link. If the data integrity check detects anything irregular about the traffic, the traffic is dropped.
MACsec can also be used to encrypt all traffic on the Ethernet link. The encryption used by MACsec ensures that the data in the Ethernet frame cannot be viewed by anybody monitoring traffic on the link.
Encryption is enabled for all traffic entering or leaving the interface when MACsec is enabled using static CAK security mode, by default.
MACsec is configured on point-to-point Ethernet links between MACsec-capable interfaces. If you want to enable MACsec on multiple Ethernet links, you must configure MACsec individually on each point-to-point Ethernet link.
Understanding Connectivity Associations and Secure Channels
MACsec is configured in connectivity associations. MACsec is enabled when a connectivity association is assigned to an interface.
When you enable MACsec using static CAK or dynamic security mode, you have to create and configure a connectivity association. Two secure channels—one secure channel for inbound traffic and another secure channel for outbound traffic—are automatically created. The automatically-created secure channels do not have any user-configurable parameters; all configuration is done in the connectivity association outside of the secure channels.
Understanding Static Connectivity Association Key Security Mode
When you enable MACsec using static connectivity association key (CAK) security mode, two security keys—a connectivity association key (CAK) that secures control plane traffic and a randomly-generated secure association key (SAK) that secures data plane traffic—are used to secure the point-to-point Ethernet link. Both keys are regularly exchanged between both devices on each end of the point-to-point Ethernet link to ensure link security.
You initially establish a MACsec-secured link using a pre-shared key when you are using static CAK security mode to enable MACsec. A pre-shared key includes a connectivity association name (CKN) and it’s own connectivity association key (CAK). The CKN and CAK are configured by the user in the connectivity association and must match on both ends of the link to initially enable MACsec.
Once matching pre-shared keys are successfully exchanged, the MACsec Key Agreement (MKA) protocol is enabled. The MKA protocol is responsible for maintaining MACsec on the link, and decides which switch on the point-to-point link becomes the key server. The key server then creates an SAK that is shared with the switch at the other end of the point-to-point link only, and that SAK is used to secure all data traffic traversing the link. The key server will continue to periodically create and share a randomly-created SAK over the point-to-point link for as long as MACsec is enabled.
You enable MACsec using static CAK security mode by configuring a connectivity association on both ends of the link. All configuration is done within the connectivity association but outside of the secure channel. Two secure channels—one for inbound traffic and one for outbound traffic—are automatically created when using static CAK security mode. The automatically-created secure channels do not have any user-configurable parameters that cannot already be configured in the connectivity association.
We recommend enabling MACsec using static CAK security mode. Static CAK security mode ensures security by frequently refreshing to a new random security key and by only sharing the security key between the two devices on the MACsec-secured point-to-point link. Additionally, some optional MACsec features—replay protection, SCI tagging, and the ability to exclude traffic from MACsec—are only available when you enable MACsec using static CAK security mode.
Starting with Junos OS Release 15.1X49-D60 and Junos OS Release 17.3R1,
for SRX Series Firewalls supporting MACsec on HA control
and fabric links,
if the command
restart 802.1x-protocol-daemon
is run on the primary node, the chassis
cluster control and fabric links will flap causing the cluster nodes to enter into split
brain mode.
MACsec Considerations
All types of Spanning Tree Protocol frames cannot currently be encrypted using MACsec.
The connectivity association can be defined anywhere, either global or node specific or any other configuration group as long as it is visible to the MACsec interface configuration.
For MACsec configurations, identical configurations must exist on both the ends. That is, each node should contain the same configuration as the other node. If the other node is not configured or improperly configured with MACsec on the other side, the port is disabled and stops forwarding the traffic.
SRX340, SRX345, and SRX380 devices support MACsec for host-to-host or switch-to-host connections.
SRX4600 devices currently do not support MACsec for host-to-host connections. Macsec is supported only on dedicated fab ports and is not supported if any ther traffic port is used as fab.
On SRX340, SRX345, and SRX380 devices, fabric interfaces must be configured such that the Media Access Control Security (MACsec) configurations are local to the nodes. Otherwise, the fabric link will not be reachable.
Configure Media Access Control Security (MACsec)
This topic shows how to configure MACsec on control and fabric ports of supported SRX Series Firewall in chassis cluster to secure point-to-point Ethernet links between the peer devices in a cluster. Each point-to-point Ethernet link that you want to secure using MACsec must be configured independently. You can enable MACsec encryption on device-to-device links using static connectivity association key (CAK) security mode.
The configuration steps for both processes are provided in this document.
- Configuration Considerations When Configuring MACsec on Chassis Cluster Setup
- Configure MACsec Using Static Connectivity Association Key Security Mode
- Configure Static CAK on the Chassis Cluster Control Port
- Configure Static CAK on the Chassis Cluster Fabric Port
- Configure Static CAK on the Control Port for SRX1600, SRX2300, and SRX4300 Devices
- Configure Static CAK on the Control Port for SRX4600
- Verify MACSEC Configuration
Configuration Considerations When Configuring MACsec on Chassis Cluster Setup
Before you begin, follow these steps to configure MACsec on control ports:
- If the chassis cluster is already up, disable it by using the
set chassis cluster disable
command and reboot both nodes. - Configure MACsec on the control port with its attributes as described in the following sections Configure Static CAK on the Chassis Cluster Control Port. Both nodes must be configured independently with identical configurations.
- Enable the chassis cluster by using
set chassis cluster cluster-id id
on both of the nodes. Reboot both nodes.
Control port states affect the integrity of a chassis cluster. Consider the following when configuring MACsec on control ports:
-
Any new MACsec chassis cluster port configurations or modifications to existing MACsec chassis cluster port configurations will require the chassis cluster to be disabled and displays a warning message
Modifying cluster control port CA will break chassis cluster
. Once disabled, you can apply the preceding configurations and enable the chassis cluster. -
By default, chassis clusters synchronize all configurations. Correspondingly, you must monitor that synchronization does not lead to loss of any MACsec configurations. Otherwise, the chassis cluster will break. For example, for nonsymmetric, node-specific MACsec configurations, identical configurations should exist on both ends. That is, each node should contain the same configuration as the other node.
The ineligible timer is 300 seconds when MACsec on the chassis cluster control port is enabled on SRX340, SRX345, and SRX380 devices.
If both control link fail, Junos OS changes the operating state of the secondary node to ineligible for a 180 seconds. When MACsec is enabled on the control port, the ineligibility duration is 200 seconds for SRX4600 devices.
The initial hold timer is extended from 30 seconds to 120 seconds in chassis clusters on SRX340, SRX345, and SRX380 devices.
For any change in the MACsec configurations of control ports, the steps mentioned above must be repeated.
Consider the following when configuring MACsec on fabric ports:
Configuring MACsec leads to link state changes that can affect traffic capability of the link. When you configure fabric ports, keep the effective link state in mind. Incorrect MACsec configuration on both ends of the fabric links can move the link to an ineligible state. Note the following key points about configuring fabric links:
-
Both ends of the links must be configured simultaneously when the chassis cluster is formed.
-
Incorrect configuration can lead to fabric failures and errors in fabric recovery logic.
Because of potential link failure scenarios, we recommend that fabric links be configured during formation of the chassis cluster.
Configure MACsec Using Static Connectivity Association Key Security Mode
You can enable MACsec encryption by using static connectivity association key (CAK) security mode on a point-to-point Ethernet link connecting devices. This procedure shows you how to configure MACsec using static CAK security mode.
For SRX340 and SRX345 devices, ge-0/0/0 is a fabric port and ge-0/0/1 is a control port for the chassis cluster and assigned as cluster-control-port 0.
For configuring MACsec on cluster-control-port
and
cluster-data-port
on SRX380 devices, the node must be in
standalone node. The MACsec configuration is applied on both the nodes and the nodes
are rebooted to chassis cluster mode.
For SRX380 devices, ge-0/0/0 is a fabric port and ge-0/0/15 is a control port for the chassis cluster..
For SRX4600 devices, dedicated control and fabric ports are available. MACsec on control link can be configured on dedicated control ports (control port 0 [em0] and port 1 [em1]). Macsec on fabric links can be configured only on dedicated fabric ports port 2 and port 3 of fpc0 pic0 (e.g. xe-0/0/2 and xe-0/0/3), similarly on port-2 and port-3 of fpc7 pic0.
For SRX1600 devices, dedicated dual control ports em0/em1 and dual fabric ports are available.
For SRX2300 devices, dual control ports em0/em1 and dual fabric ports are available.
Both SRX1600, SRX2300, and SRX4300 devices support dual control ports with MACsec configuration.
MACsec on dual control link is configured on control port 0 [em0] and control port 1 [em1]. MACsec configured on revenue interfaces is used for forming fabric links. Fabric links are configured on fabric ports (mge-0/0/1 and mge-7/0/1).
To configure MACsec by using static CAK security mode to secure a device-to-device Ethernet link:
MACsec using static CAK security mode is not enabled until a connectivity association on the opposite end of the link is also configured, and contains preshared keys that match on both ends of the link.
Configure Static CAK on the Chassis Cluster Control Port
To establish a CA over a chassis cluster control link on two SRX345 devices.
Configure Static CAK on the Chassis Cluster Fabric Port
To establish a connectivity association over a chassis cluster fabric link on two SRX345 devices:
Configure Static CAK on the Control Port for SRX1600, SRX2300, and SRX4300 Devices
To configure a connectivity association over a chassis cluster control link on two SRX1600 devices or two SRX2300 devices or SRX4300 devices.
To view the status of the active MACsec connections, run the show security macsec connections command.
user@host> show security macsec connections Interface name: em0 CA name: ca1 Cipher suite: GCM-AES-128 Encryption: on Key server offset: 0 Include SCI: no Replay protect: off Replay window: 0 Outbound secure channels SC Id: 02:00:00:01:01:04/1 Outgoing packet number: 1914287 Secure associations AN: 0 Status: inuse Create time: 07:33:26 Inbound secure channels SC Id: 02:00:00:02:01:04/1 Secure associations AN: 0 Status: inuse Create time: 07:33:26 Interface name: em1 CA name: ca1 Cipher suite: GCM-AES-128 Encryption: on Key server offset: 0 Include SCI: no Replay protect: off Replay window: 0 Outbound secure channels SC Id: 02:00:01:01:01:04/1 Outgoing packet number: 108885 Secure associations AN: 0 Status: inuse Create time: 07:33:26 Inbound secure channels SC Id: 02:00:01:02:01:04/1 Secure associations AN: 0 Status: inuse Create time: 07:33:26
To view the MACsec key agreement session information, run the show security mka sessions command.
user@host> show security mka sessions Interface name: em0 Interface State: Secured - Primary Member identifier: 7A3FC14B77F5296124A8D22A CAK name: 12345678 CAK type: primary Security mode: static MKA suspended: 0(s) Transmit interval: 10000(ms) SAK rekey interval: 0(s) Preceding Key: enabled Bounded Delay: disabled Outbound SCI: 02:00:00:01:01:04/1 Message number: 2713 Key number: 1 MKA ICV Indicator: enabled Key server: yes Key server priority: 16 Latest SAK AN: 0 Latest SAK KI: 7A3FC14B77F5296124A8D22A/1 MKA Suspend For: disabled MKA Suspend On Request: disabled Previous SAK AN: 0 Previous SAK KI: 000000000000000000000000/0 Peer list 1. Member identifier: 6A9B3CC75376160D74AAA1E7 (live) Message number: 2711 Hold time: 57000 (ms) SCI: 02:00:00:02:01:04/1 Uptime: 07:31:39 Lowest acceptable PN: 1674733 Interface name: em1 Interface State: Secured - Primary Member identifier: 989CB809BF3759C9EAC10F5A CAK name: 12345678 CAK type: primary Security mode: static MKA suspended: 0(s) Transmit interval: 10000(ms) SAK rekey interval: 0(s) Preceding Key: enabled Bounded Delay: disabled Outbound SCI: 02:00:01:01:01:04/1 Message number: 2713 Key number: 1 MKA ICV Indicator: enabled Key server: yes Key server priority: 16 Latest SAK AN: 0 Latest SAK KI: 989CB809BF3759C9EAC10F5A/1 MKA Suspend For: disabled MKA Suspend On Request: disabled Previous SAK AN: 0 Previous SAK KI: 000000000000000000000000/0 Peer list 1. Member identifier: 16015BCD3844F12DFA89AB7F (live) Message number: 2711 Hold time: 57000 (ms) SCI: 02:00:01:02:01:04/1 Uptime: 07:31:39 Lowest acceptable PN: 111017
To view the security status of control and fabric ports. MACsec is enabled for both control port 0 and control port 1, run the show chassis cluster interfaces command.
user@host> show chassis cluster interfaces Control link status: Up Control interfaces: Index Interface Monitored-Status Internal-SA Security 0 em0 Up Disabled Enabled 1 em1 Up Disabled Enabled Fabric link status: Up Fabric interfaces: Name Child-interface Status Security (Physical/Monitored) fab0 et-0/3/0 Up / Up Disabled fab0 et-0/3/1 Up / Up Disabled fab1 et-7/3/0 Up / Up Disabled fab1 et-7/3/1 Up / Up Disabled Redundant-pseudo-interface Information: Name Status Redundancy-group lo0 Up 0
Configure Static CAK on the Control Port for SRX4600
Use this procedure to establish a CA over a chassis cluster control link on two SRX4600 devices.
Verify MACSEC Configuration
To confirm that the configuration provided in Configure Static CAK on the Control Port for SRX4600 is working properly, perform these tasks:
- Display the Status of Active MACsec Connections on the Device
- Display MACsec Key Agreement (MKA) Session Information
- Verify the MACsec-Secured Traffic Is Traversing Through the Interface
- Verify Chassis Cluster Ports Are Secured with MACsec Configuration
Display the Status of Active MACsec Connections on the Device
Purpose
Verify that MACsec is operational on the chassis cluster setup.
Action
From the operational mode, enter the show security macsec connections
interface interface-name
command on one or
both of the nodes of chassis cluster setup.
{primary:node0}[edit]
user@host# show security macsec connections
Interface name: em0 CA name: ca1 Cipher suite: GCM-AES-128 Encryption: on Key server offset: 0 Include SCI: no Replay protect: off Replay window: 0 Outbound secure channels SC Id: 02:00:00:01:01:04/1 Outgoing packet number: 1 Secure associations AN: 3 Status: inuse Create time: 00:01:43 Inbound secure channels SC Id: 02:00:00:02:01:04/1 Secure associations AN: 3 Status: inuse Create time: 00:01:43
Meaning
The Interface name
and CA name
outputs show
that the MACsec connectivity association is operational on the interface
em0. The output does not appear when the connectivity association is not
operational on the interface.
Display MACsec Key Agreement (MKA) Session Information
Purpose
Display MACsec Key Agreement (MKA) session information for all interfaces.
Action
From the operational mode, enter the show security mka
sessions
command.
user@host> show security mka sessions
Interface name: em0
Member identifier: B51CXXXX2678A7F5F6C12345
CAK name: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Transmit interval: 10000(ms)
Outbound SCI: 02:00:00:01:01:04/1
Message number: 270 Key number: 8
Key server: yes Key server priority: 16
Latest SAK AN: 3 Latest SAK KI: B51C8XXX2678A7A5B6C54321/8
Previous SAK AN: 0 Previous SAK KI: 000000000000000000000000/0
Peer list
1. Member identifier: 0413427B38817XXXXF054321 (live)
Message number: 8 Hold time: 59000 (ms)
SCI: 02:00:00:02:01:04/1
Lowest acceptable PN: 0
Meaning
The outputs show the status of MKA sessions.
Verify the MACsec-Secured Traffic Is Traversing Through the Interface
Purpose
Verify that traffic traversing through the interface is MACsec-secured.
Action
From the operational mode, enter the show security macsec
statistics
command.
user@host> show security macsec statistics interface em0 detail
Interface name: em0
Secure Channel transmitted
Encrypted packets: 2397305
Encrypted bytes: 129922480
Protected packets: 0
Protected bytes: 0
Secure Association transmitted
Encrypted packets: 2397305
Protected packets: 0
Secure Channel received
Accepted packets: 2395850
Validated bytes: 0
Decrypted bytes: 131715088
Secure Association received
Accepted packets: 2395850
Validated bytes: 0
Decrypted bytes: 0
Meaning
The Encrypted packets
line under the Secure Channel
transmitted
field are the values incremented each time a packet
is sent from the interface that is secured and encrypted by MACsec.
The Accepted packets
line under the Secure
Association received
field are the values incremented each time
a packet that has passed the MACsec integrity check is received on the
interface. The Decrypted bytes
line under the
Secure Association received
output is incremented each
time an encrypted packet is received and decrypted.
Verify Chassis Cluster Ports Are Secured with MACsec Configuration
Purpose
Verify that MACsec is configured on chassis cluster ports.
Action
From operational mode, enter the show chassis cluster
interfaces
command.
user@host> show chassis cluster interfaces
Control link status: Up
Control interfaces:
Index Interface Monitored-Status Internal-SA Security
0 em0 Up Disabled Enabled
Fabric link status: Up
Fabric interfaces:
Name Child-interface Status Security
(Physical/Monitored)
fab0 xe-1/1/6 Up / Up Enabled
fab0
fab1 xe-8/1/6 Up / Up Enabled
fab1
Redundant-ethernet Information:
Name Status Redundancy-group
reth0 Up 1
reth1 Up 2
reth2 Down Not configured
reth3 Down Not configured
reth4 Down Not configured
reth5 Down Not configured
reth6 Down Not configured
reth7 Down Not configured
Redundant-pseudo-interface Information:
Name Status Redundancy-group
lo0 Up 0
Meaning
The Security
line under the Control
interfaces
output for em0 interface shown as
Secured
means that the traffic sent from the em0
interface is secured and encrypted by MACsec.
You can also use the show chassis cluster status
command to
display the current status of the chassis cluster.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.