cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
606
Views
4
Helpful
7
Replies

Load balancing with ip cef

eash
Level 1
Level 1

Dear All,

We two offices connected by 100 Mbps ethernet link. recently we added one more 100 Mbps ethernet link for load sharing and reducancy. I planned to configure ip cef on the both the routers, ip load-sharing per-packet on interface with proper static routes on both the routers. Please let me know if my approch is correct.

One more thing I have configured one loopback interface on both the routers. if these interface are configured with the ip address 10.10.10.1 with mask 255.255.255.255 one of the routers and 10.10.10.2 with mask 255.255.255.255 on the other router then loopback interface are pingable. If I change the subnet mask  to any other subnet mask then these loopback interface are not pingable even if there are proper static routes.  ehat could be reason.

Regards,

Eash

 

 

7 Replies 7

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Generally, you want to avoid packet-per-packet load balancing.

thanks Richard and Joseph for your thoughts,

Yes Richard you with static route with mask 255.255.255.255 is pingable and when I configure loopback interface with some shorter subnet mask it is not pingable.


the network diagram is a below,


           r2======r1    = 
           |       |
    |    |
    l3    l3

Let me explain the scenario

We have two L3 switches connected to each other by one 100 Mbps ethernet link. When the connected link goes down we manaul connect the other 100 Mbps ethernet link.

In this scenario to provide failover and load sharing we are planning to introduce two routers.we dont not want to change the LAN gateway of the users as right now it is the L3 switch IP address.

I Plan to configure the L3 switch IP address at location R2 as the LAN ip address of R1 and viceversa with static routes on the respective network. My question I am correct will it work or would the router consider these LAN IP's to be locally connected and would not forward to the other router.


Thanks for you guidance I will go with per session/per destination load sharing.

Eash

 

I do not have a clear understanding of your current environment and of how you plan to change it. But I think that I do understand that there is a concern to not change the gateway address configured on user PCs. I wonder if configuring HSRP would provide a solution for that concern.

 

HTH

 

Rick

HTH

Rick

Sorry Richard for confusing..


Let me explain the scenario

We have two L3 switches connected to each other by one 100 Mbps ethernet link. When the connected link goes down we manual connect the other 100 Mbps ethernet link.

In this scenario to provide failover and load sharing we are planning to introduce two routers.

Our only requirement is that the LAN users at both ends must communicate.

Please suggest any easy method

Regards,

Eash

Eash

 

So you have two L3 switches where users connect and the switches are connected by two 100 Mbps Ethernet which you currently use only one at a time.  I am not sure what adding two routers would provide that you could not do on the L3 switches.

 

Can you tell us more about the L3 switches? Is there a VLAN on one switch and a different VLAN on the other switch? Or is there a single VLAN that is on both switches? What subnet are the users on the first switch in? And what subnet are the users on the second switch in?

 

And what can you tell us about the connection between switches? Is this configured as routed ports in the switch? Or as a separate VLAN connecting the switches? Or as VLAN interfaces within a single VLAN on both switches? What subnet  are the Ethernet connections in?

 

HTH

 

Rick

HTH

Rick

Richard Burts
Hall of Fame
Hall of Fame

Eash

 

Let us start with the easier part of your question which is about the loopbacks. The important thing here is the preference of the router for locally connected as compared to remotely connected addresses. I would guess that if you were to configure the loopbacks with mask of 255.255.255.254 that the loopbacks would still be pingable. But with any other mask the addresses of 10.10.10.1 and 10.10.10.2 become members of the same subnet. So the router that is configured with 10.10.10.1 would consider 10.10.10.2 to be locally connected and would not forward to the other router.

 

Having said that perhaps we should take a closer look at what you consider to be a proper static route. If you were to configure a static route like this

ip route 10.10.10.2 255.255.255.255 x.x.x.x  where x.x.x.x is the next hop address of the peer

I would expect that 10.10.10.2 should still be pingable since in making routing decisions IOS will choose the longest match. So a static route with mask 255.255.255.255 would be chosen rather than the connected subnet with some shorter mask.

 

The question about load sharing is a bit more complex. The idea of per packet load sharing is attractive in the prospect of equalizing the utilization of the links. But there are a couple of things that you should consider before you decide to adopt this plan.

First consider that even with per packet load sharing the load on the links may not be equal.  Consider an example in which you have 6 packets to forward. Each link will send 3 packets (sounds equal so far). But what if the 3 packets on the first link were each 100 bytes while the 3 packets on the second link were each 1500 bytes. Now the first link has carried 300 bytes while the second link has carried 4500 bytes (how equal is that?).

Second consider that using per packet forwarding introduces the possibility (and I would say it is very likely) that packets will be delivered out of order. For some applications it may not matter. But there are quite a few applications in which out of order packets are a problem.

 

My advice is that the possible benefits of per packet load sharing are generally not worth the risk that some applications will perform worse when you do per packet load share. So my advice is to stay with the per session/per destination load sharing.

 

HTH

 

Rick

HTH

Rick

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Oh, I just want to add, that even TCP, which was designed to deal with packets delivered out of sequence can perform (much) worst when you cause packets to arrive out of sequence.  This because, many TCP stacks assume packets will arrive mostly in sequence and assume packets have been lost when more than a couple arrive out of sequence.

If you were only doing CEF per-packet on two links, and it was a single flow with all packets the same size, typical TCP stacks wouldn't have a performance issue, but (as described by Rick) different sized packets can allow smaller packets to arrive sooner.

Review Cisco Networking for a $25 gift card