Managing your Azure Local Network Gateway effectively is crucial for a smooth and efficient network experience. An Azure Local Network Gateway can be created in just a few clicks.
To optimize your gateway, consider scaling it up to meet your growing network needs. This can be done by increasing the number of virtual network interface cards (vNICs).
Proper configuration of your gateway is also essential for optimal performance. This includes setting up static routes and configuring the gateway's public IP address.
By following these best practices, you can ensure that your Azure Local Network Gateway is running at its best, providing a stable and secure connection for your network.
Creating and Managing
Creating and Managing your Azure Local Network Gateway is a straightforward process. You can start by creating a local VPN gateway using the command "az network local-gateway create". This command allows you to create a local network gateway.
To create a local network gateway, you need to specify the name of the local network gateway. You can do this by adding the "--name" option followed by the desired name. For example, "az network local-gateway create --name MyLocalGateway".
Configuration and Settings
To configure a local network gateway, you need to access the Configuration page, which is where you'll find settings like BGP settings and address prefixes.
The Configuration page is where you can add or remove address prefixes. To add additional address prefixes, you can do so from this page.
To remove address prefixes, you can also do so from this page.
For Azure VPN connections, Microsoft requires a specific Maximum Transmission Unit (MTU) setting to prevent packet drops. The recommended MTU setting is 1400.
If you're using Fireware v12.5 or higher, you can specify an MTU of 1400 in the BOVPN virtual interface configuration.
If you're using Fireware v12.4.1 or lower, you can specify an MTU of 1400 in the physical interface configuration.
Alternatively, you can set the global TCP MSS value to 1350, but this is not recommended as it affects other Firebox interfaces and only applies to TCP traffic.
If you need to modify local network gateway settings, you can do so using the Azure portal. However, making changes to a local network gateway that has a connection may cause tunnel disconnects and downtime.
You can't change a local network gateway between FQDN endpoint and IP address endpoint. If you need to change the gateway IP address or FQDN, you'll need to delete all connections associated with this local network gateway and recreate them with the new endpoint.
Here are the steps to modify the gateway IP address or FQDN:
- On the Local Network Gateway resource, in the Settings section, select Configuration.
- In the IP address box, modify the IP address.
- Select Save to save the settings.
If the VPN device to which you want to connect has changed its FQDN, modify the local network gateway by following these steps:
- On the Local Network Gateway resource, in the Settings section, select Configuration.
- In the FQDN box, modify the domain name.
- Select Save to save the settings.
Azure Local Network Gateway
An Azure local network gateway is a crucial component in establishing a connection between your on-premises network and Azure. It enables you to configure BGP settings and modify local network gateway settings using the Azure portal.
You can modify local network gateway settings using the Azure portal, but be aware that making changes to a local network gateway with a connection may cause tunnel disconnects and downtime. This is because the Azure gateway instances are in active-active configuration, where both instances of the gateway VMs establish S2S VPN tunnels to your on-premises VPN device.
To create an Azure VPN gateway in an active-active configuration, you need to create two local network gateways and two connections for your two on-premises VPN devices. This setup requires BGP to allow simultaneous connectivity on the two connections to the same on-premises network.
Here are the requirements for multiple on-premises VPN devices:
- You need to create multiple S2S VPN connections from your VPN devices to Azure.
- The local network gateways corresponding to your VPN devices must have unique public IP addresses in the "GatewayIpAddress" property.
- BGP is required for this configuration.
- You should use BGP to advertise the same prefixes of the same on-premises network prefixes to your Azure VPN gateway.
- You must use Equal-cost multi-path routing (ECMP).
Wait
You can use the 'wait' command to put the CLI in a waiting state until a condition is met. This is particularly useful when setting up an Azure Local Network Gateway.
The 'wait' command can wait until the provisioning state is 'Succeeded'. This is a straightforward way to ensure that the gateway is fully provisioned before moving on to the next step.
You can also use a custom JMESPath query to wait until a specific condition is satisfied. For example, waiting until the provisioning state is not 'InProgress' and the instance view status code is 'PowerState/running'.
Waiting until the provisioning state is updated to 'Succeeded' is another option available with the 'wait' command. This ensures that the gateway is fully operational before proceeding.
Local Gateway (Terraform)
The Local Network Gateway in Terraform is a powerful tool for configuring your Azure network. It's configured using the resource name azurerm_local_network_gateway.
To use the azurerm_local_network_gateway resource, you'll need to create multiple S2S VPN connections from your VPN devices to Azure. This involves creating one local network gateway for each VPN device, and one connection from your Azure VPN gateway to each local network gateway.
Each local network gateway must have a unique public IP address in the "GatewayIpAddress" property. This is crucial for setting up multiple active tunnels from the same Azure VPN gateway to your on-premises devices in the same location.
To achieve this, you'll need to use BGP (Border Gateway Protocol) to advertise the same prefixes of the same on-premises network prefixes to your Azure VPN gateway. This allows traffic to be forwarded through these tunnels simultaneously.
Here are the key requirements for setting up multiple on-premises VPN devices:
- Multiple S2S VPN connections from VPN devices to Azure
- One local network gateway for each VPN device
- One connection from Azure VPN gateway to each local network gateway
- Unique public IP addresses for each local network gateway
- Unique BGP peer IP addresses for each local network gateway
- BGP to advertise on-premises network prefixes
- Equal-cost multi-path routing (ECMP)
Note that each connection counts against the maximum number of tunnels for your Azure VPN gateway, so be sure to check the VPN Gateway settings page for the latest information.
Microsoft.Local Gateways
Microsoft.Local Gateways allow you to connect your on-premises network to Azure, enabling secure and reliable communication between your local network and Azure resources.
You can modify local network gateway settings using the Azure portal, but be aware that making changes to a gateway with an active connection may cause tunnel disconnects and downtime.
To configure a local network gateway in Terraform, you can use the resource name azurerm_local_network_gateway, which has parameters such as name, type, and location.
In Azure Resource Manager, the localNetworkGateways resource has required parameters like name, type, apiVersion, location, and properties, as well as optional tags.
To get the details of a local VPN gateway, you can use the az network local-gateway show command.
For highly available cross-premises connections, consider using multiple on-premises VPN devices, an active-active Azure VPN gateway, or a combination of both.
The Microsoft.Network/localNetworkGateways resource is a key component of Azure Local Network Gateway, and understanding its parameters and usage is crucial for successful configuration.
Highly Available Cross-Premises
To provide better availability for your cross-premises connections, you can use multiple on-premises VPN devices, an active-active Azure VPN gateway, or a combination of both.
You can use multiple VPN devices from your on-premises network to connect to your Azure VPN gateway, as shown in the following diagram. This configuration provides multiple active tunnels from the same Azure VPN gateway to your on-premises devices in the same location.
To create this configuration, you need to create multiple S2S VPN connections from your VPN devices to Azure, and create one local network gateway for each VPN device, and one connection from your Azure VPN gateway to each local network gateway.
Each local network gateway corresponding to your VPN devices must have a unique public IP address in the "GatewayIpAddress" property, and BGP is required for this configuration.
To advertise the same prefixes of the same on-premises network prefixes to your Azure VPN gateway, you should use BGP, and the traffic will be forwarded through these tunnels simultaneously.
You must use Equal-cost multi-path routing (ECMP) to ensure that traffic is distributed across multiple tunnels.
Here are the key requirements for this configuration:
- Create multiple S2S VPN connections from your VPN devices to Azure
- Create one local network gateway for each VPN device, and one connection from your Azure VPN gateway to each local network gateway
- Each local network gateway must have a unique public IP address in the "GatewayIpAddress" property
- BGP is required for this configuration
- Use BGP to advertise the same prefixes of the same on-premises network prefixes to your Azure VPN gateway
- Use Equal-cost multi-path routing (ECMP)
- Each connection is counted against the maximum number of tunnels for your Azure VPN gateway
Frequently Asked Questions
What is the key difference between a local network gateway and a virtual network gateway in Azure?
The key difference between a local network gateway and a virtual network gateway in Azure is that the local network gateway represents your on-premises location, while the virtual network gateway forms the tunnel to your devices. The local network gateway determines which devices to connect and their IP address ranges.
What is the local network gateway?
A local network gateway is a device that connects your local network to a virtual network in Azure, enabling site-to-site VPN connections. It represents the hardware or software VPN device in your local network.
Sources
- https://learn.microsoft.com/en-us/cli/azure/network/local-gateway
- https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/vpn-gateway/vpn-gateway-modify-local-network-gateway-portal.md
- https://shisho.dev/dojo/providers/azurerm/Network/azurerm-local-network-gateway/
- https://www.watchguard.com/help/docs/help-center/en-us/Content/en-US/Fireware/bovpn/manual/bovpn_vif_static_routing_azure.html
- https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-highlyavailable
Featured Images: pexels.com