How to configure routing instances for PBR
An example of how to configure routing instances, which you will need to do before you create PBR policies.
- Configure the routing instance for Provider A. Add a route for return LAN traffic and a default route so that all egress traffic goes through the provider network.
vyatta@vyatta# set routing routing-instance provider-a interface dp0p161p1
vyatta@vyatta# set routing routing-instance provider-a protocols static interface-route 10.11.0.0/24 next-hop-routing-instance default next-hop-interface dp0p33p1
vyatta@vyatta# set routing routing-instance provider-a protocols static route 0.0.0.0/0 next-hop 10.10.2.2
- Configure the routing instance for Provider B. Add a route for return LAN traffic and a default route so that all egress traffic goes through the provider network.
vyatta@vyatta# set routing routing-instance provider-b interface dp0p224p1
vyatta@vyatta# set routing routing-instance provider-b protocols static interface-route 10.11.0.0/24 next-hop-routing-instance default next-hop-interface dp0p33p1
vyatta@vyatta# set routing routing-instance provider-b protocols static route 0.0.0.0/0 next-hop 10.10.3.2
- Configure the routing instance for Provider C. Add a route for return LAN traffic and a default route so that all egress traffic goes through the provider network.
vyatta@vyatta# set routing routing-instance provider-c interface dp0p256p1
vyatta@vyatta# set routing routing-instance provider-c protocols static interface-route 10.11.0.0/24 next-hop-routing-instance default next-hop-interface dp0p33p1
vyatta@vyatta# set routing routing-instance provider-c protocols static route 0.0.0.0/0 next-hop 10.10.4.2
- Commit the configuration.
vyatta@vyatta# commit
[edit]
- Optional: View the configuration.
vyatta@vyatta# show
routing-instance provider-a { interface dp0p161p1 protocols { static { interface-route 10.11.0.0/24 { next-hop-routing-instance default { next-hop-interface dp0p33p1 } } route 0.0.0.0/0 { next-hop 10.10.2.2 } } } } routing-instance provider-b { interface dp0p224p1 protocols { static { interface-route 10.11.0.0/24 { next-hop-routing-instance default { next-hop-interface dp0p33p1 } } route 0.0.0.0/0 { next-hop 10.10.3.2 } } } } routing-instance provider-c { interface dp0p256p1 protocols { static { interface-route 10.11.0.0/24 { next-hop-routing-instance default { next-hop-interface dp0p33p1 } } route 0.0.0.0/0 { next-hop 10.10.4.2 } } } } [edit]