When implementing a technology it's often
helpful to understand, OK, what problem does this solve
or how could be applied?
And so to start our discussion about PBR--
policy based routing and how we can apply it,
let's take a look at this topology as a starting point.
So here in this network, I've got OSPF currently running
and the autocost reference bandwidth is all
set up correctly, and I've got area one over here,
area zero is the backbone, area two over here,
and here's my scheme, as well. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and here's my scheme, as well.
So it's the area number built into the IP
addressing scheme and then RR which is like,
the router numbers.
So it goes from lower to higher.
So router three to four it'll be 34 in that octet.
From R5 to R7 would be 57 in that octet and so forth.
All right, so if this is all set up in this way
with the autocost reference bandwidth treating gigabit
different than [INAUDIBLE],, Here's
what we could predict the path would
be from R8 going to this network here, 10.1.7
And we'd be assuming these interfaces were not enabled WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we'd be assuming these interfaces were not enabled
for any routing protocols.
It would be through here, and it would
prefer the path over the gigabit rather than this fast ethernet
and then down here.
So I think we should do is before we start
taking a look at what we could do with PBR,
let's verify our current path in this lab environment.
And here we go.
So if we go down to R8, which is in the bottom right-hand side
of the topology, and we do a show IP route.
It's a good start.
Yeah, lots of good routes including 1 to 10.1.7 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Yeah, lots of good routes including 1 to 10.1.7
right there.
And if we do a show ip cef for that route.
We'll just put it in --
copy, paste it there.
A little less typos that way.
It says, yep, I know how to get there.
My next stop is 10.2.68.6, which is R6
and my egress or outbound interface is FA4/1.
Let's take a peek together at our topology, right.
So R8 knows how to forward it from the routing table.
It's ready to go.
And let's do a trace to verify the whole path.
We'll do a trace to 10.1.7. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We'll do a trace to 10.1.7.
and each router ends with the same IP
address as it's router number.
So R7 would be .7 on that network,
and there is our path from R cells--
R8 to R6, to R4 to R2 to R1 to R3 to R5.
perfect.
That's what we'd expect to have happen.
So R4 is forwarding northbound here to R2
or that path, the 10.1.7 network.
But if we wanted to, we could use policy-based routing
and say we want to change the rules based
on a certain type of traffic. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
on a certain type of traffic.
Maybe we say the condition is if traffic is being sourced by R8,
we can specify in an access control list
to identify the match of what we want to treat special.
If it's R8 going to R7 based on IP
address, or we could also base it on protocol like TCP or UDP
or ICMP, and we could be very creative.
Basically anything we can--
virtually anything we can identify
with an extended access control list
we can set up for policy-based routing.
And then we could train R4 based on that condition. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then we could train R4 based on that condition.
Go ahead and use your next top of 10.0.--
that would be a 34.3 to forward the traffic.
So even though his routing table says
go northbound to reach the 10.1.7 network,
we could, with policy-based routing,
tell it to make a different decision.
And in life that's helpful sometimes.
Make a different decision.
And that could be based on the quality of service
in our network or it could be based on the special handling
of traffic for whatever reason, but here's
the play-by-play, the big picture WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the play-by-play, the big picture
of how we can make this work.
We would create an access control list
that is going to identify the traffic that is going
to get the special treatment.
Think of the ACL as the if.
Now when we implement this as part of a route map,
we're going to use a match statement.
Think of a match.
Think of the logic here.
Something one night that happened to me when
I was young growing up was I had a curfew
and I believe at one point it was 10:00 PM, which is a--
anyway, long story short, it was 10:00 PM. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
anyway, long story short, it was 10:00 PM.
And there was an if-then statement associated with it.
It was like this--
if you don't make it home by 10:00 PM,
then you are going to go ahead and lose
driving privileges for a week.
An if-then statement.
Great.
And if I got home before 10:00, there's no problem.
There's no special policy being enforced as far
as restrictions.
And that's what we're doing with policy based routing.
It's an if-then statement, and the way we implement it is we
use a syntax called match and set. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
use a syntax called match and set.
So when you see match set, think of this as the if.
If traffic is coming from R8 and if the protocol is using ICMP
or if it's TCP or UDP, whatever.
And if it's going to a destination-specific IP
address, that's the if part that we're going to match on.
And if that's true, it's like the curfew.
If you're home after 10:00 you're
going to lose privileges.
Then the set can be if that condition is matched,
then set the next hop over here to be
the IP address of R3, which would cause him
to forward it this direction. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to forward it this direction.
The way we're going to implement this with policy-based routing
is we are going to create an ACL that matches on for our
if, for our match.
And then we're going to have a route map, which
route maps are used for lots.
Oh my gosh, am I writing over my face?
I need to bring that up.
I need to schooch over just a little bit.
And then we're going to use a route map.
It's going to tie to the ACL for matching purposes
and in the route map, that's where we say match.
If we match the ACLs--
the permits in the ACL-- WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the permits in the ACL--
then we want to go ahead and set, meaning set the next hop.
And that's the logic behind policy-based
routing to override the default behavior of the routing table.
And in our scenario, if we wanted R4 to actually act
on that, if the traffic matches this ACL then go and set
the next hop to so and so, we would apply the PBR policy on 3
slash 1.
So it's traffic when it comes in.
If there's a policy for policy-based routing applied
on that interface, it then goes to the logic,
looks if there's a match.
If there's a match, then executes WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
If there's a match, then executes
the set, whether it's the next hop or whatever it might be,
and then it--
orthopacket moves on.
If it doesn't match the policy, it just routes it as normal.
Now one thing to note with policy-based routing,
if we create a policy and we apply it to the interface,
only ingress traffic on that interface
is going to be considered by that policy,
and if there's a match it can then
go ahead and forward the packet in the direction
that we specify.
However, any traffic that the router generates
itself that is forwarding-- that it creates,
like it's responding to an SSH session, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
like it's responding to an SSH session,
or it's sending updates or it's generating traffic locally,
the policy is not going to apply to that by default,
unless we train the router also that there's
an IP local policy.
And in our labs coming up we'll go ahead
and have an opportunity to do both of those options
as we practice and work with policy-based routing.
So in the next video, what we'll do
is I'll walk you through the plan creation and lab steps
to implement policy-based routing on R4 so we can see it
before and after.
So I'll see you in that next video. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'll see you in that next video.
Meanwhile, I hope this has been informative for you
and I'd like to thank you for viewing.