cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
504
Views
0
Helpful
2
Replies

PBR and VRF routing problem

lanab
Level 1
Level 1

I am trying to solve a routing problem for a customer who have two exits in their network point to the same external network based on N7K core switches.

 

Server1 192.168.80.11/24

Server2 192.168.80.12/24

Router1 192.168.40.100/24

Router2 192.168.40.101/24

Destination network 148.148.0.0/16

 

The two servers needs to reach the destination network 148.148.0.0/16 and based on PBR, Server1 192.168.80.11/24 needs to take path through Router1 192.168.40.100/4 and  Server2 192.168.80.12/24 path through Router2 192.168.40.101/24

 

The config:

 

vrf context nuble
ip route 0.0.0.0/0 192.168.80.4
ip route 148.148.0.0/16 192.168.40.100

!

interface Vlan40
description NUBLE-OUTSIDE-VRF-INTERFACE
no shutdown
vrf member nuble
no ip redirects
ip address 192.168.40.1/24

!

interface Vlan80
description NUBLE-INSIDE-VRF-INTERFACE
no shutdown
vrf member nuble
no ip redirects
ip address 192.168.80.1/24
ip policy route-map nuble

!

ip access-list NAT-nuble-TEST
10 permit ip 192.168.80.11/32 148.148.0.0/16
ip access-list NAT-nuble-PROD
10 permit ip 192.168.80.12/32 148.148.0.0/16

!

route-map nuble permit 10
match ip address NAT-nuble-TEST
set ip next-hop 192.168.40.100 
route-map nuble permit 20
match ip address NAT-nuble-PROD
set ip next-hop 192.168.40.101

route-map nuble permit 30

!

#END

 

Will the policy-map take have any effect also having VRF stating ip route 148.148.0.0/16 192.168.40.100? will it take the correct path based on the source address assigned by the policy-map? 

 

 

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

If you are doing PBR, you do not specific static Route for that to exit network, PBR should able to get ACL match and route the traffc.

 

high level looks ok, do you see any issue ? or not working ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello
If the pbr is in a vrf then specify that in the policy route-map

route-map nuble
set ip vrf nuble xx next-hop x.x.x.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul