02-13-2020 09:31 AM
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
02-13-2020 11:28 AM
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
02-16-2020 02:48 PM
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