Soru

Zorluk: OrtaConfigure User-Defined Routes and Routing Tables

You manage an Azure subscription that contains a virtual network named `VNet-Corp` (172.16.0.0/12172.16.0.0/12). `VNet-Corp` contains three subnets:
- `Subnet-Web` (172.16.1.0/24172.16.1.0/24)
- `Subnet-DB` (172.16.2.0/24172.16.2.0/24)
- `Subnet-Sec` (172.16.100.0/24172.16.100.0/24) containing a Network Virtual Appliance (NVA) at IP address 172.16.100.10172.16.100.10.

A route table named `RT-Web` is associated with `Subnet-Web`. `RT-Web` contains the following user-defined routes (UDRs):
- A route for destination 172.16.0.0/16172.16.0.0/16 with a next hop type of Virtual Network Gateway.
- A route for destination 172.16.2.0/24172.16.2.0/24 with a next hop type of Virtual appliance and a next hop IP address of 172.16.100.10172.16.100.10.

IP forwarding is enabled on the network interface of the NVA. The default system route for the virtual network is 172.16.0.0/12172.16.0.0/12 with a next hop type of Virtual network.

A virtual machine in `Subnet-Web` attempts to send traffic to a database server at IP address 172.16.2.100172.16.2.100 in `Subnet-DB`.

Which next hop will Azure select for this traffic?

  1. A
    The Virtual Network Gateway because user-defined routes configured with a Virtual Network Gateway take precedence over Virtual Appliance routes.
  2. The Network Virtual Appliance (NVA) at 172.16.100.10172.16.100.10 because the user-defined route for 172.16.2.0/24172.16.2.0/24 is the longest prefix match.Cevap
  3. C
    The Virtual network (default system route) because default system routes cannot be overridden by user-defined routes for destinations within the same virtual network.
  4. D
    The database server directly because local subnet routes always override user-defined routes.

Cevap

The Network Virtual Appliance (NVA) at 172.16.100.10172.16.100.10 because the user-defined route for 172.16.2.0/24172.16.2.0/24 is the longest prefix match.
When Azure routes traffic, it selects a route based on the Longest Prefix Match (LPM) algorithm among all matching routes (system routes and user-defined routes). The destination IP address 172.16.2.100172.16.2.100 matches three routes: the system route (172.16.0.0/12172.16.0.0/12), the UDR to the gateway (172.16.0.0/16172.16.0.0/16), and the UDR to the NVA (172.16.2.0/24172.16.2.0/24). Since 172.16.2.0/24172.16.2.0/24 has the longest prefix (24 bits), Azure selects this route. Because this route is a user-defined route (UDR) and has a next hop type of Virtual appliance pointing to 172.16.100.10172.16.100.10, the traffic is forwarded to the NVA.

Adım Adım Çözüm

1
Identify all matching prefixes for the destination IP 172.16.2.100172.16.2.100.
The matching routes are: the default system route 172.16.0.0/12172.16.0.0/12, the UDR 172.16.0.0/16172.16.0.0/16, and the UDR 172.16.2.0/24172.16.2.0/24.
Before forwarding traffic, Azure evaluates all active routes in the subnet's effective route table to find matching destinations.
2
Compare the prefix lengths of the matching routes.
The prefix lengths are /12 (system route), /16 (gateway UDR), and /24 (NVA UDR).
Azure uses the Longest Prefix Match (LPM) algorithm to determine route precedence.
3
Select the route with the longest prefix and verify its next hop configuration.
The route 172.16.2.0/24172.16.2.0/24 is selected, which directs traffic to the Virtual Appliance at 172.16.100.10172.16.100.10.
Since /24 is the longest and most specific prefix, it takes precedence over the /16 and /12 prefixes, overriding both the default system route and the gateway route.

Anahtar Kavram

Azure route selection precedence based on Longest Prefix Match (LPM) and User-Defined Route (UDR) overrides.
Tahmini Süre:1m 15s
Bu soruyu puanla