03-21-2008 01:03 AM - edited 03-05-2019 09:53 PM
Hi,
If I have two default route (D1 and D2) with two subnet connected (S1 and S2), is there a way to forward traffic through D1 or D2 with reference to the sender IP, that is network hosts belonging to S1 have default route D1 and hosts belonging to S2 have default route D2?.
Thank you.
Best regards.
Massimiliano.
Solved! Go to Solution.
03-21-2008 02:21 AM
Hi Massimiliano
You can use PBR (Policy Based Routing) to achieve this.
S1 = 192.168.5.0/24
S2 = 192.168.6.0/24
access-list 101 permit ip 192.168.5.0 0.0.0.255 any
access-list 102 permit ip 192.168.6.0 0.0.0.255 any
route-map DEFR permit 10
match ip address 101
set ip next-hop
route-map DEFR permit 20
match ip address 102
set ip next-hop
Then you apply the policy onto the relative interface ie.
int fa0/0
ip polict route-map DEFR
HTH
Jon
03-21-2008 02:21 AM
Hi Massimiliano
You can use PBR (Policy Based Routing) to achieve this.
S1 = 192.168.5.0/24
S2 = 192.168.6.0/24
access-list 101 permit ip 192.168.5.0 0.0.0.255 any
access-list 102 permit ip 192.168.6.0 0.0.0.255 any
route-map DEFR permit 10
match ip address 101
set ip next-hop
route-map DEFR permit 20
match ip address 102
set ip next-hop
Then you apply the policy onto the relative interface ie.
int fa0/0
ip polict route-map DEFR
HTH
Jon
03-21-2008 03:18 AM
Hi Jon,
Thank you.
Can I use PBR on switches Layer 3 also?
Can I apply route map to interface VLAN?
Best regards.
Massimiliano.
03-21-2008 03:54 AM
Massimiliano
Yes you should be able to use PBR on most layer 3 switches. Note that you may need to adjust the SDM template (to use the routing template) on some of the switches to get support for PBR.
HTH
Rick
03-21-2008 05:48 AM
Hi,
Thank you Rick.
Best regards.
Massimiliano.
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: