PBR routing example
The following figure shows a simple site that uses PBR on the Vyatta router (R1) to route traffic from two different internal subnets to two Internet links.
The following conditions apply to this scenario:
- All Internet-bound traffic from subnet 192.168.10.0/24 is routed out interface dp0p1p1.
- All Internet-bound traffic from subnet 192.168.20.0/24 is routed out interface dp0p1p2.
To configure the scenario, perform the following steps in configuration mode.
Step | Command |
---|---|
Create Rule 10. |
|
Specify the source address to match. In this case, any address on subnet 192.168.10.0/24 is a match. |
|
Specify that all matching packets use alternate routing table 1. |
|
Create rule 20. |
|
Specify the source address to match. In this case, any address on subnet 192.168.20.0/24 is a match. |
|
Specify that all matching packets use alternate routing table 2. |
|
Commit the changes. |
|
Show the policy-based routing configuration. |
|
Create the alternative routing table 1. |
|
Create the alternative routing table 2. |
|
Commit the change. |
|
Show the alternate routing table configuration. |
|
Apply the IP addresses to the corresponding data plane interfaces. |
|
Apply the policy route with dp0p1p3, and dp0p1p4 interfaces |
|
Show the data plane interface configuration. |
|