05-23-2018 05:11 PM - edited 03-08-2019 03:07 PM
Hello, how can I adjust this route map to ONLY allow set the next hop for traffic from 10.21.1.77 to public IP addresses i..e all private addresses will NOT be affected by this route map.
Or do I have to set two distinct next hop clauses i.e. one clause to set the next hop for private subnet ranges and another clause to set the next hop for all other destinations ?
Thank you kindly.
route-map myRouteMap permit 10
match ip address 10.21.1.77
match destination 10.0.0.0/8
set ip next-hop 10.21.1.1
match destination 172.16.0.0/12
set ip next-hop 10.21.1.1
match destination 192.168.0.0/16
set ip next-hop 10.21.1.1
route-map VD_EDGE permit 20
match ip address 10.21.1.77
set ip next-hop 10.50.1.10
05-23-2018 05:26 PM - edited 05-23-2018 05:42 PM
Hi,
If you do "set ip default next-hop" the traffic will look in the routing table after hitting the PBR route-map. If there is no route for the match clause IP, it will default to the next hop you set. So if the private addresses have destination routes in the routing table, they will be routed accordingly, and your 10.21.1.77 will go to the default next hop you set to the public addresses.
05-23-2018 05:28 PM - edited 05-23-2018 05:31 PM
thank you but how does this work with the default route. I mean when the route map looks in the routing table it will not only see private subnet routes but it will also see a default route.
Therefore there would never be case where my route-map next hop is used ?
05-23-2018 05:38 PM - edited 05-23-2018 05:41 PM
I was automatically thinking in terms of Policy Based Routing (PBR). This is usually placed on the incoming LAN interface and is referenced first. In the case of your match clause IP, it would be routed to the default next hop before seeing the default route. Look up PBR config examples.
I cleaned up my first comment.
05-23-2018 05:43 PM
Thank you, I have revised my route-map. Can someone please confirm if this would have the desired effect ?
route-map myRouteMap permit 10
match ip address 10.21.1.77
match destination 10.0.0.0/8
set ip next-hop 10.21.1.1
match destination 172.16.0.0/12
set ip next-hop 10.21.1.1
match destination 192.168.0.0/16
set ip next-hop 10.21.1.1
route-map VD_EDGE permit 20
match ip address 10.21.1.77
set ip next-hop 10.50.1.10
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