02-27-2012 05:23 AM - edited 03-07-2019 05:12 AM
I have the following scenario i'm trying to solve:
If client gateway = 192.168.64.9 then next-hop = 192.168.64.8 else use default-route 0.0.0.0
I know it's possible to do a route-map match ip-address ACL list. But is it possible to match on gateway?
Some info about hardware and config:
6509-E in VSS (IOS 12.2(17r)SX5) withVS-S720-10G supervisor.
All routes are static, IP for 192.168.64.9 is on SVI vlan.
Solved! Go to Solution.
02-27-2012 05:59 AM
No way to do that with PBR options as far as i know. You would basically have to have a list of all the clients using 192.168.4.9 as their gateway and then use their IPs in the acl for the PBR ie.
access-list 101 host 192.168.64.12 any
access-list 101 host 192.168.64.22 any
etc...
for all clients using 192.168.64.9 as their gateway and then set their next-hop IP as 192.168.64.8.
Mind you as 192.168.64.8 is in the same subnet you may as well just reset those clients to 192.168.64.8 directly rather than using PBR.
Jon
02-27-2012 05:35 AM
Hi,
What I understand based on your post is.... You want define a route-map and set the default next-hope to route all the packets from a specific network to forward to the defined gateway in route-map instead of going through default route.
If that is correct below is what the relevent cofnig.
interface Vlan18
description ABC
ip address 10.28.28.1 255.255.0.0
ip policy route-map DFE
route-map DFE permit 10
match ip address 171
set ip default next-hop 10.28.28.100
access-list 171 deny ip 10.31.6.0 0.0.0.255 10.0.0.0 0.255.255.255
access-list 171 permit ip 10.31.6.0 0.0.0.255 any
Please rate all the helpfull posts.
Regards,
Naidu.
02-27-2012 05:50 AM
Almost. That is currently the solution we have using.
But consider this, there are some clients on the same subnet which we want to route to a different IP. So we have the following config on the SVI:
vlan x
ip address 192.168.64.9 255.255.248.0
ip address 192.168.64.222 255.255.248.0 secondary
We want to evaluate the next-hop based on the gateway. So if client has gateway 192.168.64.9 -> next-hop = 192.168.64.8 and if client gateway is 192.168.64.222 -> next-hop = default-gateway.
02-27-2012 05:59 AM
No way to do that with PBR options as far as i know. You would basically have to have a list of all the clients using 192.168.4.9 as their gateway and then use their IPs in the acl for the PBR ie.
access-list 101 host 192.168.64.12 any
access-list 101 host 192.168.64.22 any
etc...
for all clients using 192.168.64.9 as their gateway and then set their next-hop IP as 192.168.64.8.
Mind you as 192.168.64.8 is in the same subnet you may as well just reset those clients to 192.168.64.8 directly rather than using PBR.
Jon
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: