Share via

Static routeing for a subnet

Charles Pickering 46 Reputation points
2022-07-27T06:09:11.817+00:00

I have a server within a subnet that I want to be the VPN gateway for my Azure services. On the on-premises side of the network, I set a static route in DHCP that routes remote subnets to the gateway which deals with getting the traffic to the destination. I would prefer to keep using this setup since it's easier to manage than manually setting up expressroutes going everywhere.

I tried setting up a route table and associating it with the subnet but for some reason, it isn't working. When trying to connect to the remote subnet, the gateway responds, saying that the next hop is the default gateway.

Not sure if I configured my route table wrong or if there's a completely different way I should be doing this.

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.


Answer accepted by question author

KapilAnanth 49,876 Reputation points Moderator
2022-08-01T15:49:50.163+00:00

Hi @Charles Pickering ,

Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you are trying to set up routing between your on-premises and Azure via a custom VPN server/gateway.

  • You informed the VPN VM is able to ping the OnPrem machines.
  • You have attached the route table in all other subnets and then pointed the nextHop as the private IP of this VPN VM.

I suggested we,

You informed you are able to resolve the issue, post recreating the environment.

Cheers,
Kapil.

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

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.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.