Per-Destination and Per-Packet Load Balancing
Posted by Aragoen Celtdra on 20th July 2008
In the BSCI Authorized Self Study Guide book, I came across some statements on the EIGRP load-balancing section that says:
When a packet is process-switched, load balancing over equal-cost paths occurs on a per-packet basis.
When packets are fast-switched, load balancing over equal-cost paths is on a per-destination basis. (Teare & Paquet, p.101)
It was a bit challenging for me to comprehend what that meant, firstly, because I wasn’t sure what process-switched and fast-switched meant. And secondly, I wasn’t sure how per-packet and per-destination load balancing worked.
So I posted a question on the techexams.net message board and some of the replies lead me to a satisfactory link that helped shed some light to these concepts.
Find the link for the quoted passages below at the bottom of the page:
Process Switching. With this switching method, incoming packets are copied to the router’s buffers, associated with a destination network according to a routing table entry, encapsulated, and then forwarded out the appropriate interface. The router’s CPU processes every packet in process switching.
Fast Switching. Fast switching handles the first packet in a stream just like process switching, but then creates a fast switching cache against which following packets are compared. Subsequent packets in the same stream have their incoming frame header stripped off and compared to the first packet. When a match is found, the header appended to the first frame is appended to subsequent frames prior to forwarding. This method helps to eliminate the need for routing table lookups for each packet in the same stream, increasing router throughput. Fast switching is the default method on lower-end Cisco routers.
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)# ^ZNow 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
Sources:
Posted in Uncategorized | No Comments » |
