Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Create multiple NIC VM

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Writing time: Sunday, February 22, 2015

1 Overview

With the promotion and acceptance of public cloud, people find the value and advantages of public cloud, but in many scenarios, we still need to deploy a lot of network virtual devices. For most of these network virtual devices deployed in Azure, multi-NIC is a basic requirement, and it needs to provide more ability to manage network traffic. The multi-NIC feature allows you to create and manage multiple virtual network interfaces (NIC) on the Azure virtual machine (VM). You can isolate the traffic between the front-end NIC and the back-end NIC, or separate the data plane traffic from the management plane traffic.

Schematic diagram

Multi-NIC has the following requirements and constraints:

1. Multiple NIC VM must be created in the Azure virtual network and non-VNet VM is not supported.

two。 The current version does not support adding or removing NIC after creating VM, and multiple NIC can only be applied when creating VM.

3. Multi-NIC VM cannot act as a layer 3 (IP) gateway or router to forward traffic, and packets must be sent to or from a VNet IP address on the VM.

4. Only the "default" NIC supports VIP for Internet. Only one VIP is directed to the IP of the default NIC.

5. Currently, multi-NIC VM does not support PIP.

6. Network Security Group (NSG) or forced tunneling cannot be applied to a non-default NIC at this time.

7. The NIC order within VM is random and may change each time the Azure infrastructure is updated. However, the IP address and the corresponding Ethernet MAC address will remain the same. For example, suppose that the IP address of Eth2 is 10.1.0.100 and the MAC address is 00-0D-3A-B0-39-0D; after updating and restarting the Azure infrastructure, Eth2 may change to Eth3, but its IP and MAC pairing will remain the same. After the customer performs a reboot, the NIC order remains the same.

8. Multiple NIC are supported in the same virtual network subnet.

9. The VM size determines the number of NIC that can be created for the VM. The following table lists the number of NIC corresponding to the VM size:

VM size (standard SKU)

Number of NIC (maximum allowed per VM)

A3, A6, D3, G3, D12 (4 cores)

two

A4, A7, D4, D13 (8 cores)

four

All other sizes currently

one

2 create default storage account for NIC VM2.1 configuration

New-AzureStorageAccount-StorageAccountName "nicvmstorage"-Label "VM-Multi-NICs"-Location "China East"

Set-AzureSubscription-SubscriptionName "Microsoft Azure Enterprise trial"-CurrentStorageAccount nicvmstorage

2.2 Select a VM image

Get the name of the VM image to be deployed

Get-AzureVMImage | where {$_ .Label-like 'windows server*'}

Select the OS just listed

$image = Get-AzureVMImage-ImageName "55bc2b193643443bb879a78bda516fc8__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd"

Create a VM configuration

PS C:\ > $vm = New-AzureVMConfig-Name "NGNicVM"-InstanceSize "ExtraLarge"-ImageName-AvailabilitySetName "NGAV01"

Create a default administrator and login

Add-AzureProvisioningConfig-VM $vm-Windows-AdminUserName "neoni"-Password "P@ssw0rd"

Add additional NIC to the VM configuration. There are several things to be aware of for this operation:

The configuration of the default NIC is not set through this cmdlet.

The SubnetName must match a subnet 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

Add-AzureNetworkInterfaceConfig-Name "Ethernet3"-SubnetName "subnet-3"-StaticVNetIPAddress "10.0.2.100"-VM $vm

Specify default NIC subnet and IP

Set-AzureSubnet-SubnetNames "subnet-1"-VM $vm

Set-AzureStaticVNetIP-IPAddress "10.0.0.100"-VM $vm

Create a VM for a virtual network (cloud service needs to exist first, and VM with a single network card cannot exist)

New-AzureVM-ServiceName "niccloudservicetest"-VNetName "ngtest-network"-VM $vm

Link to VM for viewing

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report