Refer to the environment described: VM1 has an instance-level public IP (ILPIP). A Basic Load Balancer uses a public IP. VM1 and VM2 are in the backend pool. A NAT Gateway has a public IP named IP3 and is associated with SubnetA. VNet1 also has a virtual network gateway with public IP IP4. When VM1 initiates outbound traffic to the internet, which public IP address will be used for that outbound connection?
Choose an answer
Tap an option to check your answer.
Correct answer: IP3.
Why this is the answer
When a NAT Gateway is associated with a subnet, it takes precedence for all outbound internet traffic originating from virtual machines within that subnet. In this scenario, VM1 is in SubnetA, which is associated with the NAT Gateway using IP3. Therefore, any outbound connection initiated by VM1 to the internet will use IP3. IP1 is an instance-level public IP for VM1, but NAT Gateway overrides ILPIPs for outbound connections. IP2 is the public IP of the Basic Load Balancer; load balancers handle inbound traffic distribution, not outbound traffic from VMs. IP4 is the public IP of the virtual network gateway, which is used for VPN or ExpressRoute connections, not general internet egress from VMs within a subnet when a NAT Gateway is present.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed