Skip to content

Commit 97ce96c

Browse files
authored
Merge pull request #222500 from duongau/macsec
ExpressRoute - Configure MACsec on ExpressRoute Direct ports - freshness review
2 parents 384d5c8 + 1420b84 commit 97ce96c

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

articles/expressroute/expressroute-howto-macsec.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ title: 'Azure ExpressRoute: Configure MACsec'
33
description: This article helps you configure MACsec to secure the connections between your edge routers and Microsoft's edge routers.
44
services: expressroute
55
author: duongau
6-
76
ms.service: expressroute
87
ms.topic: how-to
9-
ms.date: 10/22/2019
8+
ms.date: 12/27/2022
109
ms.author: duau
1110
ms.custom: devx-track-azurepowershell
1211

@@ -36,7 +35,7 @@ To start the configuration, sign in to your Azure account and select the subscri
3635

3736
[!INCLUDE [sign in](../../includes/expressroute-cloud-shell-connect.md)]
3837

39-
## 1. Create Azure Key Vault, MACsec secrets, and user identity
38+
## Create Azure Key Vault, MACsec secrets, and user identity
4039

4140
1. Create a Key Vault instance to store MACsec secrets in a new resource group.
4241

@@ -45,29 +44,29 @@ To start the configuration, sign in to your Azure account and select the subscri
4544
$keyVault = New-AzKeyVault -Name "your_key_vault_name" -ResourceGroupName "your_resource_group" -Location "resource_location" -SoftDeleteRetentionInDays 90
4645
```
4746
48-
If you already have a key vault or a resource group, you can reuse them. However, it is critical that you enable the [**soft-delete** feature](../key-vault/general/soft-delete-overview.md) on your existing key vault. If soft-delete is not enabled, you can use the following commands to enable it:
47+
If you already have a Key Vault or a resource group, you can reuse them. However, it's critical that you enable the [**soft-delete** feature](../key-vault/general/soft-delete-overview.md) on your existing Key Vault. If soft-delete isn't enabled, run the following commands to enable it:
4948
5049
```azurepowershell-interactive
5150
($resource = Get-AzResource -ResourceId (Get-AzKeyVault -VaultName "your_existing_keyvault").ResourceId).Properties | Add-Member -MemberType "NoteProperty" -Name "enableSoftDelete" -Value "true"
5251
Set-AzResource -resourceid $resource.ResourceId -Properties $resource.Properties
5352
```
5453
5554
> [!NOTE]
56-
> The Key Vault shouldn't be behind a private endpoint because communicate to the ExpressRoute management plane is required.
55+
> The Key Vault shouldn't be behind a private endpoint because communication to the ExpressRoute management plane is required.
5756
>
5857
59-
2. Create a user identity.
58+
1. Create a user identity.
6059
6160
```azurepowershell-interactive
6261
$identity = New-AzUserAssignedIdentity -Name "identity_name" -Location "resource_location" -ResourceGroupName "your_resource_group"
6362
```
6463
65-
If New-AzUserAssignedIdentity is not recognized as a valid PowerShell cmdlet, install the following module (in Administrator mode) and rerun the above command.
64+
If New-AzUserAssignedIdentity isn't recognized as a valid PowerShell cmdlet, install the following module (in Administrator mode) and rerun the above command.
6665
6766
```azurepowershell-interactive
6867
Install-Module -Name Az.ManagedServiceIdentity
6968
```
70-
3. Create a connectivity association key (CAK) and a connectivity association key name (CKN) and store them in the key vault.
69+
1. Create a connectivity association key (CAK) and a connectivity association key name (CKN) and store them in the Key Vault.
7170
7271
```azurepowershell-interactive
7372
$CAK = ConvertTo-SecureString "your_key" -AsPlainText -Force
@@ -79,30 +78,29 @@ To start the configuration, sign in to your Azure account and select the subscri
7978
> CKN must be an even-length string up to 64 hexadecimal digits (0-9, A-F).
8079
>
8180
> CAK length depends on cipher suite specified:
82-
>
8381
> * For GcmAes128, the CAK must be an even-length string up to 32 hexadecimal digits (0-9, A-F).
84-
>
8582
> * For GcmAes256, the CAK must be an even-length string up to 64 hexadecimal digits (0-9, A-F).
8683
>
8784
88-
4. Assign the GET permission to the user identity.
85+
1. Assign the GET permission to the user identity.
8986
9087
```azurepowershell-interactive
9188
Set-AzKeyVaultAccessPolicy -VaultName "your_key_vault_name" -PermissionsToSecrets get -ObjectId $identity.PrincipalId
9289
```
9390
94-
Now this identity can get the secrets, for example CAK and CKN, from the key vault.
95-
5. Set this user identity to be used by ExpressRoute.
91+
Now this identity can get the secrets, for example CAK and CKN, from the Key Vault.
92+
93+
1. Set this user identity to be used by ExpressRoute.
9694
9795
```azurepowershell-interactive
9896
$erIdentity = New-AzExpressRoutePortIdentity -UserAssignedIdentityId $identity.Id
9997
```
10098
101-
## 2. Configure MACsec on ExpressRoute Direct ports
99+
## Configure MACsec on ExpressRoute Direct ports
102100
103101
### To enable MACsec
104102
105-
Each ExpressRoute Direct instance has two physical ports. You can choose to enable MACsec on both ports at the same time or enable MACsec on one port at a time. Doing it one port at time (by switching traffic to an active port while servicing the other port) can help minimize the interruption if your ExpressRoute Direct is already in service.
103+
Each ExpressRoute Direct instance has two physical ports. You can choose to enable MACsec on both ports at the same time or enable MACsec one port at a time. Doing it one port at time by switching traffic to an active port while servicing the other port can help minimize the interruption if your ExpressRoute Direct is already in service.
106104
107105
> [!NOTE]
108106
> You can configure both XPN and Non-XPN ciphers:
@@ -111,7 +109,6 @@ Each ExpressRoute Direct instance has two physical ports. You can choose to enab
111109
> * GcmAesXpn128
112110
> * GcmAesXpn256
113111
>
114-
>
115112
116113
1. Set MACsec secrets and cipher and associate the user identity with the port so that the ExpressRoute management code can access the MACsec secrets if needed.
117114
@@ -126,7 +123,7 @@ Each ExpressRoute Direct instance has two physical ports. You can choose to enab
126123
$erDirect.identity = $erIdentity
127124
Set-AzExpressRoutePort -ExpressRoutePort $erDirect
128125
```
129-
2. (Optional) If the ports are in Administrative Down state you can run the following commands to bring up the ports.
126+
1. (Optional) If the ports are in Administrative Down state you can run the following commands to bring up the ports.
130127
131128
```azurepowershell-interactive
132129
$erDirect = Get-AzExpressRoutePort -ResourceGroupName "your_resource_group" -Name "your_direct_port_name"
@@ -135,9 +132,9 @@ Each ExpressRoute Direct instance has two physical ports. You can choose to enab
135132
Set-AzExpressRoutePort -ExpressRoutePort $erDirect
136133
```
137134
138-
At this point, MACsec is enabled on the ExpressRoute Direct ports on Microsoft side. If you haven't configured it on your edge devices, you can proceed to configure them with the same MACsec secrets and cipher.
135+
MACsec is now enabled on the ExpressRoute Direct ports on Microsoft side. If you haven't configured it on your edge devices, you can proceed to configure them with the same MACsec secrets and cipher.
139136
140-
3. (Optional) You can enable Secure Channel Identifier (SCI) on the ports.
137+
1. (Optional) You can enable Secure Channel Identifier (SCI) on the ports.
141138
142139
```azurepowershell-interactive
143140
$erDirect = Get-AzExpressRoutePort -ResourceGroupName "your_resource_group" -Name "your_direct_port_name"
@@ -146,7 +143,7 @@ Each ExpressRoute Direct instance has two physical ports. You can choose to enab
146143
Set-AzExpressRoutePort -ExpressRoutePort $erDirect
147144
```
148145
149-
At this point, SCI is enabled on the ExpressRoute Direct ports.
146+
SCI is now enabled on the ExpressRoute Direct ports.
150147
151148
### To disable MACsec
152149
@@ -162,12 +159,13 @@ $erDirect.identity = $null
162159
Set-AzExpressRoutePort -ExpressRoutePort $erDirect
163160
```
164161

165-
At this point, MACsec is disabled on the ExpressRoute Direct ports on the Microsoft side.
162+
MACsec is now disabled on the ExpressRoute Direct ports on the Microsoft side.
166163

167164
### Test connectivity
168-
After you configure MACsec (including MACsec key update) on your ExpressRoute Direct ports, [check](expressroute-troubleshooting-expressroute-overview.md) if the BGP sessions of the circuits are up and running. If you don't have any circuit on the ports yet, please create one first and set up Azure Private Peering or Microsoft Peering of the circuit. If MACsec is misconfigured, including MACsec key mismatch, between your network devices and Microsoft's network devices, you won't see ARP resolution at layer 2 and BGP establishment at layer 3. If everything is configured properly, you should see the BGP routes advertised correctly in both directions and your application data flow accordingly over ExpressRoute.
165+
166+
After you configure MACsec (including MACsec key update) on your ExpressRoute Direct ports, [check](expressroute-troubleshooting-expressroute-overview.md) if the BGP sessions of the circuits are up and running. If you don't have any circuit on the ports yet, create one first and set up Azure Private Peering or Microsoft Peering of the circuit. If MACsec gets misconfigured, including MACsec key mismatch, between your network devices and Microsoft's network devices, you won't see ARP resolution at layer 2 or BGP establishment at layer 3. If everything is configured properly, you should see the BGP routes advertised correctly in both directions and your application data flow accordingly over ExpressRoute.
169167

170168
## Next steps
171-
1. [Create an ExpressRoute circuit on ExpressRoute Direct](expressroute-howto-erdirect.md)
172-
2. [Link an ExpressRoute circuit to an Azure virtual network](expressroute-howto-linkvnet-arm.md)
173-
3. [Verify ExpressRoute connectivity](expressroute-troubleshooting-expressroute-overview.md)
169+
- [Create an ExpressRoute circuit on ExpressRoute Direct](expressroute-howto-erdirect.md)
170+
- [Link an ExpressRoute circuit to an Azure virtual network](expressroute-howto-linkvnet-arm.md)
171+
- [Verify ExpressRoute connectivity](expressroute-troubleshooting-expressroute-overview.md)

0 commit comments

Comments
 (0)