New-NetVirtualizationLookupRecord

New-NetVirtualizationLookupRecord

Creates a policy entry for an IP address in a virtual network.

Sintaxis

Parameter Set: cim:CreateInstance0
New-NetVirtualizationLookupRecord -CustomerAddress <String> -MACAddress <String> -ProviderAddress <String> -Rule <RuleType> -VirtualSubnetID <UInt32> [-AsJob] [-CimSession <CimSession[]> ] [-Context <String> ] [-CustomerID <String> ] [-ThrottleLimit <Int32> ] [-Type <Type> ] [-UseVmMACAddress <Boolean> ] [-VMName <String> ] [ <CommonParameters>]

Descripción detallada

The New-NetVirtualizationLookupRecord cmdlet creates a lookup record policy entry for an IP address that belongs to a virtual network. Network Virtualization allows more than one virtual network to exist on the same physical network. Computers can exchange network traffic with a virtual machine (VM) by using a Customer Address within the virtual network. Network Virtualization manages the Provider Addresses that are the physical network addresses. This cmdlet creates a record that maps a Customer Address to a Provider Address. For more information, see Network Virtualization technical details (https://technet.microsoft.com/library/jj134174.aspx) on TechNet.

To create a policy entry, you must specify a Customer Address, a VM media access control (MAC) address, a Provider Address, a rule type, and a virtual subnet ID. You can also specify a context, a customer ID, and a VM name, as well as whether to use a VM virtual MAC address.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Context<String>

Specifies a comment regarding the policy entry. Administrators can use this comment for any purpose.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CustomerAddress<String>

Specifies the IP address for a VM. You can use can use either an IPv4 or IPv6 address.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CustomerID<String>

Specifies an ID for a policy entry or VM. Administrators can use this setting for any purpose.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-MACAddress<String>

Specifies a MAC address that corresponds to the Customer Address.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ProviderAddress<String>

Specifies an IP address, either IPv4 or IPv6, for a physical address that corresponds to the Customer Address.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Rule<RuleType>

Specifies which type of virtualization mechanism that the policy entry uses. Los valores aceptables para este parámetro son los siguientes:

-- TranslationMethodNat. IP address rewrite.
-- TranslationMethodEncap. Network Virtualization Generic Routing Encapsulation (NVGRE).
-- TranslationMethodNone. None.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Type<Type>

Specifies a type. The type determines the address mapping for a record. Los valores aceptables para este parámetro son los siguientes:

-- Static. The Customer Address (CA) specified in this lookup record is the address assigned to the corresponding virtual machine, which is implicitly specified by the MAC address. An administrator or creates this lookup record.
-- Dynamic. The Customer Address specified in this lookup record is the address assigned to the corresponding virtual machine, which is implicitly specified by the MAC address. For example, the Hyper-V Network Virtualization software creates this record for virtual machines that obtain their IP addresses from a DHCP server.
-- L2Only. The Customer Address specified in this lookup record should be set to 0.0.0.0 for IPv4, or :: for IPv6. The corresponding virtual machine, implicitly specified by the MAC address, learns the CA dynamically.
-- GatewayWildcard. The CA address specified in this lookup record should be set to 0.0.0.0 for IPv4, or :: for IPv6. The corresponding virtual machine, implicitly specified by the MAC address, is a Hyper-V Network Virtualization gateway.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-UseVmMACAddress<Boolean>

Indicates whether this entry uses its defined MAC address instead of physical MAC address. Virtual networking can use different MAC addresses for different VMs to balance traffic among multiple CPU cores.

A value of $True is valid only if the Rule parameter has a value of TranslationMethodNat. The default value for this setting is $False.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-VirtualSubnetID<UInt32>

Specifies an ID for the virtual subnet that the Customer address belongs to. Los valores aceptables para este parámetro son los siguientes:integers from 4096 through 16777214.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-VMName<String>

Specifies a name for the VM for this policy entry. Administrators can use this name for any purpose.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

Example 1: Create a policy entry

This command creates a policy entry for a Customer Address 10.0.0.5. The command specifies the required values: a MAC address for the VM, the physical Provider Address, a rule type (TranslationMethodEncap, which means the entry uses NVGRE), and a virtual subnet ID. The command also specifies a name for the VM.

PS C:\> New-NetVirtualizationLookupRecord -CustomerAddress "10.0.0.5" -MACAddress "101010101105" -ProviderAddress "192.168.1.101" -Rule "TranslationMethodEncap" -VirtualSubnetID "6000" -VMName "BlueS1-VM1"

Temas relacionados

Get-NetVirtualizationLookupRecord

Remove-NetVirtualizationLookupRecord

Set-NetVirtualizationLookupRecord