Writing time: February 22, 2015 Sunday 1 overview
With the promotion and acceptance of the public cloud, we find the value and advantage of the public cloud, but in many scenarios we still need to deploy many network virtual appliances, and for most of these network virtual appliances deployed in Azure, multi-NICs are a basic requirement and need to provide greater capacity to manage network traffic. The multi-NIC feature allows you to create and manage multiple virtual network interfaces (NICs) on Azure virtual machines (VMS). You can isolate the traffic between the front-end NIC and the back-end NIC, or isolate the data plane traffic from the management plane traffic.
650) this.width=650; "title=" clip_image002 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/M01/59/F7/ Wkiom1txomiy5-3raacs0umznpe309.jpg "width=" 461 "height=" 326 ">
Multiple NICs have the following requirements and constraints:
1. Multi-NIC VMS must be created in an Azure virtual network and do not support non-VNet VMS.
2. The current version does not support adding or removing NICs after the VM is created, only multiple NICs can be applied when the VM is created.
3. Multi-NIC VMS cannot act as a layer 3rd (IP) gateway or router to forward traffic, and packets must be sent to or from one of the VNet IP addresses on the VM.
4. Only the "default" NIC supports the Internet-facing VIP. Only one VIP is directed to the IP of the default NIC.
5. Currently, a multi-NIC VM does not support PIP.
6. You cannot apply a network security group (NSG) or a forced tunnel to a non-default NIC at this time.
7. The NIC order within the VM is random and may change every time the Azure infrastructure is updated. However, the IP address and the corresponding Ethernet MAC address will remain the same. For example, suppose Eth1 has an IP address of 10.1.0.100,mac address of 00-0d-3a-b0-39-0d, and after updating and restarting the Azure infrastructure, Eth1 may change to Eth2, but its IP and MAC pairing will remain the same. After the customer performs a reboot, the NIC order remains the same.
8. Supports the use of multiple NICs in the same virtual network subnet.
9. The VM size determines the number of NICs that can be created for the VM. The following table lists the number of NICs that correspond to the VM size:
VM size (Standard SKU) |
Number of NICs (maximum number allowed per VM) |
A3, A6, D3, G3, D12 (4 cores) |
2 |
A4, A7, D4, D13 (8 cores) |
4 |
All the other sizes currently |
1 |
2 Create a default storage account for NIC VM 2.1 configuration
New-azurestorageaccount-storageaccountname "Nicvmstorage"-label "Vm-multi-nics"-location "China East"
650) this.width=650; "title=" clip_image004 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/M02/59/F7/ Wkiom1txommtcmifaacca7atm3o100.jpg "width=" 654 "height=" >
Set-azuresubscription–subscriptionname "Microsoft Azure Enterprise Trial"-currentstorageaccount nicvmstorage 2.2 Select a VM image
Get the name of the VM image you need to deploy
Get-azurevmimage | where {$_. Label-like ' Windows server* '}
650) this.width=650; "title=" clip_image006 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image006 "src=" http://s3.51cto.com/wyfs02/M00/59/F3/ Wkiol1txodjhd1wpaaedvqgsi5u078.jpg "width=" 654 "height=" 144 ">
Select the OS you just listed
$image = Get-azurevmimage-imagename "55bc2b193643443bb879a78bda516fc8__ Windows-server-2012-datacenter-201410.01-en.us-127gb.vhd "
650) this.width=650; "title=" clip_image008 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image008 "src=" http://s3.51cto.com/wyfs02/M01/59/F3/ Wkiol1txodrsevyvaabk4qu6geu894.jpg "width=" 653 "height=" >
Create a VM Configuration
PS c:\> $VM = new-azurevmconfig-name "NGNICVM"-instancesize "Extralarge"-imagename–availabilitysetname "NGAV01"
650) this.width=650; "title=" clip_image010 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image010 "src=" http://s3.51cto.com/wyfs02/M02/59/F3/ Wkiol1txodug1cgzaabezfkxb4w292.jpg "width=" 654 "height=" >
Create default Administrator and login names
ADD-AZUREPROVISIONINGCONFIG–VM $vm-windows-adminusername "Neoni"-password "[email protected]"
650) this.width=650; "title=" clip_image012 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/M00/59/F3/ Wkiol1txodzrkiwqaaedkivrzkm435.jpg "width=" 654 "height=" 197 ">
Add the attached NIC to the VM configuration. There are a few things to note about this operation:
The configuration of the default NIC is not set by this cmdlet.
The Subnetname must match one of the subnets in the desired virtual network.
The name parameter must be unique within the same VM, but does not represent the name of the NIC in the VM.
Add-azurenetworkinterfaceconfig-name "Ethernet2"-subnetname "subnet-2"-staticvnetipaddress "10.0.1.100"-VM $VM
650) this.width=650; "title=" clip_image014 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image014 "src=" http://s3.51cto.com/wyfs02/M01/59/F3/ Wkiol1txod7devncaaeszad9n4y234.jpg "width=" 654 "height=" 203 ">
Add-azurenetworkinterfaceconfig-name "Ethernet3"-subnetname "subnet-3"-staticvnetipaddress "10.0.2.100"-VM $VM
650) this.width=650; "title=" clip_image016 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image016 "src=" http://s3.51cto.com/wyfs02/M02/59/F3/ Wkiol1txoedbpqyxaaetxev6eqk153.jpg "width=" 653 "height=" 209 ">
Specify the default NIC subnet and IP
Set-azuresubnet-subnetnames "Subnet-1"-VM $VM
Set-azurestaticvnetip-ipaddress "10.0.0.100"-VM $VM
650) this.width=650; "title=" clip_image018 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image018 "src=" http://s3.51cto.com/wyfs02/M01/59/F3/ Wkiol1txoepwv88qaah34ioksok574.jpg "width=" 654 "height=" 395 ">
VMs that create virtual networks (cloud service needs to exist first, and VMS with a single network card cannot exist)
New-azurevm-servicename "Niccloudservicetest" –vnetname "Ngtest-network" –VM $VM
650) this.width=650; "title=" clip_image020 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image020 "src=" http://s3.51cto.com/wyfs02/M01/59/F3/ Wkiol1txoetcvr1faac3ezkyzew664.jpg "width=" 654 "height=" >
Link to VM View
650) this.width=650; "title=" clip_image022 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image022 "src=" http://s3.51cto.com/wyfs02/M02/59/F3/ Wkiol1txoearnao8aad0_r7pmpu545.jpg "width=" 653 "height=" 243 ">
650) this.width=650; "title=" clip_image024 "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" clip_image024 "src=" http://s3.51cto.com/wyfs02/M00/59/F7/ Wkiom1txonqyb7utaai3suqb3bu702.jpg "width=" 654 "height=" 395 ">
Create a multi-Nic VM