In certain SD-WAN deployments, branch networks are required to backhaul all traffic to a centralized firewall located at the headquarters or data center for centralized security inspection and policy enforcement.
RansNet routers support VRF over SD-WAN - establishing VPN tunnels using the system default routing table (transport VRF), while leveraging VRF instances (service VRF) over the SD-WAN overlay to maintain a dedicated routing domain for internal traffic.
This architecture simplifies branch router WAN link failover configuration, and enhances overall security by fully isolating internal networks from direct external reachability. This model also can be used for service providers who want to share a centralized SD-WAN gateway for multiple customers (each customer is assigned to a unique service VRF).
Alternative approach to isolate internal traffic is to use "L2 over SD-WAN", for smaller network size.
The following sample topology is used to illustrate this design and the associated traffic flows.
In this scenario:
Routers (both branch and gateway) will use system default routing table to establish VPN tunnels. Configure WAN failover between links, if there's redundancy.
Assign SD-WAN (hence VPN tunnel) and router LAN interfaces (both HQ and Branch) into a dedicated VRF (eg. VRF-4, follow the VPN instance ID).
Run BGP instance in the service VRF and advertise default route 0.0.0.0/0 to branch routers, and each branch router advertises its local LAN networks.
Route all LAN traffic using the BGP default route through VPN tunnel to HQ, within the service VRF.
You may optionally configure route leaking between SD-WAN VRF and router default VRF, only if you want branch traffic to breakout from CMG/HSG gateway to Internet.
NOTE:
Add route-map (and prefix-list) for the VPN instance to filter 0.0.0.0/0 to the branch routers only, so that they don't need to receive other branch routes unnecessarily.
If you need the SD-WAN VRF to communicate with other networks directly, just assign the connected interface to the same VRF. For example, if you have another firewall to filter the traffic, just assign the interface (connected to the firewall) to the same VRF, and add a default route to the firewall within the SD-WAN VRF.
Route leaking is only necessary if you want SD-WAN VRF traffic to breakout from local CMG/HSG gateway (via gateway default routing table).
Below are the relevant Configuration Steps on Orchestrator
Step 1: Assign LAN interface to the service VRF
Step 2: Configure default route for the service VRF
Step 3: Configure prefix-list and route-map
Step 4: Enable VRF for BGP Instance and apply route-map
Step 5: Assign branch device to the VPN instance
Apply Config
CLI Configuration Sample
Below are the relevant gateway CLI configs (generated by mfusion). You should use mfusion orchestrator to provision SD-WAN configurations. Most of the settings are done on gateway, at the SD-WAN VPN instance. CLI samples are for references and expert mode only.
Verifications
On the branch router, we just need to assign assign LAN interface (where internal devices reside) to the SD-WAN service VRF. Relevant Configuration Steps:
Step 1: Assign LAN interface to the service VRF
Apply Config
CLI Configuration Sample
Verifications
Branch# show ip bgp summary
IPv4 Unicast Summary (VRF 4):
BGP router identifier 10.18.18.190, local AS number 65051 vrf-id 18
BGP table version 10
RIB entries 2, using 384 bytes of memory
Peers 1, using 724 KiB of memory
Peer groups 1, using 64 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.4.168.1 4 65051 561 557 0 0 0 00:29:17 1 1 N/A
Total number of neighbors 1
Branch# show
Branch# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF 4:
B>* 0.0.0.0/0 [200/0] via 10.4.168.1, tap4, weight 1, 00:29:23
C>* 10.4.168.0/22 is directly connected, tap4, 00:48:27
C>* 192.168.8.0/22 is directly connected, eth1, 00:22:03
VRF default:
K>* 0.0.0.0/0 [0/1002] via 10.18.18.1, eth0, src 10.18.18.190, 23:26:14
C>* 2.1.2.1/32 is directly connected, lo, 23:34:24
K * 10.18.18.0/24 [0/1002] is directly connected, eth0, 23:26:14
C>* 10.18.18.0/24 is directly connected, eth0, 23:26:14
If you want service VRF traffic to breakout from the gateway (eg. using CMG default route to Internet), it requires route "leak" between service VRF and default VRF on the gateway router, to allow gateway to route traffic between different VRFs.
VRFs are isolated by design — they don’t automatically share routes with the default table.
For Internet breakout, return traffic must find its way from the default routing table back into the VRF.
Without leaking, return traffic would arrive at the gateway but never know how to return into the VRF.
NOTE:
You only need to configure route leaking on the gateway router.
Configure firewall/SNAT to permit inbound/outbound traffic.
You can use the same method to leak out directly from branch router, for some rare cases only (NOTE: If you generally allow local breakout for branch routers, you don't even need to run "VRF over SD-WAN", just the traditional method will do - advertise HQ/DC routes and everything else route through local default routes).
There are two options to configure route leaking:
Configure static route for each remote network, for smaller SD-WAN deployment
Dynamically import (use MP-BGP), for large SD-WAN deployment
Option 1: static route leaking
Static route leaking configuration is simple when you have a few remote locations. But it gets tedious when the remote sites grow as each site requires one static route.
NOTE:
Static route leaking requires static nexthop for each remote network.
Use VRF ID (not interface name) as the nexthop
Below is an example to leak local/connected routes (eg. to allow reachability between interfaces in different VRF on the same router), eg. to allow interface vlan1 (10.1.99.1/24, in VRF-1) to ping vlan2 (10.2.99.1/24, in VRF-2).
ip route 10.2.99.0/24 nexthop 2 vrf 1 nexthop-vrf 2ip route 10.1.99.0/24 nexthop 1 vrf 2 nexthop-vrf 1CLI Configuration Sample
Below are the relevant gateway CLI configs for reference only (other general configs are omitted).
Verifications
Option 2: Use dynamic route import (MP-BGP)
Static route leaking can be very hard to manage when you have hundreds or thousands of remote networks. So the simpler approach is to use MP-BGP to dynamically import routes between VRFs - run BGP instance in each VRF and import the routes from the target VRF.
NOTE: BGP route-leaking only export & import routes learnt from BGP, eg. gateway leaks routes learnt from branch routers for remote networks.
Typically route-leaking is done on the gateway router. Below is a complete config on the gateway/CMG router. In this sample case, we just want service VRF-4 to have Internet breakout through default VRF.
Configure static route leak in VRF-4 (via gateway in default VRF), for Internet access.
Configure BGP in default VRF to dynamically import routes from VRF-4, so that default VRF knows the return paths.
Optionally configure a route-map for the VRF route import, to only allow the authorized routes to leak into default VRF routing table (in below config, the routes 10.11.11.0/24 and 10.12.12.0/24 are not imported/leaked into default VRF because of the route-map filter).
With dynamic route import, you don't need to set static tunnel IP for each remote branch routers.
Despite it's quite simple to config this feature, the impact can be significant if wrongly configured. So we only allow this config through CLI only. In below sample config CLI, we import routes from VRF-4 into default routing table (there's no VRF ID configured for the BGP instance so it means default routing table).
CLI Configuration Sample
Below are the relevant gateway CLI configs for reference only (other general configs are omitted).
Verifications