05-23-2013 08:00 AM - edited 03-07-2019 01:31 PM
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
05-23-2013 08:05 AM
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.
05-23-2013 08:55 AM
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
05-23-2013 09:09 AM
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.
05-23-2013 10:12 AM
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
05-23-2013 12:37 PM
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
05-23-2013 12:52 PM
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
05-23-2013 12:56 PM
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
05-23-2013 03:27 PM
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
05-23-2013 06:55 PM
Paul
I understand that. If you check through my posts it has not been a particularly good day for me either.
HTH
Rick
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