cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1520
Views
0
Helpful
2
Replies

RouteMap Set vs Match statement confusion

nwekechampion
Level 3
Level 3

Hi all,

 

I am looking to understand what the "Set" and "Match" statements on Route map configs actually achieves.

I have read many an article, but the explanation seems to be very grey and confusing.

 

So when and why would I need to use "match" and "Set" statements?

 

I have used in a lab, but still yet to understand its effects, so any help in understanding this along the way would be very much appreciated:

 

Below Routemap was used for WAN failover scenario with PAT Overload:

 

Application

ip nat inside source route-map WAN01 interface GigabitEthernet0/1 overload
ip nat inside source route-map WAN02 interface GigabitEthernet0/2 overload

ip local policy route-map TRACK_PRIMARY_IF

 

Routemaps:

route-map TRACK_PRIMARY_IF permit 10
match ip address PING_PERMIT
set interface GigabitEthernet0/1
!
route-map WAN01 permit 10
match ip address LAN
match interface GigabitEthernet0/1
!
route-map WAN02 permit 10
match ip address LAN
match interface GigabitEthernet0/2

 

Please see attached as well for bigger picture..

 

Would really appreciate any clarification

 

 

 

 

 

 

 

 

2 Replies 2

lucasfreitas83
Level 1
Level 1

Hello nwekechampion,

 

I like to think that route-map is similar to programmability.

 

Math is similar to IF and SET similar to THAN.

 

When route-map math a sentence, if it has SET the next action is SET.

 

About your configuration

ip local policy route-map TRACK_PRIMARY_IF

 

Local policy is used for tests or packets generated by device, for example: if you have route-map apply in the interface and you test a ping starting by device, this not applicable for route-map, IP local policy make router apply this route-map for him.

 

ip nat inside source route-map WAN01 interface GigabitEthernet0/1 overload
ip nat inside source route-map WAN02 interface GigabitEthernet0/2 overload

 

Simply create a NAT overload by math route-map and in route-map that you have two maths, math ip address LAN (ACL) and math interface, that is just when match ACL 192.168.1.0 0.0.0.255 and source interface gi1/01 by example that does overload NAT.

 

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future.

Best regards,
Lucas Freitas

 

 

Hi Lucas,

Thanks so much for your reply..
However I am just a bit confused with your explanation in general.

For example how does the if-then "programmability" affect the "Match-Set" Usage?

Secondly, my Routemap Nat overload works fine as it references the acl below:
route-map WAN01 permit 10
match ip address LAN
match interface GigabitEthernet0/1
!
route-map WAN02 permit 10
match ip address LAN
match interface GigabitEthernet0/2
!

So why do I need to change it?

Thirdly, There are 2 use cases here for Route maps:
1. Overload NAt
2. Local policy ==> Test route (ping 200.60.65.2)

So in summary, I just needed to understand clearly what the use case for a Set and Match statement should be?
Review Cisco Networking for a $25 gift card