cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18695
Views
25
Helpful
8
Replies

static route load balancing

ncnaveen_arasu
Level 1
Level 1

                  Hi, if we have a two static routes with default AD for the same destination wether the traffic will be load balanced or it will pick the first path.

Please guide.

Thanks in advance.

Regards,

Naveen

8 Replies 8

Raju Sekharan
Cisco Employee
Cisco Employee

it will load-balance

Thank you

Raju

Hi,

I have a query regarding load sharing. I want to use 50% usage in one link and another 50% on other link.

The scenario is I have 2 L3 switches. (SW1 and SW2)

In SW1 – int gi 1/0/1 ip – 1.1.1.1/30 which is connected to SW2 int gi1/0/1 ip -1.1.1.2/30

In SW1 – int gi 1/0/2 ip – 2.2.2.1/30 which is connected to SW2 int gi1/0/2 ip -2.2.2.2/30

For testing purpose I had configured 2 loopbacks on SW2 that is-Loopback 0 of ip- 4.4.4.4/32 and loopback 1 of ip 5.5.5.5/32.

On SW1 and SW2 I configured 2 default routes with same AD

SW1- 0.0.0.0 0.0.0.0 1.1.1.2 
0.0.0.0 0.0.0.0 2.2.2.2 
SW2- 0.0.0.0 0.0.0.0 1.1.1.1 
0.0.0.0 0.0.0.0 2.2.2.1

Now when I trying to trace route from SW1 to Loopback 0 and Loopback 1 which is configured on SW2,the output shows,

SW1#traceroute 4.4.4.4 
Type escape sequence to abort. 
Tracing the route to 4.4.4.4 
VRF info: (vrf in name/id, vrf out name/id) 
1. 1.1.1.2 0 msec

2.2.2.2 0 msec 
1.1.1.2 0 msec

SW1#traceroute 5.5.5.5 
Type escape sequence to abort. 
Tracing the route to 5.5.5.5 
VRF info: (vrf in name/id, vrf out name/id) 
1. 2.2.2.2 0 msec

1.1.1.2 0 msec 
2.2.2.2 10 msec

My question is why its showing both the routes that is in case of 4.4.4.4,firstly 1.1.1.2 and then 2.2.2.2 and again 1.1.1.2. 
Is it a loop or load balancing is happening perfectly? Or I need to configure Policy based routing ?

Regards, 
Ritu 

Not sure if you have got your answer already. But that's load balancing working perfectly.

Abzal
Level 7
Level 7

Hi,

Here simple configuration you might use:

ip route 0.0.0.0 0.0.0.0 x.x.x.x

ip route 0.0.0.0 0.0.0.0 y.y.y.y

And NAT if you connect suppose first ISP1 to f0/0 second ISP2 f0/1, example:

access-list 10 permit 192.168.0.0 0.0.0.255

route-map ISP2 permit 10
match ip address 10
match interface FastEthernet0/0

route-map ISP1 permit 10
match ip address 10
match interface FastEthernet0/1

ip nat inside source route-map ISP1 interface FastEthernet0/0 overload
ip nat inside source route-map ISP2 interface FastEthernet0/1 overload

https://supportforums.cisco.com/docs/DOC-8353

https://supportforums.cisco.com/docs/DOC-8313

Hope it will help.

Best regards,
Abzal

Hi,

I have a query regarding load sharing. I want to use 50% usage in one link and another 50% on other link.

The scenario is I have 2 L3 switches. (SW1 and SW2)

In SW1 – int gi 1/0/1 ip – 1.1.1.1/30 which is connected to SW2 int gi1/0/1 ip -1.1.1.2/30

In SW1 – int gi 1/0/2 ip – 2.2.2.1/30 which is connected to SW2 int gi1/0/2 ip -2.2.2.2/30

For testing purpose I had configured 2 loopbacks on SW2 that is-Loopback 0 of ip- 4.4.4.4/32 and loopback 1 of ip 5.5.5.5/32.

On SW1 and SW2 I configured 2 default routes with same AD

SW1- 0.0.0.0 0.0.0.0 1.1.1.2 
0.0.0.0 0.0.0.0 2.2.2.2 
SW2- 0.0.0.0 0.0.0.0 1.1.1.1 
0.0.0.0 0.0.0.0 2.2.2.1

Now when I trying to trace route from SW1 to Loopback 0 and Loopback 1 which is configured on SW2,the output shows,

SW1#traceroute 4.4.4.4 
Type escape sequence to abort. 
Tracing the route to 4.4.4.4 
VRF info: (vrf in name/id, vrf out name/id) 
1. 1.1.1.2 0 msec

2.2.2.2 0 msec 
1.1.1.2 0 msec

SW1#traceroute 5.5.5.5 
Type escape sequence to abort. 
Tracing the route to 5.5.5.5 
VRF info: (vrf in name/id, vrf out name/id) 
1. 2.2.2.2 0 msec

1.1.1.2 0 msec 
2.2.2.2 10 msec

My question is why its showing both the routes that is in case of 4.4.4.4,firstly 1.1.1.2 and then 2.2.2.2 and again 1.1.1.2. 
Is it a loop or load balancing is happening perfectly? Or I need to configure Policy based routing ?

Regards, 
Ritu 

MUKUL JOSHI
Level 1
Level 1

Hi Naveen,

With default AD it will load balance...You can verify it by doing a traceroute from source to destination.

HTH

MJ

Hi Mukul,

I have a query regarding load sharing. I want to use 50% usage in one link and another 50% on other link.

The scenario is I have 2 L3 switches. (SW1 and SW2)

In SW1 – int gi 1/0/1 ip – 1.1.1.1/30 which is connected to SW2 int gi1/0/1 ip -1.1.1.2/30

In SW1 – int gi 1/0/2 ip – 2.2.2.1/30 which is connected to SW2 int gi1/0/2 ip -2.2.2.2/30

For testing purpose I had configured 2 loopbacks on SW2 that is-Loopback 0 of ip- 4.4.4.4/32 and loopback 1 of ip 5.5.5.5/32.

On SW1 and SW2 I configured 2 default routes with same AD

SW1- 0.0.0.0 0.0.0.0 1.1.1.2 
0.0.0.0 0.0.0.0 2.2.2.2 
SW2- 0.0.0.0 0.0.0.0 1.1.1.1 
0.0.0.0 0.0.0.0 2.2.2.1

Now when I trying to trace route from SW1 to Loopback 0 and Loopback 1 which is configured on SW2,the output shows,

SW1#traceroute 4.4.4.4 
Type escape sequence to abort. 
Tracing the route to 4.4.4.4 
VRF info: (vrf in name/id, vrf out name/id) 
1. 1.1.1.2 0 msec

2.2.2.2 0 msec 
1.1.1.2 0 msec

SW1#traceroute 5.5.5.5 
Type escape sequence to abort. 
Tracing the route to 5.5.5.5 
VRF info: (vrf in name/id, vrf out name/id) 
1. 2.2.2.2 0 msec

1.1.1.2 0 msec 
2.2.2.2 10 msec

My question is why its showing both the routes that is in case of 4.4.4.4,firstly 1.1.1.2 and then 2.2.2.2 and again 1.1.1.2. 
Is it a loop or load balancing is happening perfectly? Or I need to configure Policy based routing ?

Regards, 
Ritu 

cadet alain
VIP Alumni
VIP Alumni

Hi Naveen,

Both routes will get installed in the routing table( provided these are  for the same prefix) but it will be the switching process that will do the load-sharing and default is CEF which load-shares per session( src-dst IP pair).

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Review Cisco Networking products for a $25 gift card