08-16-2017 05:06 AM - edited 03-05-2019 09:00 AM
Hi all,
i have a query regarding load balancing .
i have two isp ,
my local user brows google.com it should be go to ISP1
but when they brows yahoo.com it should be go to ISP2
kindly guide me.i am using cisco router 3825
08-16-2017 05:58 AM
PBR (policy based routing) might provide the solution you seek, although the kind of load balancing you seem to require is a real pain to maintain.
Generally, it's easier to just "round-robin" flows to your ISPs.
If your platform (and licensing) supports it, PfR (performance routing) can dynamically load balance.
08-17-2017 06:06 AM
hi ,
Thanks for your support , i will check it and share the result .
08-16-2017 06:09 AM
Hello,
something like the below should work:
class-map match-any CLASS_GOOGLE
match protocol http host "google.com"
match protocol secure-http host "google.com"
!
class-map match-any CLASS_YAHOO
match protocol http host "yahoo.com"
match protocol secure-http host "yahoo.com"
!
policy-map MARK_GOOGLE
class CLASS_GOOGLE
set ip dscp 1
!
policy-map MARK_YAHOO
class CLASS_YAHOO
set ip dscp 2
!
access-list 100 deny ip any any dscp 1
access-list 100 permit ip any any
!
route-map test REDIRECT_URL 10
match ip address 100
set ip next-hop 201.100.100.100
!
access-list 101 deny ip any any dscp 2
access-list 101 permit ip any any
!
route-map test REDIRECT_URL 20
match ip address 101
set ip next-hop 202.200.100.100
!
interface GigabitEthernet0/0
description LAN interface
ip policy route-map REDIRECT_URL
08-16-2017 07:44 AM
A nice example of PBR although I don't believe it deals with link failure.(?)
08-16-2017 11:27 AM
Indeed, link failure isn't covered.
A simple EEM script could work:
event manager applet remove_pbr
event tag e1 syslog pattern "Line protocol on Interface GigabitEthernet2/0, changed state to down"
event tag e2 syslog pattern "Line protocol on Interface GigabitEthernet3/0, changed state to down"
trigger
correlate event e1 or event e2
exit
action 1.0 cli command "enable"
action 1.5 cli command "config t"
action 2.0 cli command "interface GigabitEthernet0/0"
action 2.5 cli command "no ip policy route-map REDIRECT_URL"
action 3.0 cli command "end"
action 3.5 cli command "wr mem"
event manager applet add_pbr
event tag e1 syslog pattern "Line protocol on Interface GigabitEthernet2/0, changed state to up"
event tag e2 syslog pattern "Line protocol on Interface GigabitEthernet3/0, changed state to up"
trigger
correlate event e1 or event e2
exit
action 1.0 cli command "enable"
action 1.5 cli command "config t"
action 2.0 cli command "interface GigabitEthernet0/0"
action 2.5 cli command "ip policy route-map REDIRECT_URL"
action 3.0 cli command "end"
action 3.5 cli command "wr mem"
08-16-2017 04:18 PM
To OP, and now you might begin to understand why I wrote ". . . a real pain to maintain." ;)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide