The BGP session shows Established, yet VMs still use the wrong next hop, on-premises never learns a prefix, or the NVA loses internet access as soon as it advertises a default route. Route Server only exchanges routes. Packets go directly between VMs and the NVA, so check the control plane one hop at a time.
Symptom to cause
| Symptom | Likely cause | Fix |
|---|---|---|
| Session never establishes | No eBGP multihop, or NVA has no route to RouteServerSubnet | Multihop, plus a static route to the subnet |
| Some VMs get the route, others do not | NVA peered with only one Route Server IP | Peer with both and advertise the same routes |
| Learned by Route Server, missing on the spoke NIC | Peering lacks remote gateway use, or a UDR wins | Fix the peering flags or the route table |
| Route dropped with no error | AS path already contains 65515 | Remove the loop, or override the ASN in the pattern below |
NVA loses internet after advertising 0.0.0.0/0 | Route programmed on the NVA's own subnet | UDR 0.0.0.0/0 to Internet on that subnet |
| Session resets on route changes | Per-peer route limit crossed | Summarize; watch re-advertisements |
| On-premises cannot see NVA prefixes | Branch-to-branch off, or no-advertise community | Enable it, or remove the community |
| Established flows drop on failover | Active-active NVAs with asymmetric paths | Active-passive paths or ILB next hop |
Check 1: what Route Server learned
RG=rg-hub; RS=rs-hub
az network routeserver show -g $RG -n $RS \
--query "{ips:virtualRouterIps, asn:virtualRouterAsn, b2b:allowBranchToBranchTraffic, pref:hubRoutingPreference, state:provisioningState}"
az network routeserver peering list -g $RG --routeserver $RS \
--query "[].{name:name, ip:peerIp, asn:peerAsn, state:provisioningState}" -o table
az network routeserver peering list-learned-routes -g $RG --routeserver $RS -n nva1
az network routeserver peering list-advertised-routes -g $RG --routeserver $RS -n nva1
The learned output has one list per Route Server instance. Both must hold the same prefixes. If only one does, the NVA is half-peered.
Next hop is the thing to read: it must be the NVA's reachable NIC address, or an internal load balancer frontend if you use next hop IP.
Check 2: what the NIC actually uses
az network nic show-effective-route-table -g rg-spoke1 -n vm1-nic -o table
az network vnet peering show -g rg-spoke1 --vnet-name vnet-spoke1 -n to-hub \
--query "{state:peeringState, useRemoteGateways:useRemoteGateways, forwarded:allowForwardedTraffic}"
az network vnet peering show -g $RG --vnet-name vnet-hub -n to-spoke1 \
--query "{state:peeringState, transit:allowGatewayTransit, forwarded:allowForwardedTraffic}"
The spoke needs useRemoteGateways and the hub needs allowGatewayTransit.
Three selection rules explain most surprises:
- Longest prefix match comes first.
- For the same prefix, a UDR beats a BGP route.
- System routes for the VNet, peering and service endpoints are preferred over BGP, even when the BGP prefix is more specific.
Rule 3 is why Route Server cannot steer traffic between subnets of the same VNet. Use UDRs for that. Also check whether the spoke's route table has gateway route propagation disabled, because that blocks Route Server routes too.
Check 3: NVA configuration
Route Server uses ASN 65515. Your NVA needs a different 16-bit ASN that is not reserved by Azure or IANA, so check the current reserved list before choosing. A minimal FRR configuration:
ip prefix-list TO-AZURE seq 10 permit 10.200.0.0/16
ip prefix-list FROM-AZURE seq 10 permit 10.0.0.0/8 le 32
!
route-map RS-OUT permit 10
match ip address prefix-list TO-AZURE
route-map RS-IN permit 10
match ip address prefix-list FROM-AZURE
!
router bgp 65010
neighbor 10.0.1.4 remote-as 65515
neighbor 10.0.1.4 ebgp-multihop 2
neighbor 10.0.1.5 remote-as 65515
neighbor 10.0.1.5 ebgp-multihop 2
!
address-family ipv4 unicast
network 10.200.0.0/16
neighbor 10.0.1.4 route-map RS-IN in
neighbor 10.0.1.4 route-map RS-OUT out
neighbor 10.0.1.5 route-map RS-IN in
neighbor 10.0.1.5 route-map RS-OUT out
exit-address-family
# On the NVA
sudo vtysh -c "show bgp summary"
sudo vtysh -c "show bgp ipv4 unicast neighbors 10.0.1.4 advertised-routes"
ip route get 10.0.1.4
sysctl net.ipv4.ip_forward
FRR's default policy for eBGP blocks routes in both directions when no route map is attached, which looks exactly like "Established but zero prefixes". The network statement may also need a matching route in the NVA's table, depending on FRR defaults.
If ip route get sends 10.0.1.4 out of the wrong NIC, add a static route for RouteServerSubnet through the gateway of the NVA's inside subnet. Without it, the session can flap when the NVA learns a covering route. The NIC also needs IP forwarding enabled in Azure.
Fix: the failure modes that take time
The default route captures the NVA
Route Server programs 0.0.0.0/0 on every subnet that accepts its routes, including the NVA's. The result is a loop: the NVA's outbound packets go to itself.
az network route-table create -g $RG -n rt-nva-outside
az network route-table route create -g $RG --route-table-name rt-nva-outside \
-n default-internet --address-prefix 0.0.0.0/0 --next-hop-type Internet
az network vnet subnet update -g $RG --vnet-name vnet-hub -n snet-nva-outside \
--route-table rt-nva-outside
Warning
Attaching a route table replaces any table already on the subnet. Read the existing association first, and add the route there if one exists.
A GatewaySubnet UDR breaks BGP
A UDR that sends the hub address space from GatewaySubnet to a firewall also catches traffic to RouteServerSubnet, which breaks gateway to Route Server BGP. Add a more specific exception:
az network route-table route create -g $RG --route-table-name rt-gateway \
-n rs-direct --address-prefix 10.0.1.0/27 --next-hop-type VnetLocal
Do not attach a UDR or NSG to RouteServerSubnet itself. It is not supported.
AS path loops between two hubs
When hub A's NVA sends routes learned from Route Server A to the NVA in hub B, the path already includes 65515. Route Server B rejects it as a loop. The usual answer is AS override on the NVA's sessions to Route Server:
address-family ipv4 unicast
neighbor 10.0.1.4 as-override
neighbor 10.0.1.5 as-override
Caution
AS override disables the protection that stops loops. Filter with prefix lists so that a hub's own prefixes can never be re-advertised back into it. Run the NVA-to-NVA path inside a tunnel: plain forwarding over peering can be caught by the routes Route Server programs on the NVA NICs.
The route limit resets the session
The limit is counted as current routes plus those in the incoming update. An NVA holding a little over half the limit that re-advertises everything can cross it and drop the session. Summarize on the NVA and stay well below half of the current documented limit.
Failover and stateful inspection
Equal-cost routes from two firewalls produce ECMP. Return traffic may reach the other firewall, which has no state for it. Choose one:
- Active-passive: prepend the AS path on the standby.
- Active-active behind an internal load balancer: advertise the ILB frontend as next hop. Keep the ILB in the same region and confirm it has a backend pool.
- SNAT on the firewall: simple, but hides the client address.
BGP timers on the Route Server side are 60 seconds keepalive and 180 seconds hold. An NVA that hangs without closing the session can black-hole traffic for minutes, so ILB health probes usually detect it sooner.
ExpressRoute and VPN interplay
az network routeserver update -g $RG -n $RS --allow-b2b-traffic true
az network routeserver update -g $RG -n $RS --hub-routing-preference ASPath
Preference applies only to equal-length prefixes. ExpressRoute is the default. After ExpressRoute recovers, traffic may stay on the backup with other preferences, so prepend on the backup and test failback too. The VPN gateway must be active-active with ASN 65515 for this exchange.
Warning
Creating or deleting Route Server in a VNet that already has a gateway interrupts gateway connectivity. Use a maintenance window.
Prevent it next time
- Peer at least two NVA instances with both Route Server IPs.
- Filter in both directions, and tag routes with the no-advertise community when ExpressRoute should not receive them.
- Record learned and advertised routes on a schedule and diff them. A missing prefix is easier to see than to debug.
- Check that the NVA supports route refresh. Adding a hub peering triggers a refresh, and an NVA without it gets a hard reset.
- Rehearse failure by shutting down one NVA while long-lived flows run.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get