cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
559
Views
5
Helpful
1
Replies

PBR Route-Map set next hop except for 1 IP

TvdN
Level 1
Level 1

I want to create a route-map so that all IP traffic goes to the default route except a single IP address (192.168.40.1) which need to be set to next hop 192.168.5.254. I want to apply this to a VLAN.

 

The switch I want to achieve this on is a Cisco WS-C3560CX-12PC-S.

 

So far I've tried creating various route-map deny and permit statements, but most of them they are not applied when trying to link them to the VLAN.

 

-----EDIT-----

I found out how to achieve what I wanted. There may be a better or simpler solution, but this works for me:

 

access-list 100 permit ip any host 192.168.40.1
!
!
route-map test permit 10
match ip address 100
!
route-map test permit 20
set ip next-hop 192.168.5.254

!

interface Vlan5
ip address 192.168.5.253 255.255.255.0
ip policy route-map test

 

1 Reply 1

Richard Burts
Hall of Fame
Hall of Fame

Your config has the match in instance 10 of the route map and the set in instance 20. The match and the set should be in the same instance of the route map.

 

HTH

 

Rick

HTH

Rick