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

dual ISP (static + dhcp) load balancing (IP SLA + PBR)

Hello everyone,

I'm trying to setup load balancing between two different ISP using IP SLA and PBR. 

ISP1 is PPPoE (static addresses).

ISP2 uses dhcp addresses.

router 1841 (Version 12.4(25d))

simple topology :

ISP1                                            ISP2 

|                                                    |

|_______fa0/0_ router_fa0/1_____|

It works great when I use static default routes for both ISP. 

example :  ISP1 becomes unreachable.  therefore its default route is removed from the routing table using the tracking methode.

The problem is that its not a good idea to use a static default route for ISP2 because it uses dhcp and therefore the next-hop might change over time.

So I had to modify a few things in my configuration.   (you can see my configuration below)

Now, when ISP2 becomes unreachable, its default route is removed from the routing table (so far so good)  BUT the default route comes back a few seconds later with no reason (the track object state is still DOWN).

Any idea why I get this weird behavior ?

Tell me if you need more information.

Thanks

my config :

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
ip sla monitor 1   // monitor ISP1
type echo protocol ipIcmpEcho 1.1.1.1 source-interface FastEthernet0/0
timeout 500
frequency 2
ip sla monitor 2   // monitor ISP2
type echo protocol ipIcmpEcho 2.2.2.1 source-interface FastEthernet0/1
timeout 500
frequency 2
ip sla monitor group schedule 1 1-2 schedule-period 4 frequency 2 start-time now life forever
!
!
!
username Alexis privilege 15 secret 5 $1$UXfm$pmZh1uUxYgl1vfhBmB1YO/
!
!
!
track 1 rtr 1
delay down 6 up 6
!
track 2 rtr 2
delay down 6 up 6
!
!
!
!
interface FastEthernet0/0    // linked to ISP1
ip address 1.1.1.2 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1    // linked to ISP2
ip dhcp client route track 2
ip address dhcp
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/0/0
!
interface FastEthernet0/0/1
!
interface FastEthernet0/0/2
!
interface FastEthernet0/0/3
!
interface Serial0/1/0
no ip address
shutdown
clock rate 2000000
!
interface Serial0/1/1
no ip address
shutdown
clock rate 2000000
!
interface Vlan1
ip address 10.0.0.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip policy route-map PBR
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1    // ISP1  static default route
ip route 0.0.0.0 0.0.0.0 dhcp                   // ISP2 dhcp default route    (I needed to modify the administrative distance of the route learned                                                                                                              through dhcp)

!
!
no ip http server
no ip http secure-server
ip nat inside source route-map ISP1-NAT interface FastEthernet0/0 overload
ip nat inside source route-map ISP2-NAT interface FastEthernet0/1 overload
!
ip access-list extended HTTP
permit tcp 10.0.0.0 0.0.0.255 any eq www
!

access-list 1 permit 10.0.0.0 0.0.0.255
!
route-map ISP2-NAT permit 10
match ip address 1
match interface FastEthernet0/1
!
route-map PBR permit 10
match ip address HTTP
set ip next-hop verify-availability 1.1.1.1 1 track 1
set ip next-hop dynamic dhcp
!
route-map ISP1-NAT permit 10
match ip address 1
match interface FastEthernet0/0
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
logging synchronous
login local
!
scheduler allocate 20000 1000
end

3 REPLIES
Bronze

dual ISP (static + dhcp) load balancing (IP SLA + PBR)

I've designed a very similar configuration in the past - this brings back good memories. Are we missing part of your configuration? I don't see the tracking object #2 applied to the route to ISP2.

New Member

Re: dual ISP (static + dhcp) load balancing (IP SLA + PBR)

Hi Kyle McKay,

Kyle McKay a écrit:

Are we missing part of your configuration?

No, everything is there.

Kyle McKay a écrit:

I don't see the tracking object #2 applied to the route to ISP2.

The route to ISP2 is learned through DHCP. 

From my understanding, the only way to track this kind of route is to use this command in the interface configuration mode :

ip dhcp client route track 2

The following command appears in the configuration :  ip route 0.0.0.0 0.0.0.0 dhcp

BUT the command I really used is :  ip route 0.0.0.0 0.0.0.0 dhcp 1   ( set the administrative distance to 1.  so I can load balance between several default routes (static and dhcp)).    Unfortunately, there is no track option at the end of this command.

Thank you for your help anyway.

New Member

Re: dual ISP (static + dhcp) load balancing (IP SLA + PBR)

Hello again,

Even though no one seems interested in this post I thought I would give you an update .

I gave it another try today and here is what I have discovered:

1.  When I use this command to modify the administrative distance of the dhcp default route:

ip route 0.0.0.0 0.0.0.0 dhcp 1

the route is never removed from the routing table, even if the track is down.

2.  When I don't use that command, the route is removed exactly when it should. 

So it looks like that command is the real problem.  it's somehow screwing with the tracking system...

I found an other way to modify the administrative distance of a dhcp default route : 

it's the interface configuration command ip dhcp client default-router distance .

(http://www.cisco.com/en/US/docs/ios/ipaddr/command/reference/iad_dhc1.html#wp1041855)

Unfortunately, my IOS does not support it...

Still, it would be great to have your point of view about this. 

2106
Views
0
Helpful
3
Replies
CreatePlease to create content