cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
703
Views
0
Helpful
3
Replies

Policy routing based on client gateway? (6509-E)

mastrboy_
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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

View solution in original post

3 Replies 3

Latchum Naidu
VIP Alumni
VIP Alumni

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.

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.

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

Getting Started

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:

Review Cisco Networking products for a $25 gift card