Skip to content

Commit 4180a9b

Browse files
IP prefix how-to completed.
1 parent ec119ba commit 4180a9b

File tree

1 file changed

+142
-36
lines changed

1 file changed

+142
-36
lines changed

articles/operator-nexus/how-to-ip-prefixes.md

Lines changed: 142 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,35 @@ ms.custom: template-how-to
1313

1414
This article explains the main management operations for IP prefixes and IP prefix rules in Azure Operator Nexus.
1515

16+
## Properties 
1617

17-
## IP prefixes
18+
The IpPrefix resource has the following properties: 
1819

19-
### Example
20+
1. **location**: The Azure region where the resource is located. 
2021

21-
The following json object is an example of an IP prefix resource that can be used in route policies: 
22+
2. **properties**: The properties of the IpPrefix resource, which include: 
23+
24+
- **configurationState**: The configuration state of the resource. 
25+
26+
- **provisioningState**: The provisioning state of the resource. 
27+
28+
- **administrativeState**: The administrative state of the resource. 
29+
30+
- **ipPrefixRules**: A list of IP Prefix Rules. Each rule has the following properties: 
31+
32+
- **action**: The action to be taken on the configuration (`Permit` or `Deny`). 
33+
34+
- **sequenceNumber**: The sequence to insert to/delete from the existing route. The sequence number must be between 1 and 4294967295. 
35+
36+
- **networkPrefix**: The network prefix specifying IPv4/IPv6 packets to be permitted or denied.
37+
38+
- **condition**: Specifies the prefix-list bounds. Possible values are `EqualTo`, `GreaterThanOrEqualTo`, `LesserThanOrEqualTo`, and `Range`.
39+
40+
- **subnetMaskLength**: Gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1-32. Possible values for IPv6 are 1-128. 
41+
42+
43+
## IP prefix operations
2244

23-
```azurecli
24-
{
25-
"id": "/subscriptions/subscription-id/resourceGroups/op1-cluster/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/ipprefixv4-1204-cn1",
26-
"location": "eastus",
27-
"name": "ipprefixv4-1204-cn1",
28-
"provisioningState": "Succeeded",
29-
"resourceGroup": "op1-cluster",
30-
"ipPrefixRules": [
31-
{
32-
"action": "Permit",
33-
"networkPrefix": "10.10.10.0/28",
34-
"sequenceNumber": 10
35-
},
36-
{
37-
"action": "Permit",
38-
"networkPrefix": "20.20.20.0/24",
39-
"sequenceNumber": 12
40-
}
41-
],
42-
"systemData": {
43-
"createdAt": "2023-06-12T10:23:26.7645536Z",
44-
"createdBy": "[email protected]",
45-
"createdByType": "User",
46-
"lastModifiedAt": "2023-06-12T10:23:26.7645536Z",
47-
"lastModifiedBy": "[email protected]",
48-
"lastModifiedByType": "User"
49-
},
50-
"type": "microsoft.managednetworkfabric/ipPrefixes"
51-
}
52-
```
5345

5446
### Create an IP prefix
5547

@@ -88,7 +80,6 @@ To create an IP Prefix resource, follow these steps: 
8880
8981
- `GreaterThanOrEqualTo`: The condition is true when the network prefix of the route is greater than or equal to the network prefix of the rule.
9082
91-
9283
- `networkPrefix`: The network segment to match. It's an IP address and a prefix length, such as 10.10.10.0/28 or 2001:db8::/64. 
9384
9485
- `sequenceNumber`: The order of evaluation of the rule, from lowest to highest. The rule with the lowest sequence number is evaluated first, and the rule with the highest sequence number is evaluated last. If a rule matches the route, the evaluation stops and the action of the rule is executed. If no rule matches the route, the default action is Deny. 
@@ -121,7 +112,7 @@ az networkfabric ipprefix show \
121112

122113
The REST API response body for getting the details of an IP Prefix resource by its ID is as follows: 
123114

124-
```
115+
```json
125116
{
126117
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/myIpPrefix",
127118
"location": "eastus",
@@ -175,8 +166,123 @@ az networkfabric ipprefix delete \
175166

176167
The REST API request body for deleting an IP Prefix resource by its ID is as follows: 
177168

178-
```
169+
```json
179170
{
180171
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/myIpPrefix"
181172
}
182173
```
174+
175+
## Example IP prefix resources
176+
177+
### ipprefixv4-externalnetwork1-export 
178+
179+
This resource is used to manage network traffic rules for a specific external network in a resource group. It contains rules that permit traffic to the 20.20.20.0/24 and 50.50.50.0/24 network prefixes, but deny traffic to the 10.10.10.0/28 network prefix. 
180+
181+
182+
```json
183+
{
184+
"id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedNetworkFabric/ipPrefixes/ipprefixv4-externalnetwork1-export",
185+
"ipPrefixRules": [
186+
{
187+
"action": "Deny",
188+
"condition": "EqualTo",
189+
"networkPrefix": "10.10.10.0/28",
190+
"sequenceNumber": 10
191+
},
192+
{
193+
"action": "Permit",
194+
"condition": "EqualTo",
195+
"networkPrefix": "20.20.20.0/24",
196+
"sequenceNumber": 12
197+
},
198+
{
199+
"action": "Permit",
200+
"condition": "EqualTo",
201+
"networkPrefix": "50.50.50.0/24",
202+
"sequenceNumber": 13
203+
}
204+
],
205+
"location": "eastus",
206+
"name": "ipprefixv4-externalnetwork1-export",
207+
"provisioningState": "Succeeded",
208+
"resourceGroup": "...",
209+
"type": "microsoft.managednetworkfabric/ipprefixes"
210+
}
211+
```
212+
213+
This resource denies traffic to the 10.10.10.0/28 network prefix and permits traffic to the 20.20.20.0/24 and 50.50.50.0/24 network prefixes.
214+
215+
### ipprefixv4-1204-cn1 
216+
217+
This resource is used to manage network traffic rules for a specific network in a resource group. It contains rules that permit traffic to the 10.10.10.0/28 and 20.20.20.0/24 network prefixes. 
218+
219+
```json
220+
{
221+
"id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedNetworkFabric/ipPrefixes/ipprefixv4-1204-cn1",
222+
"ipPrefixRules": [
223+
{
224+
"action": "Permit",
225+
"condition": "EqualTo",
226+
"networkPrefix": "10.10.10.0/28",
227+
"sequenceNumber": 10
228+
},
229+
{
230+
"action": "Permit",
231+
"condition": "EqualTo",
232+
"networkPrefix": "20.20.20.0/24",
233+
"sequenceNumber": 12
234+
}
235+
],
236+
"location": "eastus",
237+
"name": "ipprefixv4-1204-cn1",
238+
"provisioningState": "Succeeded",
239+
"resourceGroup": "...",
240+
"type": "microsoft.managednetworkfabric/ipprefixes"
241+
}
242+
```
243+
244+
This resource permits traffic to the 10.10.10.0/28 and 20.20.20.0/24 network prefixes.
245+
246+
### ipprefix-v6-ingress
247+
248+
This resource is located in the `eastus` region and is part of a resource group. It's configured, but currently disabled. The resource is of type `microsoft.managednetworkfabric/ipprefixes`.
249+
250+
The resource has two IP prefix rules: 
251+
252+
1. Permits traffic from network prefixes that are greater than or equal to fda0:d59c:db12::/59 with a subnet mask length of 59. 
253+
254+
2. Permits traffic from network prefixes that are greater than or equal to fc00:f853:ccd:e793::/64 with a subnet mask length of 64. 
255+
256+
257+
```json
258+
{
259+
"administrativeState": "Disabled",
260+
"configurationState": "Succeeded",
261+
"id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedNetworkFabric/ipprefixes/ipprefix-v6-ingress",
262+
"ipPrefixRules": [
263+
{
264+
"action": "Permit",
265+
"condition": "GreaterThanOrEqualTo",
266+
"networkPrefix": "fda0:d59c:db12::/59",
267+
"sequenceNumber": 10,
268+
"subnetMaskLength": "59"
269+
},
270+
{
271+
"action": "Permit",
272+
"condition": "GreaterThanOrEqualTo",
273+
"networkPrefix": "fc00:f853:ccd:e793::/64",
274+
"sequenceNumber": 20,
275+
"subnetMaskLength": "64"
276+
}
277+
],
278+
"location": "eastus",
279+
"name": "ipprefix-v6-ingress",
280+
"provisioningState": "Succeeded",
281+
"resourceGroup": "...",
282+
"type": "microsoft.managednetworkfabric/ipprefixes"
283+
}
284+
```
285+
286+
This resource is configured to allow IPv6 traffic from the specified network prefixes.
287+
288+

0 commit comments

Comments
 (0)