Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Choice of multiple default gateway

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Blue

Re: Choice of multiple default gateway

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

4 REPLIES
Hall of Fame Super Blue

Re: Choice of multiple default gateway

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

Re: Choice of multiple default gateway

Hi Jon,

Thank you.

Can I use PBR on switches Layer 3 also?

Can I apply route map to interface VLAN?

Best regards.

Massimiliano.

Hall of Fame Super Silver

Re: Choice of multiple default gateway

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

Re: Choice of multiple default gateway

Hi,

Thank you Rick.

Best regards.

Massimiliano.

156
Views
4
Helpful
4
Replies
CreatePlease login to create content