home

Supported platforms

Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

How to configure inter-VRF path switching without PBR

An example in which we configure a routing instance for each of several WAN connections.


  • ISP-A: Interface dp0p1s2
  • ISP-B: Interface dp0p1s3
  • ISP-C: Interface dp0p1s4
set routing routing-instance ISP-A interface 'dp0p1s2'
set routing routing-instance ISP-A protocols static route 0.0.0.0/0 next-hop '10.10.2.3'
set routing routing-instance ISP-A protocols static interface-route 11.11.0.0/16 next-hop-routing-instance default next-hop-interface dp0p1s1
set routing routing-instance ISP-B interface 'dp0p1s3'
set routing routing-instance ISP-B protocols static route 0.0.0.0/0 next-hop '10.10.3.3'
set routing routing-instance ISP-B protocols static interface-route 11.11.0.0/16 next-hop-routing-instance default next-hop-interface dp0p1s1
set routing routing-instance ISP-C interface 'dp0p1s4'
set routing routing-instance ISP-C protocols static route 0.0.0.0/0 next-hop '10.10.4.3'
set routing routing-instance ISP-C protocols static interface-route 11.11.0.0/16 next-hop-routing-instance default next-hop-interface dp0p1s1

set protocols static route 0.0.0.0/0 next-hop-routing-instance ISP-A next-hop 10.10.2.3 distance '10'
set protocols static route 0.0.0.0/0 next-hop-routing-instance ISP-A next-hop 10.10.2.3 path-monitor monitor DC-1 policy 'DC'
set protocols static route 0.0.0.0/0 next-hop-routing-instance ISP-B next-hop 10.10.3.3 distance '20'
set protocols static route 0.0.0.0/0 next-hop-routing-instance ISP-B next-hop 10.10.3.3 path-monitor monitor DC-2 policy 'DC'
set protocols static route 0.0.0.0/0 next-hop-routing-instance ISP-C next-hop 10.10.4.3 distance '30'

set service path-monitor host DC target '10.10.10.10'
set service path-monitor host DC type 'ping'
set service path-monitor monitor DC-1 policy 'DC'
set service path-monitor monitor DC-1 type ping host 'DC'
set service path-monitor monitor DC-1 type ping routing-instance 'ISP-A'
set service path-monitor monitor DC-2 policy 'DC'
set service path-monitor monitor DC-2 type ping host 'DC'
set service path-monitor monitor DC-2 type ping routing-instance 'ISP-B'
set service path-monitor policy DC requires type 'ping'

The LAN interface (dp0p1s1) remains in the default routing instance. Each ISP routing instance has a default route via the ISP and a route via the default routing instance for return traffic to the LAN.

A path monitor is configured for ISP-A and ISP-B. ISP-C is the final backup so we don't monitor it in this example.

In the default routing instance, we've configured default static routes to send traffic from the LAN via one of the ISPs. Distance configuration is again used to determine the preference order of the ISPs; A is preferred over B which is preferred over C.

The default route via ISP-A and ISP-B both track path monitor state. If their respective monitor/policy pair becomes non-compliant the route will be withdrawn and the system will choose the remaining next hop that has the lowest distance.

In this example there is no need for an explicit route for the monitoring target as the monitors are bound to the ISP routing instances. There is always an available route within these routing instances, as none of the routes are tracking path monitor state.

You can tweak the behaviour. For example, to create an ECMP route, make the distance values on the next hops equal to each other. Then next hops which are part of this route, and which track path monitor state, will be installed/withdrawn from the FIB as their compliance state changes. This allows the next hops which make up the ECMP route to change dynamically over time.