az network nic ip-config

Manage IP configurations of a network interface.

Commands

az network nic ip-config address-pool Manage address pools in an IP configuration.
az network nic ip-config address-pool add Add an address pool to an IP configuration.
az network nic ip-config address-pool remove Remove an address pool of an IP configuration.
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 of an IP configuration.
az network nic ip-config inbound-nat-rule add Add an inbound NAT rule to an IP configuration.
az network nic ip-config inbound-nat-rule remove Remove an inbound NAT rule of an IP configuration.
az network nic ip-config list List the IP configurations of a NIC.
az network nic ip-config show Show the details of an IP configuration.
az network nic ip-config update Update an IP configuration.

az network nic ip-config create

Create an IP configuration.

az network nic ip-config create --name
--nic-name
--resource-group
[--app-gateway-address-pools]
[--application-security-groups]
[--gateway-name]
[--lb-address-pools]
[--lb-inbound-nat-rules]
[--lb-name]
[--make-primary]
[--private-ip-address]
[--private-ip-address-version {IPv4, IPv6}]
[--public-ip-address]
[--subnet]
[--subscription]
[--vnet-name]

Examples

Create a primary IP configuration for a NIC.

az network nic ip-config create -g MyResourceGroup -n MyIpConfig --nic-name MyNic --make-primary

Create an IP configuration. (autogenerated)

az network nic ip-config create --name MyIpConfig --nic-name MyNic --private-ip-address 10.0.0.9 --resource-group MyResourceGroup

Required Parameters

--name -n

The name of the IP configuration.

--nic-name

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

--app-gateway-address-pools

Space-separated list of names or IDs of application gateway backend address pools to associate with the NIC. If names are used, --gateway-name must be specified.

--application-security-groups

Space-separated list of application security groups.

--gateway-name

The name of the application gateway to use when adding address pools by name (ignored when IDs are specified).

--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).

--make-primary

Set to make this configuration the primary one for the NIC.

--private-ip-address

Static IP address to use or "" to use a dynamic address.

--private-ip-address-version
accepted values: IPv4, IPv6
--public-ip-address

Name or ID of the public IP to use.

--subnet

Name or ID of an existing subnet. If name is specified, also specify --vnet-name.

--subscription

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

--vnet-name

The virtual network (VNet) associated with the subnet (Omit if supplying a subnet id).

az network nic ip-config delete

Delete an IP configuration.

az network nic ip-config delete [--ids]
[--name]
[--nic-name]
[--resource-group]
[--subscription]

Examples

Delete an IP configuration.

az network nic ip-config delete -g MyResourceGroup -n MyIpConfig --nic-name MyNic

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the IP configuration.

--nic-name

The network interface (NIC).

--resource-group -g

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

--subscription

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

az network nic ip-config list

List the IP configurations of a NIC.

az network nic ip-config list --nic-name
--resource-group
[--subscription]

Examples

List the IP configurations of a NIC.

az network nic ip-config list -g MyResourceGroup --nic-name MyNic

Required Parameters

--nic-name

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

--subscription

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

az network nic ip-config show

Show the details of an IP configuration.

az network nic ip-config show [--ids]
[--name]
[--nic-name]
[--resource-group]
[--subscription]

Examples

Show the details of an IP configuration of a NIC.

az network nic ip-config show -g MyResourceGroup -n MyIpConfig --nic-name MyNic

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the IP configuration.

--nic-name

The network interface (NIC).

--resource-group -g

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

--subscription

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

az network nic ip-config update

Update an IP configuration.

az network nic ip-config update [--add]
[--app-gateway-address-pools]
[--application-security-groups]
[--force-string]
[--gateway-name]
[--ids]
[--lb-address-pools]
[--lb-inbound-nat-rules]
[--lb-name]
[--make-primary]
[--name]
[--nic-name]
[--private-ip-address]
[--private-ip-address-version {IPv4, IPv6}]
[--public-ip-address]
[--remove]
[--resource-group]
[--set]
[--subnet]
[--subscription]
[--vnet-name]

Examples

Update a NIC to use a new private IP address.

az network nic ip-config update -g MyResourceGroup --nic-name MyNic \
    -n MyIpConfig --private-ip-address 10.0.0.9

Make an IP configuration the default for the supplied NIC.

az network nic ip-config update -g MyResourceGroup --nic-name MyNic \
    -n MyIpConfig --make-primary

Update an IP configuration. (autogenerated)

az network nic ip-config update --name MyIpConfig --nic-name MyNic --public-ip-address MyAppGatewayPublicIp --resource-group MyResourceGroup

Optional Parameters

--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>.

--app-gateway-address-pools

Space-separated list of names or IDs of application gateway backend address pools to associate with the NIC. If names are used, --gateway-name must be specified.

--application-security-groups

Space-separated list of application security groups.

--force-string

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

--gateway-name

The name of the application gateway to use when adding address pools by name (ignored when IDs are specified).

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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).

--make-primary

Set to make this configuration the primary one for the NIC.

--name -n

The name of the IP configuration.

--nic-name

The network interface (NIC).

--private-ip-address

Static IP address to use or "" to use a dynamic address.

--private-ip-address-version
accepted values: IPv4, IPv6
--public-ip-address

Name or ID of the public IP to use.

--remove

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

--resource-group -g

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

--set

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

--subnet

Name or ID of an existing subnet. If name is specified, also specify --vnet-name.

--subscription

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

--vnet-name

The virtual network (VNet) associated with the subnet (Omit if supplying a subnet id).