cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1641
Views
0
Helpful
4
Replies

route map for internet traffic only ?

tedauction
Level 1
Level 1

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

 

4 Replies 4

Larry Sullivan
Level 3
Level 3

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.

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 ?

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.

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