exam questions

Exam AZ-700 All Questions

View all questions & answers for the AZ-700 exam

Exam AZ-700 topic 2 question 9 discussion

Actual exam question from Microsoft's AZ-700
Question #: 9
Topic #: 2
[All AZ-700 Questions]

DRAG DROP -
You have Azure virtual networks named Hub1 and Spoke1. Hub1 connects to an on-premises network by using a Site-to-Site VPN connection.
You are implementing peering between Hub1 and Spoke1.
You need to ensure that a virtual machine connected to Spoke1 can connect to the on-premises network through Hub1.
How should you complete the PowerShell script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Reference:
https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke?tabs=cli#virtual-network-peering

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Bharat
Highly Voted 3 years ago
The answer is correct. However, this is a better reference: https://docs.microsoft.com/en-us/azure/firewall/tutorial-hybrid-ps
upvoted 30 times
jeepTango123456
2 years, 2 months ago
From the link the example, the answer here seems to be reversed. # Peer hub to spoke Add-AzVirtualNetworkPeering -Name HubtoSpoke -VirtualNetwork $VNetHub -RemoteVirtualNetworkId $VNetSpoke.Id -AllowGatewayTransit # Peer spoke to hub Add-AzVirtualNetworkPeering -Name SpoketoHub -VirtualNetwork $VNetSpoke -RemoteVirtualNetworkId $VNetHub.Id -AllowForwardedTraffic -UseRemoteGateways
upvoted 8 times
MrBlueSky
1 year, 6 months ago
No, Bharat is correct. Not sure why you said that the answers are reversed because even in your example the peering performed on the hub network is set to AllowGatewayTransit and the peering set on the Spoke network is 'UseRemoteGateways'
upvoted 3 times
...
...
...
walkwolf3
Highly Voted 2 years, 11 months ago
Answer is correct -AllowGatewayTransit Select Use this virtual network's gateway or Route Server: - If you have a virtual network gateway attached to this virtual network and want to allow traffic from the peered virtual network to flow through the gateway. -UseremoteGateways Select Use the remote virtual network gateway or Route Server: - If you want to allow traffic from this virtual network to flow through a virtual network gateway attached to the virtual network you're peering with. Box1: Hub told spoke to use hub's VPN gateway to reach on-premise network Box2: Spoke told hub to use hub's VPN gateway to reach on-premise network https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering
upvoted 22 times
...
kikocu
Most Recent 9 months, 2 weeks ago
Answer is correct, please check the Powershell Sample command in this link https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peering-gateway-transit
upvoted 4 times
RabbitB
5 months ago
This URL is the best
upvoted 2 times
...
...
Sant25
9 months, 3 weeks ago
# Peer hub to spoke Add-AzVirtualNetworkPeering -Name HubtoSpoke -VirtualNetwork $VNetHub -RemoteVirtualNetworkId $VNetSpoke.Id -AllowGatewayTransit # Peer spoke to hub Add-AzVirtualNetworkPeering -Name SpoketoHub -VirtualNetwork $VNetSpoke -RemoteVirtualNetworkId $VNetHub.Id -AllowForwardedTraffic -UseRemoteGateways
upvoted 2 times
...
Lazylinux
11 months, 3 weeks ago
Given answer is correct AT Hub side, we AllowGatewayTransit AT Spoke side, we need UseRemoteGateway
upvoted 1 times
...
MikeSA
1 year, 4 months ago
Confusing because the second part could be either allowforwarded or useremotegateways. Seems to be missing one of the options. # Peer spoke to hub Add-AzVirtualNetworkPeering -Name SpoketoHub -VirtualNetwork $VNetSpoke -RemoteVirtualNetworkId $VNetHub.Id -AllowForwardedTraffic -UseRemoteGateways
upvoted 1 times
...
Himank20
1 year, 5 months ago
Given answer is correct. In the hub, we need to enable AllowGatewayTransit and in the spoke we need to enable UseRemoteGateway
upvoted 1 times
...
mauchi
1 year, 8 months ago
I think the answer should be reversed, as per the docu https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke?tabs=cli#virtual-network-peering%20%20%20Previous%20QuestionsNext%20Questions - Configure the peering connection in the hub to allow gateway transit. - Configure the peering connection in each spoke to use remote gateways.
upvoted 2 times
...
sshera
1 year, 9 months ago
In exam 04jan23
upvoted 2 times
...
sapien45
2 years ago
Make sure to set AllowGatewayTransit when peering VNet-Hub to VNet-Spoke and UseRemoteGateways when peering VNet-Spoke to VNet-Hub. https://learn.microsoft.com/en-us/azure/firewall/tutorial-hybrid-ps
upvoted 3 times
...
sapien45
2 years, 1 month ago
Allow forwarded traffic does not apply here, Allow forwarded traffic is so you can have a network appliance (NVA) in the hub that routes traffic between two spokes. When the NVA goes to forward the traffic from spoke 1 into spoke 2, this setting needs to be enabled or else Azure SDN will drop the traffic. Details on https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke#spoke-connectivity
upvoted 2 times
...
derrrp
2 years, 3 months ago
It will help to remember that the hub needs to know the remote networks available from on-prem (-UseRemoteGateways) whereas a spoke network which will be connected to the hub is where you'll need to worry about making it transitive so that traffic can route through (-AllowGatewayTransit) -AllowForwardedTraffic does not get used at all but let's move FORWARD onto the next question now that we've got this one memorized.
upvoted 2 times
...
Edward1
2 years, 6 months ago
The answers are correct.
upvoted 1 times
...
jj22222
2 years, 6 months ago
on test April 10 2022
upvoted 1 times
...
Joshalom
2 years, 8 months ago
on exam 6/2/2022
upvoted 1 times
...
Joshalom
2 years, 9 months ago
on exam 28/1/2022
upvoted 1 times
...
Takloy
2 years, 9 months ago
Seems correct... I find the article below better. https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peering-gateway-transit#ps-same
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago