< Back
New-NsxLogicalRouter
Post
NAME New-NsxLogicalRouter
SYNOPSIS
Creates a new Logical Router object.
SYNTAX
New-NsxLogicalRouter -Name <String> -ManagementPortGroup <Object> -Interface <XmlElement[]> -ResourcePool
<ResourcePoolInterop> -Datastore <DatastoreInterop> [-EnableHA] [-HADatastore <DatastoreInterop>] [-Universal]
[-EnableLocalEgress] [-Tenant <String>] [-Connection <PSObject>] [<CommonParameters>]
New-NsxLogicalRouter -Name <String> -ManagementPortGroup <Object> -Interface <XmlElement[]> -Cluster
<ClusterInterop> -Datastore <DatastoreInterop> [-EnableHA] [-HADatastore <DatastoreInterop>] [-Universal]
[-EnableLocalEgress] [-Tenant <String>] [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
An NSX Logical Router is a distributed routing function implemented within
the ESXi kernel, and optimised for east west routing.
This cmdlet creates a new Logical Router. A Logical router has many
configuration options - not all are exposed with New-NsxLogicalRouter.
Use Set-NsxLogicalRouter for other configuration.
Interface configuration is handled by passing interface spec objects created by
the New-NsxLogicalRouterInterfaceSpec cmdlet.
A valid PowerCLI session is required to pass required objects as required by
cluster/resourcepool and datastore parameters.
PARAMETERS
-Name <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ManagementPortGroup <Object>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Interface <XmlElement[]>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ResourcePool <ResourcePoolInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Cluster <ClusterInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Datastore <DatastoreInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EnableHA [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-HADatastore <DatastoreInterop>
Required? false
Position? named
Default value $datastore
Accept pipeline input? false
Accept wildcard characters? false
-Universal [<SwitchParameter>]
Set to deploy as a universal distributed logical router.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-EnableLocalEgress [<SwitchParameter>]
Create the universal logical router with Local Egress enabled.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Tenant <String>
Optional tenant string to be configured on the DLR.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
Default value $defaultNSXConnection
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Create a new LR with interfaces on existsing Logical switches (LS1,2,3 and
Management interface on Mgmt)
PS C:\\> $ls1 = get-nsxtransportzone | get-nsxlogicalswitch LS1
PS C:\\> $ls2 = get-nsxtransportzone | get-nsxlogicalswitch LS2
PS C:\\> $ls3 = get-nsxtransportzone | get-nsxlogicalswitch LS3
PS C:\\> $mgt = get-nsxtransportzone | get-nsxlogicalswitch Mgmt
PS C:\\> $vnic0 = New-NsxLogicalRouterInterfaceSpec -Type uplink -Name vNic0
-ConnectedTo $ls1 -PrimaryAddress 1.1.1.1 -SubnetPrefixLength 24
PS C:\\> $vnic1 = New-NsxLogicalRouterInterfaceSpec -Type internal -Name vNic1
-ConnectedTo $ls2 -PrimaryAddress 2.2.2.1 -SubnetPrefixLength 24
PS C:\\> $vnic2 = New-NsxLogicalRouterInterfaceSpec -Type internal -Name vNic2
-ConnectedTo $ls3 -PrimaryAddress 3.3.3.1 -SubnetPrefixLength 24
PS C:\\> New-NsxLogicalRouter -Name testlr -ManagementPortGroup $mgt
-Interface $vnic0,$vnic1,$vnic2 -Cluster (Get-Cluster)
-Datastore (get-datastore)
RELATED LINKS
SYNOPSIS
Creates a new Logical Router object.
SYNTAX
New-NsxLogicalRouter -Name <String> -ManagementPortGroup <Object> -Interface <XmlElement[]> -ResourcePool
<ResourcePoolInterop> -Datastore <DatastoreInterop> [-EnableHA] [-HADatastore <DatastoreInterop>] [-Universal]
[-EnableLocalEgress] [-Tenant <String>] [-Connection <PSObject>] [<CommonParameters>]
New-NsxLogicalRouter -Name <String> -ManagementPortGroup <Object> -Interface <XmlElement[]> -Cluster
<ClusterInterop> -Datastore <DatastoreInterop> [-EnableHA] [-HADatastore <DatastoreInterop>] [-Universal]
[-EnableLocalEgress] [-Tenant <String>] [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
An NSX Logical Router is a distributed routing function implemented within
the ESXi kernel, and optimised for east west routing.
This cmdlet creates a new Logical Router. A Logical router has many
configuration options - not all are exposed with New-NsxLogicalRouter.
Use Set-NsxLogicalRouter for other configuration.
Interface configuration is handled by passing interface spec objects created by
the New-NsxLogicalRouterInterfaceSpec cmdlet.
A valid PowerCLI session is required to pass required objects as required by
cluster/resourcepool and datastore parameters.
PARAMETERS
-Name <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ManagementPortGroup <Object>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Interface <XmlElement[]>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ResourcePool <ResourcePoolInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Cluster <ClusterInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Datastore <DatastoreInterop>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EnableHA [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-HADatastore <DatastoreInterop>
Required? false
Position? named
Default value $datastore
Accept pipeline input? false
Accept wildcard characters? false
-Universal [<SwitchParameter>]
Set to deploy as a universal distributed logical router.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-EnableLocalEgress [<SwitchParameter>]
Create the universal logical router with Local Egress enabled.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Tenant <String>
Optional tenant string to be configured on the DLR.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
Default value $defaultNSXConnection
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Create a new LR with interfaces on existsing Logical switches (LS1,2,3 and
Management interface on Mgmt)
PS C:\\> $ls1 = get-nsxtransportzone | get-nsxlogicalswitch LS1
PS C:\\> $ls2 = get-nsxtransportzone | get-nsxlogicalswitch LS2
PS C:\\> $ls3 = get-nsxtransportzone | get-nsxlogicalswitch LS3
PS C:\\> $mgt = get-nsxtransportzone | get-nsxlogicalswitch Mgmt
PS C:\\> $vnic0 = New-NsxLogicalRouterInterfaceSpec -Type uplink -Name vNic0
-ConnectedTo $ls1 -PrimaryAddress 1.1.1.1 -SubnetPrefixLength 24
PS C:\\> $vnic1 = New-NsxLogicalRouterInterfaceSpec -Type internal -Name vNic1
-ConnectedTo $ls2 -PrimaryAddress 2.2.2.1 -SubnetPrefixLength 24
PS C:\\> $vnic2 = New-NsxLogicalRouterInterfaceSpec -Type internal -Name vNic2
-ConnectedTo $ls3 -PrimaryAddress 3.3.3.1 -SubnetPrefixLength 24
PS C:\\> New-NsxLogicalRouter -Name testlr -ManagementPortGroup $mgt
-Interface $vnic0,$vnic1,$vnic2 -Cluster (Get-Cluster)
-Datastore (get-datastore)
RELATED LINKS