cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
629
Views
0
Helpful
5
Replies

Load balancing across two equal-cost paths

limtohsoon
Level 1
Level 1

Hi Sir,

I have a router with two serial interfaces. Say, to reach Network_A, it points to both serial interfaces. Thus, it has two equal-cost paths to Network_A.

If a packet comes in from its Ethernet interface and wants to go to Network_A, the router will either load-balance on per-packet basis (i.e. process-switched) or on per-destination basis (i.e. fast-switched) over the two serial links, depending on the interface config command "[no] ip route-cache". My problem is, I'm not sure on which interface to configure this command? On the serial interfaces or on the Ethernet interface?

Please advise.

Thank you.

B.Rgds,

Lim TS

5 Replies 5

liviu.gheorghe
Spotlight
Spotlight

The "no ip route-cache" is configured on the outgoing interface, serial interfaces in your case.

Take care that this configuration is processor intensive (of course depending on the bandwidth you have on the serial lines).

As an alternative, you could enable CEF, which performs per packet per-destination load balancing by default.

Regards, LG
*** Please Rate All Helpful Responses ***

Hi Liviu,

Say, I'd like to perform per-destination load-balancing (i.e. I've got to enable fast-switching). So, I'll configure the command "ip route-cache" on both serial interfaces. When the router receives packets destined for Network_A, it will load-balance on per-destination basis over the two serial links. Right, so far?

Say, there's misconfiguration. One serial interface is configured with "ip route-cache" and the other is configured with "no ip route-cache". In this case, what type of load-balancing will occur when packets are destined for Network_A?

Please advise.

Thank you.

B.Rgds,

Lim TS

Hi Lim,

In this case there will not be an equal distribution of packets. The router will try to forward the packets with the best-effort to load-balance both the links. It will be the same kindaa scenarion as if both the links are configured for " per-destination " based. As far as the destination is same the router will choose the link configured for the oer-destination load-balancing and if the destination is diffrent it will forward it to the other link.

HTH,

-amit singh

ankurbhasin
Level 9
Level 9

johansens
Level 4
Level 4

The "ip route-cache"-command refers to enabling a fast path for the IP-packets. The fast path decision is done on the network ingress.

If no cache-entry is present, the packet will be bumped to process-switching and the cache-entry will be written as the packet is switched for the subsequent packets to be fast-switched. All packets for this destination will follow the exact same path until the cache-entry is flushed (which will happen periodically).

ie. If you want traffic entering your Ethernet0 to be load-balanced over two serial-links, you should enter the "ip route-cache" on the Ethernet0 interface.

If you enter the "ip route-cache" on the serial interfaces, the return-traffic and traffic initiated from the serial-links will enter the fast path when entering the router as well.

Fast path switching is fast (as implied with the name), process-switching is slow.

If you configure "ip route-cache" only on one of the serial-links, this will have no consequence on the traffic which sent out on this link, but it will have a performance impact as return-traffic on one of the links will have to be process-switched all the time.

When you use CEF-switching, things are mostly the same, but you configure specifically "per-packet" on the outgoing interfaces... and you if you don't configure on all interface which has a route to the destination, the entire path will remain per-destination. One great change from the older switching-path is that the CEF-cache is built without any packets needing to be process-switched, ie even the first packet is CEF-switched.

If you configure "ip cef" on the router, all supported interfaces will automatically be CEF-switched (unless you specifically disable route-cache on them).

See these links for more information:

Tracing a Packet From Network Ingress to Egress, or "The Life of a Packet"

http://www.cisco.com/en/US/tech/tk364/technologies_tech_note09186a0080093fdc.shtml

How to Choose the Best Router Switching Path for Your Network

http://www.cisco.com/en/US/tech/tk827/tk831/technologies_white_paper09186a00800a62d9.shtml

How does load balancing work?

http://www.ciscotaccc.com/iprout/showcase?case=K21405617

How to configure load balancing with CEF

http://www.ciscotaccc.com/iprout/showcase?case=K20236117

Review Cisco Networking products for a $25 gift card