You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/accelerated-networking-overview.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,17 @@ The following diagram illustrates how two VMs communicate with and without Accel
21
21
22
22

23
23
24
-
Without Accelerated Networking, all networking traffic in and out of the VM traverses the host and the virtual switch. The virtual switch provides all policy enforcement to network traffic. Policies include network security groups, access control lists, isolation, and other network virtualized services. To learn more about virtual switches, see [Hyper-V Virtual Switch](/windows-server/virtualization/hyper-v-virtual-switch/hyper-v-virtual-switch).
24
+
**Without Accelerated Networking**, all networking traffic in and out of the VM traverses the host and the virtual switch. The virtual switch provides all policy enforcement to network traffic. Policies include network security groups, access control lists, isolation, and other network virtualized services. To learn more about virtual switches, see [Hyper-V Virtual Switch](/windows-server/virtualization/hyper-v-virtual-switch/hyper-v-virtual-switch).
25
25
26
-
With Accelerated Networking, network traffic that arrives at the VM's network interface (NIC) forwards directly to the VM. Accelerated Networking offloads all network policies that the virtual switch applied, and applies them in hardware. Because hardware applies policy, the NIC can forward network traffic directly to the VM. The NIC bypasses the host and the virtual switch, while it maintains all the policy it applied in the host.
26
+
**With Accelerated Networking**, network traffic that arrives at the VM's network interface (NIC) forwards directly to the VM. Accelerated Networking offloads all network policies that the virtual switch applied, and applies them in hardware. Because hardware applies policy, the NIC can forward network traffic directly to the VM. The NIC bypasses the host and the virtual switch, while it maintains all the policy it applied in the host.
27
27
28
28
## Benefits
29
29
30
30
Accelerated Networking has the following benefits:
31
31
32
32
-**Lower latency and higher packets per second (pps).** Removing the virtual switch from the data path eliminates the time packets spend in the host for policy processing, and increases the number of packets that the VM can process.
33
33
34
-
-**Reduced jitter.** Virtual switch processing depends on the amount of policy to apply and the workload of the CPU that does the processing. Offloading policy enforcement to the hardware removes that variability by delivering packets directly to the VM. Offloading also removes the host-to-VM communication, all software interrupts, and all context switches.
34
+
-**Reduced jitter.** Virtual switch processing time depends on the amount of policy to apply and the workload of the CPU that does the processing. Offloading policy enforcement to the hardware removes that variability by delivering packets directly to the VM. Offloading also removes the host-to-VM communication, all software interrupts, and all context switches.
35
35
36
36
-**Decreased CPU utilization.** Bypassing the virtual switch in the host leads to less CPU utilization for processing network traffic.
37
37
@@ -78,9 +78,9 @@ The following Linux and FreeBSD distributions from the Azure Gallery support Acc
78
78
79
79
- Most general-purpose and compute-optimized VM instance sizes with two or more vCPUs support Accelerated Networking. On instances that support hyperthreading, VM instances with four or more vCPUs support Accelerated Networking.
80
80
81
-
-The individual [VM sizes documentation](../virtual-machines/sizes.md) indicates whether the VM supports Accelerated Networking.
81
+
-To check whether a VM size supports Accelerated Networking, see [Sizes for virtual machines in Azure](../virtual-machines/sizes.md).
82
82
83
-
- You can directly query the list of VM SKUs that support Accelerated Networking by using the Azure CLI [az vm list-skus](/cli/azure/vm#az-vm-list-skus) command. Although NC and NV sizes appear in the command output, those sizes don't support Accelerated Networking. Enabling Accelerated Networking on NC or NV VMs has no effect.
83
+
- You can directly query the list of VM SKUs that support Accelerated Networking by using the Azure CLI [az vm list-skus](/cli/azure/vm#az-vm-list-skus) command.
84
84
85
85
```azurecli-interactive
86
86
az vm list-skus \
@@ -91,9 +91,11 @@ The following Linux and FreeBSD distributions from the Azure Gallery support Acc
91
91
--output table
92
92
```
93
93
94
-
### Custom or Azure compute gallery images
94
+
Although NC and NV sizes appear in the command output, those sizes don't support Accelerated Networking. Enabling Accelerated Networking on NC or NV VMs has no effect.
95
95
96
-
If you use a custom image that supports Accelerated Networking, make sure you have the required drivers to work with Mellanox ConnectX-3, ConnectX-4 Lx, and ConnectX-5 NICs on Azure. Accelerated Networking also requires network configurations that exempt configuring the virtual functions on mlx4_en and mlx5_core drivers. Images that have cloud-init >=19.4 have networking correctly configured to support Accelerated Networking during provisioning.
96
+
### Custom VM images
97
+
98
+
If you use a custom image that supports Accelerated Networking, make sure you have the required drivers to work with Mellanox ConnectX-3, ConnectX-4 Lx, and ConnectX-5 NICs on Azure. Accelerated Networking also requires network configurations that exempt configuration of the virtual functions on the mlx4_en and mlx5_core drivers. Images with cloud-init version 19.4 or greater have networking correctly configured to support Accelerated Networking during provisioning.
97
99
98
100
The following example shows a sample configuration drop-in for `NetworkManager` on RHEL or CentOS:
# Use Azure CLI to create a Linux VM with Accelerated Networking
16
16
17
-
This article provides steps to create a Linux virtual machine (VM) with Accelerated Networking (AccelNet) by using the Azure command-line interface, Azure CLI. The article also discusses application binding requirements, and how to enable and manage Accelerated Networking on existing VMs.
17
+
This article describes how to create a Linux virtual machine (VM) with Accelerated Networking (AccelNet) enabled by using the Azure command-line interface, Azure CLI. The article also discusses application binding requirements, and how to enable and manage Accelerated Networking on existing VMs.
18
18
19
-
You can also create a VM with Accelerated Networking by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json) or [Azure PowerShell](../virtual-network/create-vm-accelerated-networking-powershell.md).
19
+
You can also create a Linux VM with Accelerated Networking enabled by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json) or [Azure PowerShell](../virtual-network/create-vm-accelerated-networking-powershell.md). To manage Accelerated Networking on VMs by using the Azure portal, see [Portal management].
20
20
21
21
## Prerequisites
22
22
23
23
- An Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
24
-
25
24
- The latest version of [Azure CLI installed](/cli/azure/install-azure-cli). Sign in to Azure by using the [az login](/cli/azure/reference-index#az-login) command.
26
25
27
26
## Create a VM with Accelerated Networking
@@ -30,7 +29,7 @@ In the following examples, replace the example parameters such as `<myResourceGr
30
29
31
30
### Create a virtual network
32
31
33
-
1. Use [az group create](/cli/azure/group) to create a resource group to contain the resources. Be sure to select a supported Linux region listed in [Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview).
32
+
1. Use [az group create](/cli/azure/group) to create a resource group to contain the resources. Be sure to select a supported Linux region as listed in [Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview).
34
33
35
34
```azurecli
36
35
az group create --name <myResourceGroup> --location <myAzureRegion>
@@ -76,15 +75,15 @@ In the following examples, replace the example parameters such as `<myResourceGr
76
75
77
76
### Create a network interface with Accelerated Networking
78
77
79
-
1. Use [az network public-ip create](/cli/azure/network/public-ip) to create a public IP address. The VM doesn't need a public IP address if you don't access it from the internet, but you need the public IP to complete the steps for this article.
78
+
1. Use [az network public-ip create](/cli/azure/network/public-ip) to create a public IP address. A VM doesn't need a public IP address if you don't access it from the internet, but you need the public IP to complete the steps for this article.
80
79
81
80
```azurecli
82
81
az network public-ip create \
83
82
--name <myPublicIp> \
84
83
--resource-group <myResourceGroup>
85
84
```
86
85
87
-
1. Use [az network nic create](/cli/azure/network/nic) to create a network interface (NIC) with Accelerated Networking enabled. The following example creates a network interface in the subnet of the virtual network, and associates the NSG to the NIC.
86
+
1. Use [az network nic create](/cli/azure/network/nic) to create a network interface (NIC) with Accelerated Networking enabled. The following example creates a NIC in the subnet of the virtual network, and associates the NSG to the NIC.
88
87
89
88
```azurecli
90
89
az network nic create \
@@ -114,7 +113,7 @@ az vm create \
114
113
--nics <myNic>
115
114
```
116
115
117
-
When the VM is created, you get output similar to the following example. Take note of the `publicIpAddress`, which you use to access the VM in later steps.
116
+
After the VM is created, you get output similar to the following example. Take note of the `publicIpAddress`, which you use to access the VM in later steps.
118
117
119
118
```output
120
119
{
@@ -147,7 +146,7 @@ When the VM is created, you get output similar to the following example. Take no
147
146
> [!NOTE]
148
147
> Other kernel versions may be supported. For an updated list, see the compatibility tables for each distribution at [Supported Linux and FreeBSD virtual machines for Hyper-V](/windows-server/virtualization/hyper-v/supported-linux-and-freebsd-virtual-machines-for-hyper-v-on-windows), and confirm that SR-IOV is supported. You can find more details in the release notes for [Linux Integration Services for Hyper-V and Azure](https://www.microsoft.com/download/details.aspx?id=55106). *
149
148
150
-
1. Use the `lspci` command to confirm that the Mellanox VF device is exposed to the VM. The returned output is similar to the following example:
149
+
1. Use the `lspci` command to confirm that the Mellanox VF device is exposed to the VM. The returned output should be similar to the following example:
@@ -170,18 +169,20 @@ When the VM is created, you get output similar to the following example. Take no
170
169
171
170
## Handle dynamic binding and revocation of virtual function
172
171
173
-
Binding to the synthetic NIC that's exposed in the VM is a mandatory requirement for all applications that take advantage of Accelerated Networking. If an application runs directly over the VF NIC, it doesn't receive all packets that are destined to the VM, because some packets show up over the synthetic interface. Run an application over the synthetic NIC to guarantee that the application receives all packets that are destined to it. Binding to the synthetic NIC also ensures that the application keeps running even if the VF is revoked during host servicing.
172
+
Binding to the synthetic NIC that's exposed in the VM is a mandatory requirement for all applications that take advantage of Accelerated Networking. If an application runs directly over the VF NIC, it doesn't receive all packets that are destined to the VM, because some packets show up over the synthetic interface.
173
+
174
+
You must run an application over the synthetic NIC to guarantee that the application receives all packets that are destined to it. Binding to the synthetic NIC also ensures that the application keeps running even if the VF is revoked during host servicing.
174
175
175
176
For more information about application binding requirements, see [How Accelerated Networking works in Linux and FreeBSD VMs](./accelerated-networking-how-it-works.md#application-usage).
It's possible to enable Accelerated Networking on an existing VM that doesn't have this feature. The VM must meet the following requirements to support Accelerated Networking:
181
+
It's possible to enable Accelerated Networking on an existing VM. The VM must meet the following requirements to support Accelerated Networking:
181
182
182
183
- Be a supported size for Accelerated Networking.
183
184
- Be a supported Azure Marketplace image and kernel version for Linux.
184
-
- Be stopped or deallocated before you can enable Accelerated Networking on any NIC. This requirement applies to all individual VMs or VMs in an availability set or Azure Virtual Machine Scale Set.
185
+
- Be stopped or deallocated before you can enable Accelerated Networking on any NIC. This requirement applies to all individual VMs or VMs in an availability set or Azure Virtual Machine Scale Sets.
185
186
186
187
### Enable Accelerated Networking on individual VMs or VMs in availability sets
187
188
@@ -193,7 +194,7 @@ It's possible to enable Accelerated Networking on an existing VM that doesn't ha
193
194
--name <myVm>
194
195
```
195
196
196
-
If you created your VM individually without an availability set, you must stop or deallocate only the individual VM to enable Accelerated Networking. If you created your VM with an availability set, you must stop or deallocate all VMs in the set before you enable Accelerated Networking on any of the NICs.
197
+
If you created your VM individually without an availability set, you must stop or deallocate only the individual VM to enable Accelerated Networking. If you created your VM with an availability set, you must stop or deallocate all VMs in the set before you can enable Accelerated Networking on any of the NICs.
197
198
198
199
1. Once the VM is stopped, enable Accelerated Networking on the NIC of your VM.
199
200
@@ -204,7 +205,7 @@ It's possible to enable Accelerated Networking on an existing VM that doesn't ha
204
205
--accelerated-networking true
205
206
```
206
207
207
-
1. Restart your VM, or all the VMs in the availability set, and confirm that Accelerated Networking is enabled.
208
+
1. Restart your VM, or all the VMs in the availability set, and [confirm that Accelerated Networking is enabled](#confirm-that-accelerated-networking-is-enabled).
208
209
209
210
```azurecli
210
211
az vm start --resource-group <myResourceGroup> \
@@ -219,8 +220,8 @@ Azure Virtual Machine Scale Sets is slightly different but follows the same work
219
220
220
221
```azurecli
221
222
az vmss deallocate \
222
-
--name myvmss \
223
-
--resource-group myrg
223
+
--name <myVmss> \
224
+
--resource-group <myResourceGroup>
224
225
```
225
226
226
227
1. Once the VMs are stopped, update the Accelerated Networking property under the network interface.
@@ -254,26 +255,25 @@ Once you restart and the upgrades finish, the VF appears inside VMs that use a s
254
255
255
256
VMs with Accelerated Networking enabled can be resized only to sizes that also support Accelerated Networking. You can't resize a VM with Accelerated Networking to a VM instance that doesn't support Accelerated Networking by using the resize operation. Instead, use the following process to resize these VMs:
256
257
257
-
1. Stop and deallocate the VM or all the VMs in the availability set or Virtual Machine Scale Set.
258
-
1. Disable Accelerated Networking on the NIC of the VM or all the VMs in the availability set or Virtual Machine Scale Set.
258
+
1. Stop and deallocate the VM or all the VMs in the availability set or Virtual Machine Scale Sets.
259
+
1. Disable Accelerated Networking on the NIC of the VM or all the VMs in the availability set or Virtual Machine Scale Sets.
259
260
1. Move the VM or VMs to a new size that doesn't support Accelerated Networking, and restart them.
260
261
261
-
## Portal creation
262
-
263
-
You can also create a VM with Accelerated Networking by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json).
264
-
265
-
- When you create a VM in the Azure portal that uses a [supported operating system](./accelerated-networking-overview.md#supported-operating-systems) and [VM size](./accelerated-networking-overview.md#supported-vm-instances), the **Enable accelerated networking** checkbox on the **Networking** tab of the **Create a virtual machine** screen is automatically selected. If Accelerated Networking isn't supported, the checkbox isn't selected, and a message explains the reason.
262
+
### Manage Accelerated Networking through the portal
266
263
267
-
- You can enable only Azure Marketplace-supported operating systems through the portal. To create a VM with a custom OS image that supports Accelerated Networking, you must use Azure CLI or PowerShell.
264
+
When you [create a VM in the Azure portal](/azure/virtual-machines/linux/quick-create-portal) that uses a [supported operating system](./accelerated-networking-overview.md#supported-operating-systems) and [VM size](./accelerated-networking-overview.md#supported-vm-instances), the **Enable accelerated networking** checkbox on the **Networking** tab of the **Create a virtual machine** screen is automatically selected. If Accelerated Networking isn't supported, the checkbox isn't selected, and a message explains the reason.
268
265
269
-
- The Accelerated Networking setting in the portal shows the user-selected state. Accelerated Networking allows choosing **Disabled** even if the VM size requires Accelerated Networking. VM sizes that require Accelerated Networking enable Accelerated Networking at runtime regardless of the user setting in the portal.
266
+
>[!NOTE]
267
+
>- You can enable Accelerated Networking during portal VM creation only for Azure Marketplace supported operating systems. To create and enable Accelerated Networking for a VM with a custom OS image, you must use Azure CLI or PowerShell.
268
+
>
269
+
>- The Accelerated Networking setting in the portal shows the user-selected state. Accelerated Networking allows choosing **Disabled** in the portal even if the VM size requires Accelerated Networking. VM sizes that require Accelerated Networking enable Accelerated Networking at runtime regardless of the user setting in the portal.
270
270
271
-
-To enable or disable Accelerated Networking for an existing VM through the Azure portal:
271
+
To enable or disable Accelerated Networking for an existing VM through the Azure portal:
272
272
273
-
1. From the portal page for the VM, select **Networking** from the left menu.
274
-
1. On the **Networking** page, select the **Network Interface**.
275
-
1. At the top of the NIC **Overview** page, select **Edit accelerated networking**.
276
-
1. Select **Automatic**, **Enabled**, or **Disabled**, and then select **Save**.
273
+
1. From the portal page for the VM, select **Networking** from the left menu.
274
+
1. On the **Networking** page, select the **Network Interface**.
275
+
1. At the top of the NIC **Overview** page, select **Edit accelerated networking**.
276
+
1. Select **Automatic**, **Enabled**, or **Disabled**, and then select **Save**.
0 commit comments