ExpressRoute gateway doesn't allow custom routes

David Espinel 21 Reputation points
2021-08-25T14:08:37.797+00:00

Hi,

I have an ExpressRoute circuit and the following peering among networks:

VnetA (ExpressRoute) <===(peering)===> VnetB <===(peering)===> VnetC

I wanted to advertise a custom route belonging to VnetC which is not directly peered with VnetA. Routing between VnetA and VnetC is possible using a network gateway deployed in VnetB (this is somehow a hub & (hub & spoke)) architecture.

When I tried to add the custom route to the virtual network gateway of type ExpressRoute using PowerShell, I received the following error message:

Custom routes are not allowed to be specified for gateway ... of type ExpressRoute.
StatusCode: 400
ReasonPhrase: Bad Request

Is there another way to propagate this route to the on-prem ?

Thanks!

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,263 questions
Azure ExpressRoute
Azure ExpressRoute
An Azure service that provides private connections between Azure datacenters and infrastructure, either on premises or in a colocation environment.
342 questions
0 comments No comments
{count} votes

Accepted answer
  1. SaiKishor-MSFT 17,216 Reputation points
    2021-08-31T05:24:44.26+00:00

    @David Espinel Thank you for reaching out to Microsoft Q&A. I understand that you want to advertise a custom route to the Express Route gateway and while you are doing the same you are getting the above error.

    As mentioned here in this document, You cannot create user-defined routes to force traffic to the ExpressRoute virtual network gateway if you deploy a virtual network gateway deployed as type: ExpressRoute. You can use user-defined routes for forcing traffic from the Express Route to, for example, a Network Virtual Appliance.

    I would suggest you to either Peer Vnet A with Vnet C directly or setup Gateway Transit as shown below:
    127774-peering.png

    Hope this helps. Please let us know if you need any further assistance and we will be glad to assist further. Thank you!

    0 comments No comments

0 additional answers

Sort by: Most helpful