az network nic

Manage network interfaces.

Commands

az network nic create Create a network interface.
az network nic delete Delete a network interface.
az network nic ip-config Manage IP configurations of a network interface.
az network nic ip-config address-pool Manage backend address pools in an IP configuration.
az network nic ip-config address-pool add Add a backend address pool.
az network nic ip-config address-pool remove Remove a backend address pool.
az network nic ip-config create Create an IP configuration.
az network nic ip-config delete Delete an IP configuration.
az network nic ip-config inbound-nat-rule Manage inbound NAT rules for an IP configuration.
az network nic ip-config inbound-nat-rule add Add an inbound NAT rule.
az network nic ip-config inbound-nat-rule remove Remove an inbound NAT rule.
az network nic ip-config list List IP configurations.
az network nic ip-config show Get the details of an IP configuration.
az network nic ip-config update Update an IP configuration.
az network nic list List network interfaces.
az network nic list-effective-nsg List all network security groups applied to a network interface.
az network nic show Get the details of a network interface.
az network nic show-effective-route-table Show all route tables applied to a network interface.
az network nic update Update a network interface.

az network nic create

Create a network interface.

az network nic create --name
--resource-group
--subnet
[--accelerated-networking {false, true}]
[--application-security-groups]
[--dns-servers]
[--internal-dns-name]
[--ip-forwarding {false, true}]
[--lb-address-pools]
[--lb-inbound-nat-rules]
[--lb-name]
[--location]
[--network-security-group]
[--private-ip-address]
[--private-ip-address-version {IPv4, IPv6}]
[--public-ip-address]
[--tags]
[--vnet-name]

Examples

Create a network interface for a specified subnet on a specified virtual network.

az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic

Create a network interface for a specified subnet on a virtual network which allows IP forwarding subject to a network security group.

az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic     --ip-forwarding --network-security-group MyNsg

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
--subnet
Name or ID of an existing subnet. If name specified, also specify --vnet-name.

Optional Parameters

--accelerated-networking
Enable accelerated networking.
accepted values: false, true
--application-security-groups
Space separated list of application security groups.
--dns-servers
Space separated list of DNS server IP addresses.
--internal-dns-name
The internal DNS name label.
--ip-forwarding
Enable IP forwarding.
accepted values: false, true
--lb-address-pools
Space separated list of names or IDs of load balancer address pools to associate with the NIC. If names are used, --lb-name must be specified.
--lb-inbound-nat-rules
Space separated list of names or IDs of load balancer inbound NAT rules to associate with the NIC. If names are used, --lb-name must be specified.
--lb-name
The name of the load balancer to use when adding NAT rules or address pools by name (ignored when IDs are specified).
--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--network-security-group
Name or ID of an existing network security group, or none by default.
--private-ip-address
Static private IP address to use.
--private-ip-address-version
The private IP address version to use.
accepted values: IPv4, IPv6
default value: IPv4
--public-ip-address
Name or ID of an existing public IP address, or none by default.
--tags
Space separated tags in 'key[=value]' format. Use "" to clear existing tags.
--vnet-name
The virtual network (VNet) name.

az network nic delete

Delete a network interface.

az network nic delete --name
--resource-group

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az network nic list

List network interfaces.

az network nic list [--resource-group]

Examples

List all NICs by internal DNS suffix.

az network nic list --query "[?dnsSettings.internalDomainNameSuffix==``]"

Optional Parameters

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

az network nic list-effective-nsg

List all network security groups applied to a network interface.

az network nic list-effective-nsg --name
--resource-group

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az network nic show

Get the details of a network interface.

az network nic show --name
--resource-group
[--expand]

Examples

Get the internal domain name suffix for a NIC.

az network nic show -g MyResourceGroup -n MyNic --query "dnsSettings.internalDomainNameSuffix"

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--expand
Expands referenced resources.

az network nic show-effective-route-table

Show all route tables applied to a network interface.

az network nic show-effective-route-table --name
--resource-group

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az network nic update

Update a network interface.

az network nic update --name
--resource-group
[--accelerated-networking {false, true}]
[--add]
[--dns-servers]
[--internal-dns-name]
[--ip-forwarding {false, true}]
[--network-security-group]
[--remove]
[--set]

Examples

Update a network interface to use a different network security group.

az network nic update -g MyResourceGroup -n MyNic --network-security-group MyNsg

Required Parameters

--name -n
The network interface (NIC).
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--accelerated-networking
Enable accelerated networking.
accepted values: false, true
--add
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .
--dns-servers
Space separated list of DNS server IP addresses. Use "" to revert to default Azure servers.
--internal-dns-name
The internal DNS name label.
--ip-forwarding
Enable IP forwarding.
accepted values: false, true
--network-security-group
Name or ID of the associated network security group.
--remove
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
--set
Update an object by specifying a property path and value to set. Example: --set property1.property2=.