O'Reilly logo

Hands-On Networking with Azure by Mohamed Waly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an additional IP address using Azure PowerShell

Let's add additional private and public IP addresses to an NIC.

First, you need to create a public IP address by running the following cmdlet:

$PIP = New-AzureRmPublicIpAddress -Name NewPIP -ResourceGroupName PacktPub -Location WestEurope -AllocationMethod Dynamic

Next, you add the desired public and private IP addresses with the following cmdlet:

New-AzureRmNetworkInterfaceIpConfig -Name AdditionalIPConfig-Subnet $Subnet -PrivateIpAddress 192.168.1.10 -PublicIpAddress $PIP

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required