mediummultiple choiceObjective-mapped

A subnet has a route table with a 0.0.0.0/0 user-defined route to an on-premises virtual appliance. The business now wants Azure VM outbound internet traffic to use a NAT gateway so the public source IP stays consistent, and the firewall appliance is no longer required for internet egress. What should the administrator do?

Question 1mediummultiple choice
Full question →

A subnet has a route table with a 0.0.0.0/0 user-defined route to an on-premises virtual appliance. The business now wants Azure VM outbound internet traffic to use a NAT gateway so the public source IP stays consistent, and the firewall appliance is no longer required for internet egress. What should the administrator do?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Keep the default route to the virtual appliance and add the NAT gateway to the subnet.

A user-defined default route will still take precedence for internet traffic, so the NAT gateway would not become the effective egress path.

B

Best answer

Remove the 0.0.0.0/0 UDR and associate the NAT gateway with the subnet.

NAT gateway is used for outbound internet traffic when the subnet does not already force that traffic elsewhere. Because the 0.0.0.0/0 UDR sends all internet-bound packets to the virtual appliance, NAT gateway cannot provide the source IP. Removing the UDR allows the subnet to use the NAT gateway for outbound connectivity as intended.

C

Distractor review

Change the route next hop to Virtual network gateway.

A virtual network gateway is for hybrid connectivity, not internet egress through a NAT gateway, so this would not meet the requirement.

D

Distractor review

Create an NSG outbound rule that allows internet traffic from the subnet.

NSGs can allow or deny traffic, but they do not determine the public source IP used for outbound internet connections.

Common exam trap

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.

Technical deep dive

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.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

CIDR notation defines the prefix length.

What is the correct answer to this question?

The correct answer is: Remove the 0.0.0.0/0 UDR and associate the NAT gateway with the subnet. — The NAT gateway can only serve internet-bound traffic that is not already redirected by a more specific route. The existing 0.0.0.0/0 user-defined route sends all outbound traffic to the virtual appliance, so the NAT gateway never becomes the egress path. Removing that route lets Azure use the NAT gateway for internet-bound traffic and gives the VMs a consistent public source IP. Why others are wrong: A leaves the default route in place, so the firewall appliance still wins for outbound routing. C misuses the virtual network gateway next hop, which is for on-premises or cross-premises paths. D affects filtering, not source NAT selection, so it cannot provide the stable public IP the business wants.

What should I do if I get this AZ-104 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.