Static Routes for load balancing

Unanswered Question
Dec 18th, 2007

I have 2 ISP links to my router how can i config the load balancing? Can u send me example command for load balancing?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
ekhoo Tue, 12/18/2007 - 20:58

sophaunsim,

You can configure two equal cost static route for load balancing. see example below.

ip route 0.0.0.0 0.0.0.0 XX.XX.XX.XX name ISP-1

ip route 0.0.0.0 0.0.0.0 XX.XX.XX.XX name ISP-2

However, your ISP may only allow traffic coming from the ip address they allocated for you. Any ip address from other ISP may get block.

ekhoo Tue, 12/18/2007 - 21:22

By default, static route with next hop ip address and connected to local interface have admin distace of 1 and cost/metric of 0 as you can see from the sh ip route output below.

the defaul route has two entries 10.10.10.2 and 20.20.20.2

Router#sh ip route

[deleted]

20.0.0.0/24 is subnetted, 1 subnets

C 20.20.20.0 is directly connected, GigabitEthernet0/1

10.0.0.0/24 is subnetted, 1 subnets

C 10.10.10.0 is directly connected, GigabitEthernet0/0

S* 0.0.0.0/0 [1/0] via 20.20.20.2

[1/0] via 10.10.10.2

As you can see the traffic share count is 1. this mean router is using equal cost load balance between two ISPs. .

Router#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0, candidate default path

Routing Descriptor Blocks:

20.20.20.2

Route metric is 0, traffic share count is 1

* 10.10.10.2

Route metric is 0, traffic share count is 1

sample config

!

!

!

interface GigabitEthernet0/0

ip address 10.10.10.1 255.255.255.0

duplex auto

speed auto

!

interface GigabitEthernet0/1

ip address 20.20.20.1 255.255.255.0

duplex auto

speed auto

!

!

ip classless

ip route 0.0.0.0 0.0.0.0 10.10.10.2 name ISP-1

ip route 0.0.0.0 0.0.0.0 20.20.20.2 name ISP-2

!

Router#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is 20.20.20.2 to network 0.0.0.0

20.0.0.0/24 is subnetted, 1 subnets

C 20.20.20.0 is directly connected, GigabitEthernet0/1

10.0.0.0/24 is subnetted, 1 subnets

C 10.10.10.0 is directly connected, GigabitEthernet0/0

S* 0.0.0.0/0 [1/0] via 20.20.20.2

[1/0] via 10.10.10.2

sophaunsim Wed, 12/19/2007 - 20:54

I ready to configured follow that you explance me so how can I test connections? because I don't know it is work realy or not.

Danilo Dy Wed, 12/19/2007 - 21:11

Hi,

Execute "show interface [interface-id]" in the router for both interface connecting to your two ISP.

You should see TXLOAD and RXLOAD for both.

Regards,

Dandy

Actions

This Discussion