cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
249
Views
0
Helpful
3
Replies

PBR Policy Based Routing questions.

zfasteddie
Level 1
Level 1

I have 3 routers called A,B and C.

A and C are the uplink routers for B. ie <- A<-> B <-> C ->

A is on E5/0 of router B and

C is on E5/1 of router B.

on e5/0 (B): ip address 192.168.1.2 255.255.255.252 (gateway to A is 192.168.1.1)

on e5/1 (B): ip address 192.168.2.2 255.255.255.252 (gateway to C is 192.168.2.1)

Then I have networks 192.168.4.0 which I want to exit to gateway A (e5/0) and I have 192.168.5.9 which I want to exit to gateway C (e5/1).

Then in router B, I have a statement: ip route 0.0.0.0 0.0.0.0 192.168.1.1

My config in PBR as follows:

int eth5/0

ip address 192.168.1.2 255.255.255.252

ip policy route-map exittoA

!

int eth5/1

ip address 192.168.2.2 255.255.255.252

ip policy route-map exittoB

!

ip route 0.0.0.0 0.0.0.0 192.168.1.1

!

access-list 115 permit ip 192.168.4.0 0.0.0.255 any

access-list 116 permit ip 192.168.5.0 0.0.0.255 any

!

route-map exittoA permit 10

match ip address 115

set ip next-hop 192.168.1.1

!

route-map exittoB permit 10

match ip address 116

set ip next-hop 192.168.2.1

!

Then I did a traceroute from a workstation 192.168.5.2, it will exit to 192.168.1.1 instead of 192.168.2.1 and vice versa too.

Is there something wrong with the config that I have?

Thank you for your help.

3 Replies 3

Gilles Dufour
Cisco Employee
Cisco Employee

I don't understand why you need PBR for this.

PBR is for routing decision based on something else than just the destination address.

In your case you only talk about the destination, so PBR should not be necessary.

I would suggest to configure the following static route and remove all PBR config:

ip route 192.168.5.0 255.255.255.0 192.168.2.1

gdufour,

Hmm but 192.168.5.0 is not originating from router B instead it originates from C.

So If I did ip route 192.168.5.0 255.255.255.0 192.168.2.1 on router B

then the routes will be bouncing back between B and C.

There is an ATM interfaces on router B that is going to use 192.168.5.0/24

So if in router C I did,

ip route 192.168.5.0 255.255.255.0 192.168.2.2

then if in router B I did,

ip route 192.168.5.0 255.255.255.0 192.168.2.1

Doesn't it create a bounce route?

Thanks.

ruwhite
Level 7
Level 7

Are you trying to trace from the router with the policy applied, or from behind it? You'll have to do local-policy to get the policy to apply to packets generated by the router itself.

Russ

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: