The correct answer is that the rule allows inbound TCP traffic on ports 80 and 443 only from the same subnet. This is because the NSG rule explicitly defines the SourceAddressPrefixes as 10.0.1.0/24, which matches the subnet’s own address space, so only traffic originating from within that subnet is permitted. On the AZ-305 exam, this scenario tests your understanding of how NSG source and destination prefixes control traffic flow, and a common trap is assuming a missing source prefix means “any” when the JSON clearly specifies a subnet range. Remember, an NSG rule with a source prefix matching the subnet’s CIDR creates a loopback-like restriction, allowing only internal communication. Memory tip: “Same subnet, same prefix—only local traffic gets the green light.”
AZ-305 Design infrastructure solutions Practice Question
This AZ-305 practice question tests your understanding of design infrastructure solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
```json
{
"Name": "Allow specific traffic",
"Priority": 100,
"Direction": "Inbound",
"Access": "Allow",
"SourceAddressPrefixes": ["10.0.1.0/24"],
"DestinationAddressPrefixes": ["*"],
"DestinationPortRanges": ["80", "443"],
"Protocol": "TCP"
}
```
You are reviewing a network security group (NSG) rule for a subnet that hosts web servers. The subnet's address space is 10.0.1.0/24. What is the effect of this rule?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The rule allows inbound TCP traffic on ports 80 and 443 from the same subnet.
Option A is correct because the rule allows inbound TCP traffic on ports 80 and 443 from any source (SourceAddressPrefixes is missing, but by default it means any; however, the JSON shows SourceAddressPrefixes with 10.0.1.0/24, so it only allows from that subnet). Wait, the exhibit shows SourceAddressPrefixes: ["10.0.1.0/24"], so the rule allows inbound traffic from the same subnet. Option A is incorrect because it says 'from any source'. Actually, the rule allows from 10.0.1.0/24 only. So Option D is correct: The rule allows inbound traffic from the same subnet. Option B (deny) is false. Option C (allow from internet) is false. Option D is correct.
Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
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 rule allows inbound TCP traffic on ports 80 and 443 from any source.
Why it's wrong here
Source is restricted to 10.0.1.0/24.
✓
The rule allows inbound TCP traffic on ports 80 and 443 from the same subnet.
The rule denies inbound TCP traffic on ports 80 and 443 from any source.
Why it's wrong here
Access is Allow.
✗
The rule allows inbound TCP traffic on ports 80 and 443 from the internet.
Why it's wrong here
Source is internal subnet, not internet.
Common exam traps
Common exam trap: usable hosts are not the same as total addresses
Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.
Detailed technical explanation
How to think about this question
Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.
KKey Concepts to Remember
CIDR notation defines the prefix length.
Block size helps identify subnet boundaries.
Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
The required host count determines the smallest suitable subnet.
TExam Day Tips
→Write the block size before choosing the subnet.
→Check whether the question asks for hosts, subnets or a specific address range.
→Do not confuse /24, /25, /26 and /27 host counts.
Key takeaway
Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Real-world example
How this comes up in practice
A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this AZ-305 question in full detail.
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related AZ-305 subnetting questions on CIDR, address ranges, and subnet selection.
Design infrastructure solutions — This question tests Design infrastructure solutions — CIDR notation defines the prefix length..
What is the correct answer to this question?
The correct answer is: The rule allows inbound TCP traffic on ports 80 and 443 from the same subnet. — Option A is correct because the rule allows inbound TCP traffic on ports 80 and 443 from any source (SourceAddressPrefixes is missing, but by default it means any; however, the JSON shows SourceAddressPrefixes with 10.0.1.0/24, so it only allows from that subnet). Wait, the exhibit shows SourceAddressPrefixes: ["10.0.1.0/24"], so the rule allows inbound traffic from the same subnet. Option A is incorrect because it says 'from any source'. Actually, the rule allows from 10.0.1.0/24 only. So Option D is correct: The rule allows inbound traffic from the same subnet. Option B (deny) is false. Option C (allow from internet) is false. Option D is correct.
What should I do if I get this AZ-305 question wrong?
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related AZ-305 subnetting questions on CIDR, address ranges, and subnet selection.
What is the key concept behind this question?
CIDR notation defines the prefix length.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.