Soru

Zorluk: OrtaConfigure User-Defined Routes and Routing Tables

An administrator manages an Azure virtual network named VNet-Secure (172.16.0.0/16172.16.0.0/16). The virtual network contains the following subnets:

* Subnet-Web (172.16.1.0/24172.16.1.0/24)
* Subnet-App (172.16.2.0/24172.16.2.0/24)
* Subnet-DMZ (172.16.3.0/24172.16.3.0/24)

A Network Virtual Appliance (NVA) is deployed in Subnet-DMZ and is assigned the private IP address 172.16.3.100172.16.3.100.

A route table named RT-Web is associated with Subnet-Web. RT-Web contains the following user-defined routes:

* Route1: Destination prefix 172.16.2.0/24172.16.2.0/24, Next hop type: Virtual appliance, Next hop address: 172.16.3.100172.16.3.100
* Route2: Destination prefix 172.16.0.0/16172.16.0.0/16, Next hop type: Virtual network
* Route3: Destination prefix 0.0.0.0/00.0.0.0/0, Next hop type: Internet

A virtual machine in Subnet-Web with the IP address 172.16.1.4172.16.1.4 attempts to establish a connection to a database server in Subnet-App with the IP address 172.16.2.50172.16.2.50.

How is the traffic from the virtual machine to the database server routed?

  1. The traffic is routed to the Network Virtual Appliance (NVA) at 172.16.3.100 in Subnet-DMZ.Cevap
  2. B
    The traffic is routed directly to the database server in Subnet-App via the local virtual network routing.
  3. C
    The traffic is dropped because of a routing conflict between the VNet-wide local route and the specific subnet route.
  4. D
    The traffic is routed to the Internet gateway because the default route is processed first.

Cevap

The traffic is routed to the Network Virtual Appliance (NVA) at 172.16.3.100 in Subnet-DMZ.
The correct option is the one stating the traffic is routed to the Network Virtual Appliance (NVA) at 172.16.3.100. When Azure determines how to route traffic, it evaluates all routes in the associated route table and selects the route that matches the destination IP address using the Longest Prefix Match (LPM) algorithm. In this case, the destination IP address 172.16.2.50 matches the destination prefix 172.16.2.0/24 (Route1), 172.16.0.0/16 (Route2), and 0.0.0.0/0 (Route3). Because the prefix length of Route1 (/24) is longer and more specific than the others, it is chosen, and the next hop is set to the virtual appliance at 172.16.3.100.

Adım Adım Çözüm

1
Identify the destination IP address of the traffic.
The destination IP address is 172.16.2.50.
Routing decisions are evaluated based on the destination IP address of the packet.
2
Compare the destination IP against all matching prefixes in the route table associated with Subnet-Web.
The matching routes are 172.16.2.0/24 (Route1), 172.16.0.0/16 (Route2), and 0.0.0.0/0 (Route3).
All three routes cover the destination address 172.16.2.50, so their prefix lengths must be compared.
3
Apply the Longest Prefix Match (LPM) rule to select the active route.
172.16.2.0/24 has a prefix length of 24, which is longer (more specific) than 16 (for 172.16.0.0/16) and 0 (for 0.0.0.0/0). Route1 is selected.
Azure routing selects the route with the longest prefix match among the matching routes.

Anahtar Kavram

Azure Longest Prefix Match (LPM) and User-Defined Route Precedence
Tahmini Süre:1m 30s
Bu soruyu puanla