AZ-305 Design infrastructure solutions Practice Question
Network Topology
You executed the above Azure CLI commands. The remote VNet (yourVNet) has address space 10.1.0.0/16. What is the result?
⚠ Common exam trap
Test-takers frequently think the 'az network vnet create' command only creates a single subnet or that the peering command will fail due to missing parameters, but the CLI defaults allow both subnets and peering to succeed without explicit flags.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A VNet with two subnets is created, and a VNet peering is established.
The Azure CLI commands create a VNet named 'myVNet' with two subnets ('subnet1' and 'subnet2') using the 'az network vnet create' command, which supports multiple subnet configurations in a single call. The subsequent 'az network vnet peering create' command establishes a VNet peering from 'myVNet' to the remote VNet 'yourVNet' (address space 10.1.0.0/16). Since both VNets exist and the commands are syntactically correct, the result is a VNet with two subnets and a successful peering.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The peering command fails because the remote VNet does not exist.
Why it's wrong here
The remote VNet is created earlier in the same Azure CLI script, so it exists in the same resource group before the peering command runs. The `az network vnet peering create` command would only fail with a 'ResourceNotFound' error if the remote VNet's name or resource group were invalid, but here the peering is established successfully.
- ✗
A VNet with one subnet is created, and no peering is established.
Why it's wrong here
The script executes two separate `az network vnet subnet create` commands, so both subnets are created. Because no command fails, the subsequent `az network vnet peering create` command runs and completes, establishing connectivity between the local and remote VNets.
- ✓
A VNet with two subnets is created, and a VNet peering is established.
Why this is correct
The sequence of Azure CLI commands creates the VNet, adds a second subnet, and then creates a VNet peering from the local to the remote VNet. Both subnets are created before peering, and the peering resource is successfully provisioned, allowing resources in the two VNets to communicate.
- ✗
Only the first subnet is created, and the peering is established.
Why it's wrong here
The second `az network vnet subnet create` command does not fail; it successfully creates the subnet in the same VNet. The peering is then established after both subnets exist, so the final state includes both subnets, not just the first one.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 795 original AZ-305 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-305 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-305 exam.