01-14-2021 03:37 AM
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?
01-14-2021 03:47 AM
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 ?
01-14-2021 03:56 AM - edited 01-14-2021 03:56 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide