3

Assume i have no cef enabled and there are 2 paths with the same cost ( both traffic share count = 1)

Router#show ip route 20.20.20.1
Routing entry for 20.20.20.0/24
  Known via "eigrp 10", distance 90, metric 156160, type internal
  Redistributing via eigrp 10
  Last update from 192.168.10.2 on FastEthernet0/0, 00:57:33 ago
  Routing Descriptor Blocks:
  * 192.168.20.2, from 192.168.20.2, 00:57:33 ago, via FastEthernet0/1
      Route metric is 156160, traffic share count is 1
      Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    192.168.10.2, from 192.168.10.2, 00:57:33 ago, via FastEthernet0/0
      Route metric is 156160, traffic share count is 1
      Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1

q1) if i have ip route-cache set on both my interfaces, does that means that packets to the same destination will always exit the same interface even if the 2 paths have the same traffic share count ?

q2) if i have two unequal cost paths, with difference traffic share count (e.g. 60,40) and ip route-cache on both interfaces. Does that means that if the "40 share" path is ever taken to reach a particular destination (e.g. 20.20.20.2), subsequent attempts to reach 20.20.20.2, will always take the "40 share" path ?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer. – Ron Maupin Jan 21 at 0:37
1

q1) if i have ip route-cache set on both my interfaces, does that means that packets to the same destination will always exit the same interface even if the 2 paths have the same traffic share count ?

Using ip route-cache results in per-destination load balancing.Cisco explains this in How Does Load Balancing Work?:

Per-Destination and Per-Packet Load Balancing

You can set load-balancing to work per-destination or per-packet. Per-destination load balancing means the router distributes the packets based on the destination address. Given two paths to the same network, all packets for destination1 on that network go over the first path, all packets for destination2 on that network go over the second path, and so on. This preserves packet order, with potential unequal usage of the links. If one host receives the majority of the traffic all packets use one link, which leaves bandwidth on other links unused. A larger number of destination addresses leads to more equally used links. To achieve more equally used links use IOS software to build a route-cache entry for every destination address, instead of every destination network, as is the case when only a single path exists. Therefore traffic for different hosts on the same destination network can use different paths. The downside of this approach is that for core backbone routers carrying traffic for thousands of destination hosts, memory and processing requirements for maintaining the cache become very demanding.

Per-packet load-balancing means that the router sends one packet for destination1 over the first path, the second packet for (the same) destination1 over the second path, and so on. Per-packet load balancing guarantees equal load across all links. However, there is potential that the packets may arrive out of order at the destination because differential delay may exist within the network. In Cisco IOS software, except the release 11.1CC, per packet load balancing does disable the forwarding acceleration by a route cache, because the route cache information includes the outgoing interface. For per-packet load balancing, the forwarding process determines the outgoing interface for each packet by looking up the route table and picking the least used interface. This ensures equal utilization of the links, but is a processor intensive task and impacts the overall forwarding performance. This form of per-packet load balancing is not well suited for higher speed interfaces.

Per-destination or per-packet load-balancing depends on the type of switching scheme used for IP packets. By default, on most Cisco routers, fast switching is enabled under interfaces. This is a demand caching scheme that does per-destination load-balancing. To set per-packet load-balancing, enable process switching (or disable fast switching), use these commands:

Router# config t
Router(config)# interface Ethernet 0
Router(config-if)# no ip route-cache
Router(config-if)# ^Z

Now the router CPU looks at every single packet and load balances on the number of routes in the routing table for the destination. This can crash a low-end router because the CPU must do all the processing. To re-enable fast switching, use these commands:

Router# config t
Router(config)# interface Ethernet 0
Router(config-if)# ip route-cache
Router(config-if)# ^Z

Newer switching schemes such as Cisco Express Forwarding (CEF) allow you to do per-packet and per-destination load-balancing more quickly. However, it does imply that you have the extra resources to deal with maintaining CEF entries and adjacencies.

When you work with CEF, you could ask: Who does the load balancing, CEF or the routing protocol used? The way in which CEF works is that CEF does the switching of the packet based on the routing table which is being populated by the routing protocols such as EIGRP. In short, CEF performs the load-balancing once the routing protocol table is calculated.

Per-packet load balancing can cause problems, so, in general, you should use per-destination load balancing.

q2) if i have two unequal cost paths, with difference traffic share count (e.g. 60,40) and ip route-cache on both interfaces. Does that means that if the "40 share" path is ever taken to reach a particular destination (e.g. 20.20.20.2), subsequent attempts to reach 20.20.20.2, will always take the "40 share" path ?

By default, Cisco routers use CEF. How Does Unequal Cost Path Load Balancing (Variance) Work in IGRP and EIGRP?:

Load Balancing in CEF

Cisco Express Forwarding (CEF) is an advanced Layer 3 switching technology which can be used for load balancing in routers. By default, CEF uses per-destination load balancing. If it is enabled on an interface, per-destination load balancing forwards packets based on the path to reach the destination. If two or more parallel paths exist for a destination, CEF takes the same path (single path) and avoids the parallel paths. This is a result of the default behavior of CEF. CEF takes the single path in cases when load sharing is done simultaneously on interfaces of different physical types, such as serial and tunnel. The hash algorithm determines the path to be chosen. In order to utilize all the parallel paths in CEF and load balance the traffic, you must enable per-packet load balancing when you have different physical interfaces like serial and tunnel. So, on the basis of the configuration and topology (serial or tunnel), load sharing can fail to work correctly with the default CEF load balancing mode.

Enable these commands for load sharing on a per-packet basis:

configure terminal
interface serial 0
ip load-sharing per-packet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.