A consultant is reviewing a hub and spoke network for a retail client. The virtual network Hub (10.0.0.0/16) hosts a shared file server. Spoke1 (10.1.0.0/16) and Spoke2 (10.2.0.0/16) are each peered with Hub in both directions, and every peering shows a status of Connected. The design contains no network virtual appliance and no VPN gateway. Virtual machines in both spokes reach the file server in Hub without trouble, but a nightly batch job on VM1 in Spoke1 cannot open a TCP connection to VM2 in Spoke2. The network security groups on both subnets allow all traffic from the VirtualNetwork service tag. The client wants VM1 and VM2 to communicate with the least additional configuration. What should the consultant do?
Pick an answer to reveal the explanation.
Why this is correct
Correct answer: Create a virtual network peering directly between Spoke1 and Spoke2. Peering is a relationship between exactly two virtual networks, and nothing in this design can carry traffic from one spoke through the hub to the other. Virtual network peering is not transitive. When Spoke1 is peered with Hub and Hub is peered with Spoke2, the platform installs system routes in Spoke1 for the Hub address space and in Spoke2 for the Hub address space, but neither spoke learns a route for the other spoke. Packets from VM1 destined for 10.2.0.0/16 match no peering route and are dropped, which is exactly the symptom the batch job reports. Both spokes reaching the file server in Hub confirms that the existing peerings are healthy and Connected in both directions, so the missing piece is a path between the spokes themselves rather than a fault in what already exists. There are two supported ways to build that path. The first is an explicit peering between Spoke1 and Spoke2, created from both sides so the status reaches Connected. The address spaces 10.1.0.0/16 and 10.2.0.0/16 do not overlap, so nothing blocks it. The second is a network virtual appliance in Hub with user defined routes in each spoke that send the other spoke's prefix to the appliance, plus Allow forwarded traffic on the spoke peerings so the hub is permitted to relay packets. The scenario has no appliance and asks for the least configuration, which makes the direct peering the right call. Name resolution across the new peering still needs a private DNS zone linked to both networks, because default Azure name resolution does not span peered networks. Enabling Allow forwarded traffic on both existing peerings only permits a peered network to accept packets that did not originate in the sending network, for example traffic relayed by an appliance. It does not create routes and it does not make peering transitive, so without an appliance and user defined routes the flag changes nothing for VM1. Enabling Allow gateway transit and Use remote gateways shares a VPN or ExpressRoute gateway in Hub with the spokes for on premises connectivity. The design has no gateway to share, and gateway transit never provides spoke to spoke routing on its own. Adding a user defined route with next hop type Virtual network peering cannot be created. Virtual network peering appears only as a system route next hop type. User defined routes accept Virtual appliance, Virtual network gateway, Virtual network, Internet, or None, so the portal and CLI both reject the route as described. Key exam concept: peering connects two networks and stops there. Spoke to spoke traffic needs either a direct peering or an appliance in the hub with user defined routes and forwarded traffic allowed. The exam keeps probing whether you recognize the not transitive rule from the symptom alone.