PfR 101 – Perfromance Routing
PfR Technology
PfR stands for Performance Routing, but the feature was first called OER (Optimized Edge Routing). This is why most commands still start with the oer keyword. The idea behind PfR is to have a controlling entity (Master Controller) that takes over routing decisions for one or more Border Routers, in order to deliver traffic according to a specified policy. The MC will monitor network statistics (NetFlow, IP SLA) and will chose the best exit point for each type of traffic. PfR is used to enhance the operation of traditional routing protocols by using real time network performance information.
PfR Components
Each PfR implementation requires the following minimum components:
1x Border Router
1x Master Controller
1x Internal Interface
2x External Interfaces
The MC and the BR can be configured on the same device. They both need to have a matching key-chain defined, that will secure communication between them, even if running on the same device:
Border Router
To define a router as OER BR, use:
Inside the oer-br configuration mode, you can define the interface used for connection to the MC and the IP address of the MC:
Normally, OER uses TCP port 3949 on both the MC and BR. This can be changed with the following command, but it has to match on both MC and BR:
To enable OER to generate syslog messages, use:
To stop the OER process, without deleting the configuration, use:
Master Controller
To define a router as the MC, just use:
Here are a few general commands used on the MC:
The MC and BRs exchange keepalives at a rate that is configurable (5 sec by default). If 3 keepalives are missed, the MC considers the BR down
To enable OER to generate syslog messages, use:
To stop the OER process, without deleting the configuration, use:
The total number of prefixes that OER can monitor can be customized with the command:
To verify the status of the MC, use:
Defining BRs
In the oer-mc config mode you can then define the BRs that the MC will control:
Once you define the BR on the MC, you can then select which interfaces on the BR will be part of the PfR setup. Over all BRs you will need to have at least 1 internal and 2 external interfaces.
Internal Interfaces
An internal interface is used for passive monitoring (using netflow) and normally should be placed on the internal network between the MC and the BRs. To define an internal interface, use:
External Interfaces
An external interface is used to forward the traffic and the performance is actively monitored (using IP SLA) by the MC. To define an external interface, use:
For each external interface you can add additional configuration:
Under the global MC configuration mode, you can also define a parameter that is used for proper load-balancing.
The MC will look at the utilization value for all exit interfaces and if the difference between highest and lowest is more than the above configured parameter, than it considers that the links are not properly balanced so it will try to move some of the traffic from one exit to another. There is a similar parmeter for incomint utilization:
PfR Policies
PfR uses for its operation a set of rules, called a policy. There is a default policy that is configurable from withing the oer master configuration mode, but you can create your own policies using oer-maps, which are somewhat similar to route-maps or policy-maps.
Inside each entry (each SEQ) you can have only one match command and several set commands that override the defaults. The match commands are used to filter the type of traffic that this policy applies to. The filtering can be statically configured or learned dynamically. See Learning.
After matching the traffic, you define the actual policy in a series of set commands that override the values of the default policy:
In the end, apply the policy on the MC:
You can only apply a single policy-map. If you run the command again with a new policy, it will use the new policy instead of the old policy. You can see the configured OER polices using:
PfR Stages
PfR uses 5 stages:
Learning (aka Profiling): The MC tells the BR to learn the Traffic Classes. These classes can be dynamically learned (via NetFlow) or statically learned (manual configuration).
Measuring Performance: The BRs collect Traffic Class statistics
Apply Policies: Use measurements to determine whether a Traffic Class is out of policy (OOP) and if an alternate path can be found.
Enforcing (traffic re-routing): Enforcing is done by injecting BGP or static routes, or adding Policy Based Routing (PBR) configuration.
Verification: Verify that the new route match the policy
Learning
Static Learning
For static configuration use one of the following commands:
Dynamic Learning
To configure the policy to use dynamically learned traffic classes, use:
Now, you will have to define how learning actually works inside the oer master configuration mode. First, to enable dynamic learning, use the following command on the oer master:
Now you can enable learning based on Top Talkers (throughput) and Top Delay
Additional learning settings can be configured:
By default, the MC monitors for 5 minutes and then pauses for 120 min, meaning no routes change for another 120 min. To see results quicker, lower (drastically) these values. Traffic lists can be further defined to only learn and categorize specific types of traffic:
Measuring
Monitoring the policy can be done passively, actively or using both passive and active monitoring. Passive mode uses Netflow informatation from the BRs (No actual netflow config is needed). Active monitoring uses IP SLA probes that are configured on the MC, but are sourced from the BRs. The other options (fast, both, active throughput) use both active and passive monitoring. To configure the monitoring mode, use:
Applying Policy
In this stage, OER compares the measurements with thresholds defined in the policy in use. If the perfromance doesn't fit the requirements, OER considers the traffic to be OOPOLICY (Out of Policy) and makes a decision to move it on another exit. To configure the thresholds, use:
Enforcing
The default mode of operation of OER/PfR is "observe mode". In this mode, the MC does what it would normally do, except sending commands to the BRs. This mode is ususually used to see how OER would perform without doing any actual modifications to the traffic paths. To change the mode of operation, use:
For traffic classes that are defined using a prefix only, the prefix reachability information used in traditional routing can be manipulated. Protocols such as Border Gateway Protocol (BGP) or RIP are used to announce or remove the prefix reachability information by introducing or deleting a route and its appropriate cost metrics. For traffic classes that are defined by an application in which a prefix and additional packets matching criteria are specified, OER cannot employ traditional routing protocols because routing protocols communicate the reachability of the prefix only and the control becomes device specific and not network specific. This device specific control is implemented by OER using policy-based routing (PBR) functionality. If the traffic in this scenario has to be routed out to a different device, the remote border router should be a single hop away or a tunnel interface that makes the remote border router look like a single hop. PfR uses the concept of parent Route. It won't route traffic on a link unless you have a route for it using that link. In older version of IOS (before 12.4(24)), PFR supported as parent routes only BGP and static routes (even those static floating routes that don't make it into the routing table). With newer versions that support PIRO (Performance Routing Protocol Independent Route Optimization), it should be able to use any type of route
Verification
PfR uses NetFlow to automatically verify the route control. The MC expects a Netflow update for the traffic class from the new link interface and ignores Netflow updates from the previous path. If a Netflow update does not appear after two minutes, the master controller moves the traffic class into the default state. A traffic class is placed in the default state when it is not under PfR control.
Last updated