Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az stack-hci-vm network lnet

Note

This reference is part of the stack-hci-vm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stack-hci-vm network lnet command. Learn more about extensions.

Manage logicalnetworks with stack-hci-vm.

Commands

Name Description Type Status
az stack-hci-vm network lnet create

Create a logical network.

Extension GA
az stack-hci-vm network lnet delete

Delete a logical network.

Extension GA
az stack-hci-vm network lnet list

List all the logical networks.

Extension GA
az stack-hci-vm network lnet show

Get the details of a logical network.

Extension GA
az stack-hci-vm network lnet update

Update a logical network.

Extension GA

az stack-hci-vm network lnet create

Create a logical network.

az stack-hci-vm network lnet create --custom-location
 --name
 --resource-group
 [--acquire-policy-token]
 [--address-prefixes]
 [--change-reference]
 [--dns-servers]
 [--fabric-netcfg-id --fabric-network-configuration-id]
 [--gateway]
 [--ip-allocation-method {Dynamic, Static}]
 [--ip-pool-end]
 [--ip-pool-start]
 [--ip-pool-type]
 [--ip-pools]
 [--location]
 [--network-security-group --nsg]
 [--no-dns-servers {false, true}]
 [--no-gateway {false, true}]
 [--polling-interval]
 [--routes]
 [--subnets]
 [--tags]
 [--vlan]
 [--vm-switch-name]

Examples

PutLogicalNetwork

az stack-hci-vm network lnet create --resource-group "test-rg" --name "test-lnet" --location "eastus2euap" --tags env=prod --custom-location "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.ExtendedLocation/customLocations/test-location" --address-prefixes "10.0.0.0/16" --ip-allocation-method Static --ip-pool-type "vm" --ip-pool-start "10.0.0.0" --ip-pool-end "10.0.0.16" --vlan 10 --vm-switch-name "sampleVnet0920" --dns-servers 8.8.8.8 8.8.4.4 --fabric-network-configuration-id "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" --gateway 10.0.0.1 --network-security-group "myNSG" --polling-interval 30

Required Parameters

--custom-location

The ID of the custom location.

--name

Name of the logical network.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--address-prefixes

AddressPrefixes - List of space-separated address prefixes for the subnet. Currently only 1 address prefix is supported.

Usage: --address-prefixes "1.2.3.0/16".

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--dns-servers

Space-separated list of DNS server IP addresses.

Usage: --dns-servers 10.220.32.16 10.220.32.17.

--fabric-netcfg-id --fabric-network-configuration-id

The Azure Resource ID for a Managed Network Fabric L2ISD or L3ISD internal network to associate with this logical network.

--gateway

Gateway.

Usage: --gateway 1.2.3.4.

--ip-allocation-method

IPAllocationMethod - The IP address allocation method. Possible values include: Static, Dynamic.

Usage: --ip-allocation-method "Static/Dynamic".

Property Value
Accepted values: Dynamic, Static
--ip-pool-end

End of the ip address pool.

Usage: --ip-pool-end "1.2.3.4".

--ip-pool-start

Start of the ip address pool.

Usage: --ip-pool-start "1.2.3.0".

--ip-pool-type

Ip pool type.

Usage: --ip-pool-type "vm".

--ip-pools

Ippools.

Usage: --ip-pools '[{"start":"1.2.3.0", "end":"1.2.3.4", "ip_pool_type":"vm"}]'.

--location -l

If location is not specified, the location of the resource group is used.

--network-security-group --nsg

Name or ID of a network security group (NSG).

Usage: --network-security-group "myNSG".

--no-dns-servers

Pass this flag in order to bypass passing the dns-servers parameter.

Property Value
Accepted values: false, true
--no-gateway

Pass this flag in order to bypass passing the gateway parameter.

Property Value
Accepted values: false, true
--polling-interval

ARM polling interval for long running operations.

--routes

Collection of routes contained within a route table.

Usage: --routes '[{"name":"route1","properties":{"address_prefix":"1.2.3.0/28","next_hop_ip_address":"1.2.3.1"}},{"name":"route2","properties":{"address_prefix":"1.2.6.0/24","next_hop_ip_address":"1.2.6.1"}}]' Expected value: json-string/json-file/@json-file.

--subnets

Subnet - list of subnets under the logical network. All other subnet properties in the cli parameters will be ignored if this is provided. Expected value: json-string/@json-file.

Usage: --subnets '[{"properties":{"addressPrefix":"1.2.3.0/24","ipAllocationMethod":"Static","ipPools":[{"end":"1.2.3.10","start":"1.2.3.0","ipPoolType":"vm"},{"end":"1.2.3.15","start":"1.2.3.11","ipPoolType":"vm"}]}}]'.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--vlan

Vlan to use for the subnet.

Usage: --vlan 10.

Property Value
Default value: 0
--vm-switch-name

Name of the VM switch.

Usage: --vm-switch-name "vm-switch-01".

az stack-hci-vm network lnet delete

Delete a logical network.

az stack-hci-vm network lnet delete [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--polling-interval]
 [--resource-group]
 [--subscription]
 [--yes]

Examples

DeleteLogicalNetwork

az stack-hci-vm network lnet delete --resource-group "test-rg" --name "test-lnet"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the logical network.

Property Value
Parameter group: Resource Id Arguments
--polling-interval

ARM polling interval for long running operations.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

az stack-hci-vm network lnet list

List all the logical networks.

az stack-hci-vm network lnet list [--resource-group]

Examples

ListLogicalNetworkByResourceGroup

az stack-hci-vm network lnet list --resource-group "test-rg"

ListLogicalNetworkBySubscription

az stack-hci-vm network lnet list

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az stack-hci-vm network lnet show

Get the details of a logical network.

az stack-hci-vm network lnet show [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Examples

GetLogicalNetwork

az stack-hci-vm network lnet show --resource-group "test-rg" --name "test-lnet"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the logical network.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments

az stack-hci-vm network lnet update

Update a logical network.

az stack-hci-vm network lnet update [--acquire-policy-token]
 [--add]
 [--change-reference]
 [--dns-servers]
 [--force-string]
 [--ids]
 [--name]
 [--network-security-group --nsg]
 [--polling-interval]
 [--remove]
 [--resource-group]
 [--set]
 [--subscription]
 [--tags]

Examples

UpdateLogicalNetwork

az stack-hci-vm network lnet update --name "test-lnet" --resource-group "test-rg" --network-security-group myNSG --tags additionalProperties="sample" az stack-hci-vm network lnet update --name "test-lnet" --resource-group "test-rg" --dns-servers "10.0.0.15"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--dns-servers

Space-separated list of DNS server IP addresses.

Usage: --dns-servers 10.220.32.16 10.220.32.17.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the logical network.

Property Value
Parameter group: Resource Id Arguments
--network-security-group --nsg

Name or ID of a network security group (NSG).

Usage: --network-security-group "myNSG".

--polling-interval

ARM polling interval for long running operations.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.


Feedback

Was this page helpful?