Bird
Raised Fist0
Azurecloud~20 mins

Public IP addresses in Azure - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Public IP Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
Understanding Azure Public IP Address Allocation

In Azure, when you create a Public IP address resource, what is the difference between Static and Dynamic allocation methods?

AStatic allocation means the IP address is only available during business hours, Dynamic allocation is available 24/7.
BStatic allocation assigns an IP address from a pool shared by all users, while Dynamic allocation assigns a unique IP address permanently.
CStatic allocation automatically changes the IP address daily, Dynamic allocation keeps the same IP address forever.
DStatic allocation assigns a fixed IP address that does not change, while Dynamic allocation assigns an IP address that can change when the resource is stopped and started.
Attempts:
2 left
💡 Hint

Think about whether the IP address stays the same or can change over time.

❓ Architecture
intermediate
2:00remaining
Choosing Public IP SKU for High Availability

You want to assign a Public IP address to a virtual machine scale set in Azure that requires zone redundancy and protection against IP address loss during maintenance. Which Public IP SKU should you choose?

ADynamic Basic Public IP
BBasic SKU Public IP
CStandard SKU Public IP
DClassic Public IP
Attempts:
2 left
💡 Hint

Consider which SKU supports zone redundancy and SLA guarantees.

❓ security
advanced
2:00remaining
Securing Access to Azure Public IP Addresses

You have a Public IP address assigned to a virtual machine in Azure. You want to restrict inbound traffic so only specific IP addresses can connect. Which Azure service should you configure?

AAzure Network Security Group (NSG) with inbound rules
BAzure Application Gateway with WAF
CAzure Traffic Manager with geographic routing
DAzure Load Balancer with NAT rules
Attempts:
2 left
💡 Hint

Think about controlling network traffic at the subnet or NIC level.

❓ Configuration
advanced
2:00remaining
Assigning a Public IP to an Azure Load Balancer

Which of the following JSON snippets correctly defines a Standard SKU Public IP resource in an Azure Resource Manager (ARM) template with static allocation?

A
{
  "type": "Microsoft.Network/publicIPAddresses",
  "apiVersion": "2022-05-01",
  "name": "myPublicIP",
  "location": "eastus",
  "sku": { "name": "Basic" },
  "properties": {
    "publicIPAllocationMethod": "Dynamic"
  }
}
B
{
  "type": "Microsoft.Network/publicIPAddresses",
  "apiVersion": "2022-05-01",
  "name": "myPublicIP",
  "location": "eastus",
  "sku": { "name": "Standard" },
  "properties": {
    "publicIPAllocationMethod": "Static",
    "idleTimeoutInMinutes": 10
  }
}
C
{
  "type": "Microsoft.Network/publicIPAddresses",
  "apiVersion": "2022-05-01",
  "name": "myPublicIP",
  "location": "eastus",
  "sku": { "name": "Standard" },
  "properties": {
    "publicIPAllocationMethod": "Static"
  }
}
D
{
  "type": "Microsoft.Network/publicIPAddresses",
  "apiVersion": "2022-05-01",
  "name": "myPublicIP",
  "location": "eastus",
  "sku": { "name": "Standard" },
  "properties": {
    "allocationMethod": "Static"
  }
}
Attempts:
2 left
💡 Hint

Check the property names and SKU values carefully.

✅ Best Practice
expert
3:00remaining
Designing Public IP Usage for Cost and Security Optimization

You manage multiple Azure virtual machines that require internet access but do not need inbound connections from the internet. What is the best practice regarding Public IP address assignment to optimize cost and security?

AUse a NAT gateway with a single Public IP address for outbound internet access and no Public IPs on individual VMs.
BAssign a Public IP address to each virtual machine to allow outbound internet access.
CAssign dynamic Public IP addresses to each VM to reduce cost and allow inbound access when needed.
DUse Azure Firewall with Public IPs assigned to each VM for outbound and inbound traffic control.
Attempts:
2 left
💡 Hint

Consider how to provide outbound internet access without exposing VMs to inbound traffic.

Practice

(1/5)
1.

What is the main purpose of a Public IP address in Azure?

easy
A. To allow cloud resources to connect to the internet
B. To secure internal communication within a virtual network
C. To store data securely in the cloud
D. To monitor resource usage and billing

Solution

  1. Step 1: Understand Public IP role

    Public IP addresses enable resources to communicate over the internet.
  2. Step 2: Compare options

    Only To allow cloud resources to connect to the internet describes internet connectivity, others describe unrelated functions.
  3. Final Answer:

    To allow cloud resources to connect to the internet -> Option A
  4. Quick Check:

    Public IP = Internet access [OK]
Hint: Public IP means internet access for resources [OK]
Common Mistakes:
  • Confusing Public IP with internal network IP
  • Thinking Public IP stores data
  • Mixing Public IP with monitoring tools
2.

Which option correctly defines a Static Public IP address in Azure?

publicIpAllocationMethod: ?
easy
A. "Fixed"
B. "Dynamic"
C. "Manual"
D. "Static"

Solution

  1. Step 1: Recall allocation methods

    Azure uses "Static" and "Dynamic" as valid allocation methods for Public IPs.
  2. Step 2: Identify correct syntax

    "Static" is the exact string to assign for fixed IP allocation.
  3. Final Answer:

    "Static" -> Option D
  4. Quick Check:

    Static = fixed IP allocation [OK]
Hint: Static means fixed IP, use exact string "Static" [OK]
Common Mistakes:
  • Using "Manual" or "Fixed" which are invalid values
  • Confusing "Dynamic" with static allocation
  • Omitting quotes around the string
3.

Given this Azure CLI command, what will be the SKU of the created Public IP?

az network public-ip create --name MyIP --resource-group MyGroup --sku Standard --allocation-method Static
medium
A. Standard
B. Basic
C. Premium
D. Dynamic

Solution

  1. Step 1: Identify SKU parameter

    The command includes "--sku Standard", which sets the SKU to Standard.
  2. Step 2: Understand SKU options

    Standard and Basic are common SKUs; Premium is not valid here, Dynamic is allocation method.
  3. Final Answer:

    Standard -> Option A
  4. Quick Check:

    --sku Standard means Standard SKU [OK]
Hint: Look for --sku value to find SKU type [OK]
Common Mistakes:
  • Confusing allocation method with SKU
  • Assuming default SKU is Basic without checking
  • Selecting Dynamic which is not a SKU
4.

Identify the error in this Azure Resource Manager (ARM) template snippet for a Public IP:

{
  "type": "Microsoft.Network/publicIPAddresses",
  "apiVersion": "2021-02-01",
  "name": "myPublicIP",
  "properties": {
    "publicIPAllocationMethod": "Static",
    "sku": "Standard"
  }
}
medium
A. "name" must be inside "properties"
B. "sku" should be outside "properties" block
C. "publicIPAllocationMethod" value should be "Dynamic"
D. "apiVersion" is invalid

Solution

  1. Step 1: Check ARM template structure

    In ARM templates, "sku" is a top-level property, not inside "properties".
  2. Step 2: Validate other fields

    "publicIPAllocationMethod" can be "Static" inside properties; "name" is correctly placed; "apiVersion" is valid.
  3. Final Answer:

    "sku" should be outside "properties" block -> Option B
  4. Quick Check:

    SKU location in ARM = outside properties [OK]
Hint: "sku" is a sibling of "properties", not inside it [OK]
Common Mistakes:
  • Placing "sku" inside properties
  • Changing allocation method unnecessarily
  • Misplacing "name" property
5.

You want a Public IP that never changes and offers better reliability for a production web app. Which combination should you choose?

hard
A. Dynamic allocation with Basic SKU
B. Static allocation with Basic SKU
C. Static allocation with Standard SKU
D. Dynamic allocation with Standard SKU

Solution

  1. Step 1: Understand allocation methods

    Static allocation ensures the IP address does not change over time.
  2. Step 2: Choose SKU for reliability

    Standard SKU provides better features and reliability than Basic SKU.
  3. Step 3: Combine for production needs

    Static allocation with Standard SKU fits production web app requirements.
  4. Final Answer:

    Static allocation with Standard SKU -> Option C
  5. Quick Check:

    Static + Standard = fixed, reliable IP [OK]
Hint: Static + Standard SKU = fixed and reliable IP [OK]
Common Mistakes:
  • Choosing Dynamic allocation for fixed IP needs
  • Using Basic SKU for production reliability
  • Mixing SKU and allocation method incorrectly
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard