cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1530
Views
0
Helpful
9
Replies

Route-Maps

shahkalpeshj
Level 1
Level 1

Hi Guys,

I have a question regarding route-maps.  Can we use a route-map without the set command.

ip access-list extended Test_Traffic_To_Internet_1

permit ip 10.195.50.0 0.0.255.255 10.195.0.0 0.0.255.255

permit ip 10.195.54.0 0.0.255.255 10.195.0.0 0.0.255.255

ip access-list extended Test_Traffic_To_Internet_2

permit ip 10.195.50.0 0.0.0.255 10.0.0.0 0.255.255.255

permit ip 10.195.54.0 0.0.0.255 10.0.0.0 0.255.255.255

deny   ip any any

ip access-list extended Test_Traffic_To_Internet_3

deny   ip 10.0.0.0 0.255.255.255 10.0.0.0 0.255.255.255

permit ip any any

route-map Test_Traffic_To_Internet permit 10

match ip address Test_Traffic_To_Internet_1

route-map Test_Traffic_To_Internet permit 20

match ip address Test_Traffic_To_Internet_2

set ip next-hop 10.195.254.1

!

route-map Test_Traffic_To_Internet permit 30

match ip address Test_Traffic_To_Internet_3

set ip next-hop 10.195.10.4

9 Replies 9

Hello

All depends on what you want to accomplish - Policy routing or redistribution/filtering etc?

res

Paul

Please don't forget to rate any posts that have been helpful.

Thanks.


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

Pretty clearly the examples in the original post are about PBR. And in fact the answer is the same for both PBR and for redistribution. Yes a route map instance can have a match clause without having a set clause. And a route map instance can have a set clause without having a match clause.

I will point out that the example given will not work as probably intended. The permit statements in the second instance will never match anything because the permit statements in instance one will have matched already with their /16 masks.

HTH

Rick

Sent from Cisco Technical Support iPad App

HTH

Rick

Hi Richard,

But I thought that the permit instance in second instance will work if there is anything for the destination apart from 10.195.

The scenario for this is that 10.195 is just the branch network and the 10.0.0.0 is the whole network, so anything apart from 10.195 would need to go to the set next hop.  Do you still think that it would not give me the desired result.

When I originally read your post I was focused on the mismatch in the mask of the source address between the first access list and the second access list

first

permit ip 10.195.50.0 0.0.255.255

permit ip 10.195.54.0 0.0.255.255

second

permit ip 10.195.50.0 0.0.0.255

permit ip 10.195.54.0 0.0.0.255

In reading the post again I recognize that differences in the destination addresses do mean that each access list is testing for different conditions and that both access lists will work. My comment that the second instance of the route map would not work was incorrect and I am sorry that I made that mistake.

HTH

Rick

HTH

Rick

Hello

Richard are you saying for PBR no SET statement isn't required. Within instances a match or set or none or both can be applied, However wouldn't a SET statement be required eventually to policy route.

Res
Paul

Sent from Cisco Technical Support iPad App


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

Paul

That is exactly what I am saying. In the original post the first instance is a match with no set

route-map Test_Traffic_To_Internet permit 10

match ip address Test_Traffic_To_Internet_1

and the result of this is that for a sub-set of the traffic it will use normal routing logic.

I assert that in the case of route maps in general, and for route maps for PBR in particular, that it is legitimate to have an instance with a match and no set.

I see the part of your question that asks:"However wouldn't a SET statement be required eventually to policy route." Yes for PBR there needs to be a set eventaully. But if you read what I said carefully I answered in terms of what is required within an instance (and that is what I perceive the original poster was asking).

HTH

Rick

HTH

Rick

Rich & Paul,

Thanks a lot for the responses, will be trying out the route-maps tomorrow and will let you know the results.  But based on what Rich said and what I read in the cisco documentation, it seems that when doing PBR eventually you need to have a set command, but otherwise you can just have a match or a set command.

Thanks again, hope that I have the issue resolved tomorrow.

Thanks,

Kalpesh

Cheers Richard

Just needed to clarify with you as the way my day has been going I am now doubting myself

Res
Paul

Sent from Cisco Technical Support iPad App


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

Paul

I understand that. If you check through my posts it has not been a particularly good day for me either.

HTH

Rick

HTH

Rick