- In this video we want to take a look
at something called PBR, or Policy-Based Routing.
To understand how Policy-Based Routing works,
let's contrast it with traditional routing.
With traditional routing, a frame comes into the router
and the router is going to to look at the layer two header.
And it's going to check out that frame check sequence
to make sure the frame has not been corrupted in transit.
Assuming all looks good, it's going to remove
that Layer 2 header.
And that exposes the layer 3 header
which has a destination IP address.
And the router is going to take a look at
that destination IP address and make a forwarding decision
based on that router's IP routing table
and it's going to send the frame on its way.
However, there may be times when we want
to do something different
than the IP routing table would have us do.
Perhaps for performance reasons,
for security reasons, for some sort of design reason,
we might want to select traffic to take a different path
to go to a different next top address
as compared to what the routing table would have us do.
We can do that.
We can override decisions based on the IP routing table
with PBR or Policy-Based Routing.
Let's go through this forwarding logic.
Here, we still have the frame coming into the router,
and we take a look at that frame check sequence,
if all is good, we're going to remove that layer 2 header
and that's going to expose the inner packet.
Now maybe we still make a forwarding decision
based on the destination IP address.
But we could be a lot more advanced,
we're going to use something called a route map
which can match a variety of packet characteristics
such as the packet length, the destination IP address,
we could match an access control list
that's going to match very specific traffic possibly.
But we're going to make a forwarding decision based on
what the route map tells us to do.
And we apply that to the router interface.
That's the Ingress interface.
That's where PBR acts,
and Policy-Based Routing can have our frame forwarded out
a different direction as compared to
what the IP routing table would do.
Now let's consider that concept of a route map.
A route map is going to say if we match this,
then we're going to do that as a couple of examples.
Maybe we're going to match an IP address,
not just a destination IP address
we could use an access control list
to match a very specific traffic,
maybe traffic coming from one IP address and going
to this destination IP address.
We could match packet lengths,
and based on things like that,
and this is not a comprehensive listing
just a couple of examples.
But once we match some packet characteristic,
then we can set something such as
we could set the next top IP address.
We could set the egress interface.
And that's what Policy-Based Routing allows us to do.
Now remember I said that Policy-Based Routing is applied
as we're coming into the router,
we're applying it to the Ingress interface.
So what would happen if I went to the router console
and did a trace route or a ping,
or I did something that came from the router itself?
In that case, our policy would not apply,
however there's a way to make the policy apply.
And that's a variant of Policy-Based Routing called
local PBR.
With local PBR, we can globally apply a route map setting
to the router and that would cause traffic originating
from the router to behave based on our policy.
And in our next video, we're going to take a look
at a couple of configuration examples.
We'll configure regular Policy-Based Routing
and then we're going to configure local policy based routing