cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
855
Views
5
Helpful
7
Replies

HSRP CORE & Internet load balancing

Kangalala
Level 1
Level 1

Hi guys,

I have configured hsrp for my Core Vlans and its working fine but I would like to load balance my internet Links as well according to source vlans with destination ISP. I have vlans 2 & 4 with Core1 priority so they will be able to use the 2 ISP links on the left, I also have vlan 3 & 5 using Core2 as priority so they will use the 2 ISP on the left. How can I destribuite traffic coming from certain vlan to use a specific ISP?

I have 2 default gateways for my Core switches: Core 1 im pointing to router hsrp address of one of the vlans of left side.

                                                                              Core 2 im pointing to router hsrp address of one of the vlans of right side.

so I have all traffic from left side going out of one ISP and same on the right side.

Topology attached.

2 Accepted Solutions

Accepted Solutions

Francesco Molino
VIP Alumni
VIP Alumni

Hi

I'm not sure I get your concern.

if you want to route based on source IP, you need to use PBR.

to use you need to an acl (let's assume your lan 1 is 192.168.10.0/24 and lan2 is 192.168.100.0/24. Next hop for Lan1 is 10.100.10.1 and for Lan2 is 10.110.10.1)

access-list 100 permit ip 192.168.10.0 0.0.0.255 any

access-list 101 permit ip 192.168.100.0 0.0.0.255 any

route-map LAN1 permit 10

 match ip address 100

 set ip next-hop 10.100.10.1

route-map LAN2 permit 10

 match ip address 101

 set ip next-hop 10.110.10.1

Int vlan1

 ip policy route-map LAN1

Int vlan2

ip policy route-map LAN2

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

No on the hosts side they should keep their default gateway as before. 

Thanks 

PS: Please don't forget to rate and mark as correct answer if this solved your issue 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

7 Replies 7

Francesco Molino
VIP Alumni
VIP Alumni

Hi

I'm not sure I get your concern.

if you want to route based on source IP, you need to use PBR.

to use you need to an acl (let's assume your lan 1 is 192.168.10.0/24 and lan2 is 192.168.100.0/24. Next hop for Lan1 is 10.100.10.1 and for Lan2 is 10.110.10.1)

access-list 100 permit ip 192.168.10.0 0.0.0.255 any

access-list 101 permit ip 192.168.100.0 0.0.0.255 any

route-map LAN1 permit 10

 match ip address 100

 set ip next-hop 10.100.10.1

route-map LAN2 permit 10

 match ip address 101

 set ip next-hop 10.110.10.1

Int vlan1

 ip policy route-map LAN1

Int vlan2

ip policy route-map LAN2

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

thanks for your reply, and I would like to know if I remove my default gateway with this PBR applied to my vlans?

No on the hosts side they should keep their default gateway as before. 

Thanks 

PS: Please don't forget to rate and mark as correct answer if this solved your issue 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

My Lab is working fine with the route-map applied but to make it complete is there a way i can track the default route on the route-map applied so that i can switch to another gateway if the destanation becomes unreachable?

Hi 

Nice to hear that.

Yes you can do taking on PBR. I won't cooy all commands here, just a Cisco link that explains how to do it:

http://www.cisco.com/c/en/us/support/docs/ip/ip-routed-protocols/48003-pbrtracking.html

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Hi, Just want to let you know that I am able to route individual vlans to different default gateways. One question I would like to know, does my configuration of set ip next-hop x.x.x.x address need to be a direct next hop or cant it be 2 or 4 hops away? I have OSPF running in all my equipments so all routes are available on the routing table.

Hi

Usually the next-hop is close in order to control traffic where we want to forward it. If you want to control traffic you can set next-hop 2 hops away but not sure that it will take the path you want.

You can also use PBR next-hop recursive if you want to control traffic path.

Thanks

PS: Please don't forget to rate and mark as correct answer if this solved your issue


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
Review Cisco Networking products for a $25 gift card