|
| 1 | +--- |
| 2 | +title: Updating ACL for Network-to-Network Interconnects (NNI) |
| 3 | +description: Learn the process of updating ACLs associated for Network-to-Network Interconnects (NNI) |
| 4 | +author: sushantjrao |
| 5 | +ms.author: sushrao |
| 6 | +ms.service: azure-operator-nexus |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 04/18/2024 |
| 9 | +ms.custom: template-how-to |
| 10 | +--- |
| 11 | + |
| 12 | +# Updating ACL on NNI or External Network |
| 13 | + |
| 14 | +The Nexus Network Fabric offers several methods for updating Access Control Lists (ACLs) applied on NNI or Isolation Domain External Networks. Below are two options: |
| 15 | + |
| 16 | +## Option 1: Replace existing ACL |
| 17 | + |
| 18 | +Create a new ACL using the az networkfabric acl create command. |
| 19 | + |
| 20 | +[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)] |
| 21 | + |
| 22 | +1. **Set subscription (if necessary):** |
| 23 | + |
| 24 | +If you have multiple subscriptions and need to set one as the default, you can do so with: |
| 25 | + |
| 26 | +```bash |
| 27 | +az account set --subscription <subscription-id> |
| 28 | +``` |
| 29 | + |
| 30 | +2. **Create ACL** |
| 31 | + |
| 32 | +Use the `az networkfabric acl create` command to create the ACL with the desired parameters. Here's a general template: |
| 33 | + |
| 34 | +```bash |
| 35 | +az networkfabric acl create --resource-group "<resource-group>" --location "<location>" --resource-name "<acl-name>" --annotation "<annotation>" --configuration-type "<configuration-type>" --default-action "<default-action>" --match-configurations "<match-configurations>" --actions "<actions>" |
| 36 | +``` |
| 37 | + |
| 38 | +3. **Update the NNI or External Network by passing a resource ID to `--ingress-acl-id` and `--egress-acl-id` parameter.** |
| 39 | + |
| 40 | +```Azure CLI |
| 41 | +az networkfabric nni update --resource-group "<resource-group-name>" --resource-name "<nni-name>" --fabric "<fabric-name>" --ingress-acl-id "<ingress-acl-resource-id>" --egress-acl-id "<egress-acl-resource-id>" |
| 42 | +``` |
| 43 | + |
| 44 | +| Parameter | Description | |
| 45 | +|----------------------|--------------------------------------------------------------------------------------------------| |
| 46 | +| `--resource-group` | Name of the resource group containing the network fabric instance. | |
| 47 | +| `--resource-name` | Name of the network fabric NNI (Network-to-Network Interface) to be updated. | |
| 48 | +| `--fabric` | Name of the fabric where the NNI is provisioned. | |
| 49 | +| `--ingress-acl-id` | Resource ID of the ingress access control list (ACL) for inbound traffic (null for no specific ACL). | |
| 50 | +| `--egress-acl-id` | Resource ID of the egress access control list (ACL) for outbound traffic (null for no specific ACL). | |
| 51 | + |
| 52 | +> [!NOTE] |
| 53 | +> Based on requirements, either the Ingress, Egress, or both can be updated. |
| 54 | +
|
| 55 | +4. **Commit configuration changes:** |
| 56 | + |
| 57 | +Execute `fabric commit-configuration` to commit the configuration changes. |
| 58 | + |
| 59 | +```Azure CLI |
| 60 | +az networkfabric fabric commit-configuration --resource-group "<resource-group>" --resource-name "<fabric-name>" |
| 61 | +``` |
| 62 | + |
| 63 | +| Parameter | Description | |
| 64 | +|------------------|--------------------------------------------------------------| |
| 65 | +| `--resource-group` | The name of the resource group containing the Nexus Network Fabric. | |
| 66 | +| `--resource-name` | The name of the Nexus Network Fabric to which the configuration changes will be committed. | |
| 67 | + |
| 68 | +5. **Verify changes:** |
| 69 | + |
| 70 | +Verify the changes using the `resource list` command. |
| 71 | + |
| 72 | +## Option 2: Update existing ACL properties |
| 73 | + |
| 74 | +Use the ACL update command to modify the properties of an existing ACL. |
| 75 | + |
| 76 | +1. Update the NNI or External Network by passing a null ID to `--ingress-acl-id` and `--egress-acl-id`. |
| 77 | + |
| 78 | +```Azure CLI |
| 79 | +az networkfabric nni update --resource-group "<resource-group-name>" --resource-name "<nni-name>" --fabric "<fabric-name>" --ingress-acl-id null --egress-acl-id null |
| 80 | +``` |
| 81 | + |
| 82 | +| Parameter | Description | |
| 83 | +|----------------------|--------------------------------------------------------------------------------------------------| |
| 84 | +| `--resource-group` | Name of the resource group containing the network fabric instance. | |
| 85 | +| `--resource-name` | Name of the network fabric NNI (Network-to-Network Interface) to be updated. | |
| 86 | +| `--fabric` | Name of the fabric where the NNI is provisioned. | |
| 87 | +| `--ingress-acl-id` | Resource ID of the ingress access control list (ACL) for inbound traffic (null for no specific ACL). | |
| 88 | +| `--egress-acl-id` | Resource ID of the egress access control list (ACL) for outbound traffic (null for no specific ACL). | |
| 89 | + |
| 90 | +> [!NOTE] |
| 91 | +> Based on requirements, either the Ingress, Egress, or both can be updated. |
| 92 | +
|
| 93 | +2. Execute `fabric commit-configuration`. |
| 94 | + |
| 95 | +```Azure CLI |
| 96 | +az networkfabric fabric commit-configuration --resource-group "<resource-group>" --resource-name "<fabric-name>" |
| 97 | +``` |
| 98 | + |
| 99 | +| Parameter | Description | |
| 100 | +|------------------|--------------------------------------------------------------| |
| 101 | +| `--resource-group` | The name of the resource group containing the Nexus Network Fabric. | |
| 102 | +| `--resource-name` | The name of the Nexus Network Fabric to which the configuration changes will be committed. | |
| 103 | + |
| 104 | +4. Verify the changes using the `resource list` command. |
| 105 | + |
0 commit comments