I have a router cisco 7604 VXR with two outside connections, each one associated to a set of addresses. I have defined a default gateway for one of the set of addresses and a source routing to define the gateway for the other set but it doesn't work. The configuration is:
encapsulation dot1Q 5
ip address 220.127.116.11 255.255.255.224
ip flow monitor flow-monitor-smart-1 output
ip flow ingress
ip flow egress
ip policy route-map CCA_GATEWAY
ip ospf message-digest-key 1 md5 7 1A4D169404421B1F027A7A
access-list 101 permit ip 18.104.22.168 0.0.0.31 any
route-map CCA_GATEWAY permit 10
match ip address 101
set ip default next-hop 172.31.50.2 (address of the next router. I arrive to it)
When I do a show route-map CCA_GATEWAY I see that "the number of policy routing matches" increase but the router is sending the packets to the wrong gateway.
route-map CCA_GATEWAY, permit, sequence 10
ip address (access-lists): 101
ip default next-hop 172.31.50.2
Policy routing matches: 2336130 packets, 2068948582 bytes
What does it happen?
IOS version 15.1
I suspect that the issue is in the way that you are doing the set in the route map. You are setting the default netxt hop:
set ip default next-hop 172.31.50.2
but based on what you have described I believe that it would be better to set the next hop directly:
set ip next-hop 172.31.50.2
can you give this a try and let us know if it improves the situation?