Complete the code to create a virtual network gateway in Azure.
az network vnet-gateway create --resource-group MyResourceGroup --name MyVpnGateway --vnet MyVNet --subnet GatewaySubnet --public-ip-address [1] --gateway-type Vpn --vpn-type RouteBased --sku VpnGw1The --public-ip-address parameter requires the name of the public IP resource associated with the VPN gateway.
Complete the code to create a local network gateway representing the on-premises network.
az network local-gateway create --resource-group MyResourceGroup --name MyLocalGateway --gateway-ip-address [1] --local-address-prefixes 10.0.0.0/24
The --gateway-ip-address should be the public IP address of the on-premises VPN device.
Fix the error in the command to create a VPN connection between Azure and on-premises.
az network vpn-connection create --resource-group MyResourceGroup --name MyConnection --vnet-gateway1 MyVpnGateway --local-gateway2 [1] --shared-key MySharedKeyThe --local-gateway2 parameter requires the name of the local network gateway resource representing the on-premises network.
Fill both blanks to configure the VPN connection with the correct routing and protocol.
az network vpn-connection create --resource-group MyResourceGroup --name MyConnection --vnet-gateway1 MyVpnGateway --local-gateway2 MyLocalGateway --shared-key MySharedKey --[1] [2]
The --protocol parameter specifies the VPN protocol, and IKEv2 is a common secure choice.
Fill all three blanks to create a VPN gateway with the correct SKU, gateway type, and VPN type.
az network vnet-gateway create --resource-group MyResourceGroup --name MyVpnGateway --vnet MyVNet --subnet GatewaySubnet --public-ip-address MyPublicIP --sku [1] --gateway-type [2] --vpn-type [3]
The --sku defines the gateway size, --gateway-type should be 'Vpn' for VPN gateways, and --vpn-type is usually 'RouteBased' for most VPNs.