nerdexam
MicrosoftMicrosoft

AZ-104 · Question #678

AZ-104 Question #678: Real Exam Question with Answer & Explanation

The correct approach is to select "VNet2 or VNet3 only" for the virtual network and "/23" for the subnet mask, as these VNets have sufficient available address space to accommodate the required minimum /23 subnet for an Azure Container Apps environment.

Submitted by luis.pe· Mar 4, 2026Deploy and manage Azure compute resources

Question

Hotspot Question You have an Azure subscription that contains the virtual networks shown in the following table. The subnets have the IP address spaces shown in the following table. You plan to create a container app named contapp1 in the East US Azure region. You need to create a container app environment named con-env1 that meets the following requirements: - Uses its own virtual network. - Uses its own subnet. - Is connected to the smallest possible subnet. To which virtual networks can you connect con-env1, and which subnet mask should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Answer:

Options

  • __typehotspot
  • variantyes_no

Explanation

The correct approach is to select "VNet2 or VNet3 only" for the virtual network and "/23" for the subnet mask, as these VNets have sufficient available address space to accommodate the required minimum /23 subnet for an Azure Container Apps environment.

Approach. The question asks to create an Azure Container App environment (con-env1) that "Uses its own subnet" and "Is connected to the smallest possible subnet."

1. Determine the required subnet mask: According to Microsoft documentation for Azure Container Apps, an environment requiring VNet injection (which is implied by creating a new environment and connecting to a VNet/subnet) needs an infrastructure subnet with a minimum size of /23 (512 IP addresses). Therefore, from the given options, /23 is the "smallest possible" valid subnet mask that meets the service's requirements.

2. Calculate available address space in each VNet for a new /23 subnet:

  • VNet1 (10.1.128.0/23): Total 512 IPs. Subnet1 uses 10.1.128.0/24 (256 IPs). The remaining available address space is 10.1.129.0/24 (256 IPs). Since the Container App Environment requires a /23 subnet (512 IPs), and VNet1 only has a /24 (256 IPs) block available, VNet1 cannot accommodate the required subnet.
  • VNet2 (192.168.0.0/16): Total 65536 IPs. Subnet21 uses 192.168.0.0/17 (32768 IPs). Subnet22 (192.168.128.0/17) is defined in Table 2 but is not listed as an existing subnet within VNet2 in Table 1. This implies that the 192.168.128.0/17 address space (32768 IPs) is available for new subnets. This block is large enough to carve out a new /23 subnet (512 IPs). Thus, VNet2 can accommodate the required subnet.
  • VNet3 (172.16.0.0/16): Total 65536 IPs. Subnet3 uses 172.16.1.0/24 (256 IPs). This leaves ample remaining address space within the /16 VNet. For example, 172.16.0.0/23 (512 IPs) is available. This block is large enough for a new /23 subnet. Thus, VNet3 can accommodate the required subnet.

3. Select the appropriate options in the answer area: Based on the analysis, only VNet2 and VNet3 have sufficient available space to create a new /23 subnet.

  • For "Virtual network:", the correct selection is "VNet2 or VNet3 only".
  • For "Subnet mask:", the correct selection is "/23".

Common mistakes.

  • common_mistake. Common mistakes include:
  • Selecting VNet1 for the virtual network: Although VNet1 has an overall /23 address space, Subnet1 already consumes a /24 within it. The remaining /24 address space is insufficient to create a new /23 subnet (512 IPs) for the Container App environment.
  • Selecting subnet masks other than /23: While options like /28 (16 IPs) or /26 (64 IPs) are numerically smaller, they are too small to meet the minimum requirement for an Azure Container Apps environment's infrastructure subnet, which is /23 (512 IPs). /24 (256 IPs) is also too small. /16 (65536 IPs) is valid but not the "smallest possible" from the valid options.
  • Incorrectly interpreting Subnet22: A test-taker might mistakenly assume Subnet22 is an existing subnet that fully occupies the other half of VNet2's address space. However, Table 1 explicitly lists only Subnet21 and Subnet23 as existing in VNet2. Subnet22 is only defined in Table 2, implying its IP range (192.168.128.0/17) is available for allocation within VNet2, as it falls within VNet2's /16 range and is not listed as occupied by an existing subnet in Table 1. If one were to assume Subnet21 and Subnet22 together completely fill VNet2, they would incorrectly conclude VNet2 has no available space.

Concept tested. This question tests the candidate's understanding of:

  1. Azure Networking Basics: IP addressing, CIDR notation, subnetting, and calculating available address space within a Virtual Network.
  2. Azure Container Apps Environment Networking Requirements: Specifically, the minimum subnet size (e.g., /23 for an infrastructure subnet) required for deploying a Container Apps environment into a virtual network.
  3. Reading and Interpreting Exhibit Data: Carefully extracting information from multiple tables and reconciling potential ambiguities to determine valid options and available resources.

Reference. https://learn.microsoft.com/en-us/azure/container-apps/vnet-overview?tabs=workload-profiles-manual

Topics

#Azure Container Apps#VNet integration#Subnet sizing#IP addressing

Community Discussion

No community discussion yet for this question.

Full AZ-104 PracticeBrowse All AZ-104 Questions