Azure Networking default Gateway query

Steph_Azurebeginner 21 Reputation points
2020-09-09T13:20:05.13+00:00

Hello,

I am learning Azure networking on the fly.

Our company is replicating its existing on premise disks/ servers to a Disaster Recovery solution in Azure. This will be a PAY-G subscription and should we need to invoke DR, we will turn on servers etc., in Azure, when required. In the meantime Our on prem servers are replicating every hour across to the Azure DR environment.

The On Prem servers have a default gateway 10.X.X.101 a particular subnet. Historically, and not sure why, the servers have a persistent route set in Windows (routeprint) to default gateway of 10.X.X.101.

When failing over to a server that has replicated from ONPREM within Azure. The gateway will automatically be set by Azure to 10.X.X.1 (as the network adapter configuration from on prem is overwritten by Azures Default network settings).

The persistent route however still remains on the replicated vm (10.X.X.101) giving us routing issues between subnets. We try to remove the persistent route and still have problems after rebooting the VM.

We have tested removing the persistent route. We have also tested creating a fresh VM in the same subnet which doesnt have the legacy 10.X.X.101 default gateway in its route print configuration and routing between subnets via our virtual firewall works fine.

Is there anyway in Azure that I can change the default gateway for our replicated subnet to anything other than .1?

We do not want reconfigure the gateway on premise to .1 , as there is heavy reliance on this subnet with several servers communication to .101 gateway in a production environment.

Any help would be greatly appreciated.

Thankyou

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,196 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,178 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,696 Reputation points Microsoft Employee
    2020-09-23T05:13:40.29+00:00

    Hello @Steph_Azurebeginner ,

    You cannot set/change the default gateway. x.x.x.1: is reserved by Azure for the default gateway as mentioned here.

    However, if you want to change any of Azure's default routing, you can do so by creating a route table.
    Please refer : https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview
    But you can only specify the following next hop types when creating a user-defined route:
    Virtual network gateway, Virtual network, Internet, Virtual appliance & None
    So, adding an on-prem subnet IP to an UDR next hop would not be possible.

    As per the below Site recovery article, you should remove any static persistent routes from your on-prem machines before failover:
    https://learn.microsoft.com/en-us/azure/site-recovery/concepts-on-premises-to-azure-networking#prepare-on-premises-machines

    Request you to follow the below and try to remove the static persistent routes from your on-prem machines before you fail them over to Azure. That will make sure that post failover it gets the Azure default gateway in it's route print configuration and this will ensure that the routing between subnets works fine.

    To view the routing table, run route.exe print.
    Check the Persistence Routes section. If there's a persistent route, use the route.exe delete command to remove it.

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful