Table of Contents

Configuring private and public IP addresses in Azure

Configuring private and public IP addresses in Azure is a quintessential skill for any ambitious Azure Administrator studying for the AZ-104 Microsoft Azure Administrator Exam. As an Azure Administrator, you must know how to manage these IP addresses. This post will explain what these IP addresses are, the key differences and how to configure them.

Private and Public IP Addresses in Azure

An IP address is an identifier for a network interface of a computer or network device participating in a network that uses the Internet Protocol for communication. In Azure, there are two types of IP addresses – private and public.

  • Private IP addresses, like their name suggests, are used within a network. These IP addresses are used for communication within an Azure virtual network and its connected networks. Private IP addresses are not reachable over the Internet.
  • Public IP addresses, on the other hand, are accessible over the Internet. They can be associated directly to a resource or to a Network Interface attached to a Virtual Machine.

Difference Between Private and Public IP Addresses

Private IP Addresses Public IP Addresses
Accessibility Not accessible over the Internet Accessible over the Internet
Usability Useful for communication within a network Useful for communication over the Internet
Resource Association Can be static or dynamic Reserved for a specific resource

Configuring Private IP Addresses in Azure

To configure a private IP address in Azure, you must be operating within the boundary of a virtual network. Here is a step by step guide on how to do this:

Step 1: Navigate to the “Virtual network” blade in your Azure portal.

Step 2: Click on “Subnets” and then “+Subnet” to create a new subnet. Fill in the necessary details like Subnet name, Subnet address range, etc.

Step 3: Click “Create”.

Step 4: Now, a private IP address will be automatically allocated to the new subnet as per the range provided.

Configuring Public IP Addresses in Azure

To configure a public IP in Azure, you can associate it to a new or existing Virtual Machine (VM), network interface or other resources. Here’s how:

Step 1: Navigate to the “Virtual network” blade in your Azure portal.

Step 2: Click on “+Add” and select “Public IP address” from the market place.

Step 3: Fill in the necessary details like Name, Subscription, Resource Group, etc. Set the IP version, the IP address type.

Step 4: Click “Create”.

Remember, charges are applicable for using public IP addresses in Azure.

By understanding and correctly configuring private and public IPs, you can control how your Azure resources communicate with each other and other resources on the Internet, making it a vital part of AZ-104 Microsoft Azure Administrator Exam. Practice configuring these IP addresses in Azure to get a good grip on this concept.

Practice Test

True or False: Public IP addresses are used for communication within a network.

  • 1) True
  • 2) False

Answer: False

Explanation: Private IP addresses are used for communication within a network, while public IP addresses are used for communication over the Internet.

Which of these addresses can be used as a private IP address? (Select all that apply)

  • A) 1
  • B) 1
  • C) 1
  • D) 0

Answer: A, B, C

Explanation: The IP addresses from 0 to 255, 0 to 255, and 0 to 255 are reserved for private networks.

In Azure, can two virtual machines share the same private IP address?

  • 1) Yes
  • 2) No

Answer: No

Explanation: Private IP addresses must be unique within a subnet or virtual network, otherwise, IP conflicts may arise.

Can a virtual machine in Azure have both a public and private IP address?

  • 1) Yes
  • 2) No

Answer: Yes

Explanation: Azure allows virtual machines to have both a public and private IP address, providing you with more security and network functionality.

Which statement is not true about public IP addresses in Azure?

  • A) Public IP addresses allow communication to and from Azure datacenters
  • B) Every virtual machine in Azure is automatically assigned a public IP address
  • C) Public IP addresses are always static
  • D) You can choose to assign a public IP address to your virtual machine or not

Answer: C

Explanation: Public IP addresses in Azure can be static or dynamic. The default assignment is dynamic.

Are all public IP addresses in Azure static?

  • 1) Yes
  • 2) No

Answer: No

Explanation: In Azure, public IP addresses can either be static or dynamic.

What is the function of a Resource Group in Azure when it comes to IP addresses?

  • A) To provide a way for multiple IP addresses to communicate
  • B) To define a geographical location for the IP addresses
  • C) To organize IP addresses
  • D) To associate private IP addresses with virtual machines

Answer: C

Explanation: A Resource Group in Azure is a method to organize resources, such as IP addresses, based on their lifecycle and project.

True or False: If a Virtual Network (VNet) is deleted in Azure, the associated private IP addresses are also deleted.

  • 1) True
  • 2) False

Answer: True

Explanation: When a VNet is deleted, all of its associated resources, including private IP addresses, are also deleted.

In Azure, you can assign a private IP address to which of the following resources? (Select all that apply)

  • A) Virtual machines
  • B) VPN Gateways
  • C) Load Balancers
  • D) Azure Storage

Answer: A, B, C

Explanation: You cannot assign a private IP to Azure Storage as it uses a unique public URI for access.

True or False: You can reserve a public IP address in Azure for future use.

  • 1) True
  • 2) False

Answer: True

Explanation: Azure allows you to reserve both dynamic and static public IP addresses, which you can keep until you choose to delete them.

Interview Questions

What is the difference between Public IP and Private IP addresses?

Public IP addresses are addresses which are exposed to the internet, and therefore they must be unique across the entire internet. Private IP addresses are for use within a private network and they can be reused across different networks.

What are the ranges of IP addresses reserved for private networks?

The ranges of IP addresses reserved for private networks are 10.0.0.0 – 10.255.255.255, 172.16.0.0 – 172.31.255.255, and 192.168.0.0 – 192.168.255.255.

What are the two types of Public IPs provided by Azure?

Azure offers two types of Public IPs: Dynamic Public IP addresses, which change every time a user stops and restarts their instances, and Static Public IP addresses, which allow you to assign a fixed IP address to a resource.

How can you change a public IP address from dynamic to static in Azure?

From the Azure portal, navigate to the IP address resource, then under settings, choose Configuration. Then you can choose Static and Save to change the IP address from Dynamic to Static.

Can you associate a network interface with multiple public IP addresses in Azure?

Yes, in Azure, you can associate multiple public IP addresses to the same network interface.

Can you assign both a public IP and private IP address to an Azure VM?

Yes, an Azure VM can have both a public IP and private IP address. However, the private IP address is required, while the public IP address is optional.

True or False. Once an Azure public IP address is disassociated from a resource, the IP address returns to the pool and you won’t be able to get it back.

True. Once an Azure public IP address is disassociated from a resource and isn’t assigned to another resource within a certain amount of time, it goes back into the pool.

What is the maximum number of private IP addresses that an Azure virtual machine can have?

The maximum number of private IP addresses that an Azure virtual machine can have varies by the size of the VM, but it’s typically between 1 and 256.

Are private IP addresses in Azure reachable over the Internet?

No, private IP addresses in Azure are not reachable over the Internet. They are within the Virtual Network and its connected networks.

What is Network Address Translation (NAT)?

Network Address Translation (NAT) is a method used by routers to translate a public IP address (used on the internet) into a private IP address (used on your home network) and vice versa.

How can you enforce IP restrictions to your Azure App Service?

In the Azure portal, you can enforce IP restrictions to Azure App Service by navigating to the Networking section of the App Service and adding the desired IP addresses to the Access Restrictions.

What is an Azure Reserved IP address?

An Azure Reserved IP address is a public IP address that you reserve, which can be used as a VIP address for any cloud service in the region in which it was reserved.

How many IP Addresses does Azure allow per subscription?

Azure allows up to 60,000 Public IP addresses per subscription.

How many private IP addresses are allowed per Virtual Network in Azure?

The number of private IP addresses per Virtual Network in Azure is limited only by the address space of the VNet.

What is the difference between a Basic and a Standard public IP address in Azure?

A Basic public IP address is created with the Basic SKU and a Standard public IP address is created with the Standard SKU. Standard SKU IP addresses have more capabilities and features than Basic SKU IP addresses, such as zone resiliency and Secure NAT for Virtual Network NAT.

Leave a Reply

Your email address will not be published. Required fields are marked *