THE SCHOOL OF CISCO NETWORKING (SCN): CISCO - LOAD BALANCING:
Contact No:   ### / ###/ ###
Welcome To The IT Knowledge Base Sharing Freeway "Study With The Zero Fees / Zero Money" Web - If We Believe, That If We Have Knowledge, Let Others Light Their Candles With It. - Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Ones Please. "Student Expectations And Satisfaction Is Always Our Highest Priority")

'Love All, Serve All, Help Ever Hurt Never'

Please Welcome To The "Zero Fees And Zero Money SCN Community Study Page"

We Like To Share Our Stuff With Everyone And Hope You Will Find Something Useful Here. Enjoy Our Collection And Come Back Again And Again, We'll Do Our Best To Make It Always Interesting For You. All Our Stuff Always Available May Be 100% Totally Freely. Use Only For Non-Commercial Purposes Only!

THE SCHOOL OF CISCO NETWORKING (SCN) Is A IT Support Community – Based, Non - Profit Volunteer Organizations, Offering Our Assistance And Support To Developmental Our Services Dedicated To All.

Because Large Section Of Our Students In This World, Especially In Villages, Who Are Under Privileged Expecting For Equal Opportunity In Terms Of Money And Education. We Feel The Sufferings Of Talented Students Losing Their Opportunity To Shine Because Of Their Poor Financial Status. So We Thought That Professional Education Will Be Providing Them Freely.

Our Web Site Is To Give An Easy Way To Understand Each And Every Student Who Are Going To Start CISCO Lab Practice Without Any Doubts And Our ARTICLES STUFF Are Always 100% Totally Free For Everyone, Which Is Belongings To THE SCHOOL OF CISCO NETWORKING (SCN).

Also This Guide Provides Technical Guidance Intended To Help All Network Students, Network Administrators And Security Officers Improve Of Their Demonstrated Ability To Achieve Specific objectives Within Set Timeframes.

Hands - On Experience Is An Invaluable Part Of Preparing For The Lab Exam And Never Pass Up An Opportunity To Configure Or Troubleshoot A Router ( If You Have Access To Lab Facilities, Take Full Advantage Of Them) There Is No Replacement For The Experience You Can Gain From Working In A Lab, Where You Can Configure Whatever You Want To Configure And Introduce Whatever Problems You Want To Introduce, Without Risk Of Disrupting A Production Network.

For Better View Of Our Web Page - Please Use Any Latest Web Browser, Such As (Mozilla Firefox, Google Chrome, Opera, Safari, Internet Explorer, Torch, Maxthon, Sea Monkey, Avant Browser, Deepnet Explorer, And Etc ), Because Some Elements Or Scripts Are Not Work In The Old Web Browser (It Might Not Be Displayed Properly Or Are Not Appearing properly!). Thank You For Your Time And Best Of Luck!

Your Sincerely – Premakumar Thevathasan.
"Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Once Please,Thank You."

CISCO - LOAD BALANCING:

LOAD-SHARING And LOAD-BALANCING Is One Of The Most Misunderstood Topics In Networks.

  • LOAD BALANCING IS : The Ability To Split The Load Toward The Same Destination (Host Or IP) Over Multiple Paths (Load-Balancing Will Split The Traffic Sent, In A Equal Fashion Using Multiple Paths To A Destination When Forwarding Packets).

    NOTE: When Packets Are Process-Switched, Load Balancing Occurs On A Per-Packet Basis. When Packets Are Fast-Switched, Load Balancing Occurs On A Per-Destination Basis.

    Load Balancing Is Performed Only On Traffic That Passes through A Router, Not Traffic That Originated By The Router.

  • LOAD SHARING IS : The Ability To Distribute Outgoing Traffic (Or Influence The Flow Of Incoming Traffic) Over Multiple Paths.


    LOAD BALANCE Vs LOAD SHARING


    WHAT IS LOAD BALANCE?


    Load Balancing Is A Mechanism That Helps To Make Networks More Efficient. It Distributes The Processing Of Traffic Evenly Across A Network With Multiple-Paths, In Order To Get Optimal Resource Utilization, Maximize Throughput, And Minimize Response Time.

    Load Balancing Is The Practice Of Distributing Traffic Among Multiple Paths To The Same Destination, So As To Use Bandwidth Efficiently. It Is Based On A Combination Of Source And Destination Packet Information; It Allows You To Optimize Resources By Distributing Traffic Over Multiple Paths For Transferring Data To A Destination. You Configure Load Balancing On Outbound Interfaces On A Per-Destination Or Per-Packet Basis.

    You Can Configure Load Balancing On A Per-Destination Or Per-Packet Basis. Because Load-Balancing Decisions Are Made On The Outbound Interface, Load Balancing Must Be Configured On The Outbound Interface.

    WHAT IS LOAD SHARING?


    Load-Sharing Is More Realistic And Technically More Correct, In That One Always Shares Traffic Across Multiple Paths, Even If In A Unequal Fashion.

    Load Sharing Means One Can Split The Traffic From A Network To Be Transported By Different (Path) Routers. Load Sharing Allows A Router To Distribute The Outgoing And Incoming Traffic Among Multiple Paths.

    The Paths Are Derived Either Statically Or With Dynamic Protocols, Such As:

  • Routing Information Protocol (RIP)
  • Enhanced Interior Gateway Routing Protocol (EIGRP)
  • Open Shortest Path First (OSPF) Protocol.
  • Interior Gateway Routing Protocol (IGRP).

    Four Entries Is The Default In IOS For Most IP Routing Protocols With The Exception Of Border Gateway Protocol (BGP), Where One Entry Is The Default (By Default, Border Gateway Protocol (BGP) Selects Only A Single Best Path And Does Not Perform Load Balancing).

    NOTE :Load Sharing Allows Routers To Take Advantage Of Multiple Paths To The Same Destination By Sending Packets Over All The Available Routes.

    LOAD SHARING CAN BE :

  • Equal Cost

  • Or Unequal Cost, Where Cost Is A Generic Term Referring To Whatever Metric (If Any) Is Associated With The Route:

  • EQUAL-COST LOAD SHARING : Distributes Traffic Equally Among Multiple Paths With Equal Metrics. In This Case, Load Sharing Can Also Be Called Load Balancing.

  • UNEQUAL-COST LOAD SHARING : Distributes Packets Among Multiple Paths With Different Metrics. The Traffic Is Distributed In Inverse Proportion To The Cost Of The Routes. That Is, Paths With Lower Costs Are Assigned More Traffic, And Paths With Higher Costs Are Assigned Less Traffic.

    Some Routing Protocols Support Both Equal-Cost And Unequal-Cost Load Sharing, Whereas Others Support Only Equal Cost. Static Routes, Which Have No Metric, Support Only Equal-Cost Load Sharing.


    LOAD SHARING IN CISCO EXPRESS FORWARDING


    LOAD SHARING AND CISCO EXPRESS FORWARDING :


    PER DESTINATION LOAD SHARING: Distributes The Load According To Destination Address. Given Two Paths To The Same Network, All Packets For One Destination May Travel Over The First Path,

    All Packets For A Second Destination On The Same Network May Travel Over The Second Path,

    All Packets For A Third Destination May Again Be Sent Over The First Path, And So On. This Is The Default Type Of Load Sharing Used By Cisco Express Forwarding (CEF).

    On Most Platforms, CEF Is The Default Switching Mode For Ipv4, But Not Ipv6.

    CEF Is A Very Efficient Switching Process. Its Forwarding Information Is Obtained And Stored In Tables Before Any Packet Needs To Use The Information. CEF Builds A Forwarding Information Base (FIB) With Information Obtained From The Route Table. All The Destination Networks Entered In The Route Table Are Entered Into The CEF FIB. If The Route Table Is Stable And Not Changing, The FIB Will Not Change.

    CEF Uses A Separate Table, The Adjacency Table, To Maintain Layer 2 Forwarding Information For Each Entry In The FIB. The Adjacency Table Is Created As Layer 2 Information Is Learned, Through IP ARP Or Ipv6 Neighbor Discovery, For Instance. Both The FIB And Adjacency Table Are Created Before Packets Need To Be Forwarded. Not Even The First Packet To A Destination Is Process Switched, As Is The Case With Other Switching Schemes.

  • CEF Performs Per-Destination Load Sharing By Default. This Is Actually Per Source-Destination Pair Load Sharing. All Traffic That Has A Particular Source Address And Is Destined To A Specific Destination Address Will Exit The Same Interface. Traffic With A Different Source/Destination Address Pair May Exit The Next Interface.

  • Per Packet Load Sharing Is Another Method Available To CEF Switched Ipv4 Packets. Ipv6 CEF Only Supports Per Destination Load Sharing.

    PER PACKET LOAD SHARING MEANS: That One Packet Is Sent Over One Link, The Next Packet Is Sent Over The Next Link, Even If This Next Packet Is To The Same Destination As The First, And So On, Given Equal-Cost Paths.

    If The Paths Are Unequal Cost, The Load Sharing May Be One Packet Over The Higher-Cost Link For Every Three Packets Over The Lower-Cost Link, Or Some Other Proportion Depending Upon The Ratio Of Costs. Per Packet Load Sharing May Distribute The Load More Evenly Than Per Destination Load Sharing, Depending Upon The Number Of Different Source-Destination Pairs, But Because The Packets To A Given Destination Will Be Taking Different Paths, The Packets Are Likely To Arrive Out Of Order, Which Is Unacceptable For Some Applications, Such As Voice Over IP.

    To Determine If CEF Is Enabled Globally On A Router, Use The Commands Show IP CEF And Show Ipv6 CEF. If It Is Not Enabled By Default, You Can Turn It On Globally Using The Command IP CEF For Ipv4. To Enable CEF For Ipv6, First Enable CEF For Ipv4, Then Use The Command Ipv6 CEF.

    Per Packet Load Sharing Is Enabled For Ipv4 Using The Interface Command Ip Load-Sharing Per-Packet. The Command IP Load-Sharing Per-Destination Re-Enables Per Destination Load Sharing. You Can See Which Type Of Load Sharing Is Enabled Using The Show Cef Interface Command. This Displays The CEF Information That Is Configured On The Interface.

    The Router Determines Whether To Use CEF Switching Based On The Ingress Interface And The Type Of Source And Destination Address. The Ingress Interface Must Be Configured With CEF Switching For The Router To Even Consider Using CEF. If CEF Is Configured On The Ingress Interface, CEF Will Attempt To Switch The Packet. If For Some Reason The Packet Cannot Be CEF Switched, CEF Punts The Packet Down To The Next-Best And Available Switching Method. For Ipv4, This Would Be Fast Switching, If It Is Enabled On The Interface. For Ipv6, This Would Be Process Switching.

    You Can Verify That CEF Is Enabled On An Interface Using The Commands "Show Cef Interface {Interface}" And "Show Ipv6 Cef {Interface} Detail".


    PER DESTINATION LOAD SHARING IN FAST SWITCHING


    PER DESTINATION LOAD SHARING AND FAST SWITCHING :


    IOS Performs Per Destination Load Sharing On Exit Interfaces Configured With Fast Switching. Fast Switching Is The Default IOS Switching Mode In Some Routers.

    FAST SWITCHING WORKS AS FOLLOWS :


    1. When A Router Switches The First Packet To A Particular Destination, A Route Table Lookup Is Performed And An Exit Interface Is Selected.

    2. The Necessary Data-Link Information To Frame The Packet For The Selected Interface Is Then Retrieved (From The ARP Cache, For Instance), And The Packet Is Encapsulated And Transmitted.

    3. The Retrieved Route And Data-Link Information Is Then Entered Into A Fast Switching Cache.

    4. As Subsequent Packets To The Same Destination Enter The Router, The Information In The Fast Cache Allows The Router To Immediately Switch The Packet Without Performing Another Route Table And ARP Cache Lookup.

    While Switching Time And Processor Utilization Are Decreased, Fast Switching Means That All Packets To A Specific Destination, Not Source-Destination Pair, Are Routed Out The Same Interface. When Packets Addressed To A Different Host On The Same Network Enter The Router And An Alternate Route Exists, The Router May Send All Packets For That Destination On The Alternate Route. Therefore, The Best The Router Can Do Is Balance Traffic On A Per Destination Basis.


    PER PACKET LOAD SHARING IN PROCESS SWITCHING


    PER PACKET LOAD SHARING AND PROCESS SWITCHING :


    Process Switching Simply Means That For Every Packet, The Router Performs A Route Table Lookup, Selects An Interface, And Then Looks Up The Data Link Information. Because Each Routing Decision Is Independent For Each Packet, All Packets To The Same Destination Are Not Forced To Use The Same Interface. To Enable Process Switching On An Interface, Use The Command No Ip Route-Cache For Ipv4. You Don't Have To Do Anything To Enable Process Switching For Ipv6. It Is Enabled By Default.

    NOTE : That The Command Debug Ip Packet Allows Only Process Switched Packets To Be Observed. Fast Switched Packets Are Not Displayed.

    The "Debug IP Packet" Command Displays Only Process Switched Packets.

    IOS Will Switch A Packet Using CEF Only If CEF Is Enabled On The Inbound Interface. If CEF Is Not Configured On The Inbound Interface, The Configuration Of The Exit Interface Determines The Switching Method. Notice That When Process Or Fast-Switching Is Configured Inbound And CEF Is Configured On The Outbound Interface, Fast-Switching Is Used. CEF Is Only Used If It Is Configured On The Ingress Interface. For Ipv4, Fast-Switching Is Enabled Outbound, Even If CEF Is Enabled On The Interface.


    ETHERCHANNEL LOAD BALANCING


    UNDERSTANDING ETHERCHANNEL LOAD BALANCING :


    Fast Etherchannel Allows Multiple Physical Fast Ethernet Links To Combine Into One Logical Channel. Etherchannel Is A Port Link Aggregation Technology Or Port-Channel Architecture Used Primarily On Cisco Switches. It Allows Grouping Of Several Physical Ethernet Links To Create One Logical Ethernet Link For The Purpose Of Providing Fault-Tolerance And High-Speed Links Between Switches, Routers And Servers. An Etherchannel Can Be Created From Between Two And Eight Active Fast, Gigabit Or 10-Gigabit Ethernet Ports, With An Additional One To Eight Inactive Failover) Ports Which Become Active As The Other Active Ports Fail. Etherchannel Is Primarily Used In The Backbone Network, But Can Also Be Used To Connect End User Machines.

    This Allows Load Sharing Of Traffic Among The Links In The Channel As Well As Redundancy In The Event That One Or More Links In The Channel Fail. Fast Etherchannel Can Be Used To Interconnect Lan Switches, Routers, Servers, And Clients Via Unshielded Twisted Pair (UTP) Wiring Or Single-Mode And Multimode Fiber.

    Also Etherchannel Provides Load-Balancing Only Per Frame, Not Per Bit.
    A Switch Decides Which Member Link A Frame Will Traverse By The Outcome Of A Hash Function Performed Against One Or More Fields Of Each Frame. Which Fields Are Considered Is Dependent On The Switch Platform And Configuration.

    NOTE :Etherchannel Technology Was Invented By Kalpana In The Early 1990s. They Were Later Acquired By Cisco Systems In 1994. In 2000 The IEEE Passed 802.3ad Which Is An Open Standard Version Of Etherchannel.

    BENEFITS OF ETHERCHANNEL :


    Using An Etherchannel Has Numerous Advantages : And Probably The Most Desirable Aspect Is The Bandwidth. Using The Maximum Of 8 Active Ports A Total Bandwidth Of 800 Mbit/S, 8 Gbit/S Or 80 Gbit/S Is Possible Depending On Port Speed. This Assumes There Is A Traffic Mixture, As Those Speeds Do Not Apply To A Single Application Only. It Can Be Used With Ethernet Running On Twisted Pair Wiring, Single-Mode And Multimode Fiber.

    Because Etherchannel Takes Advantage Of Existing Wiring It Makes It Very Scalable. It Can Be Used At All Levels Of The Network To Create Higher Bandwidth Links As The Traffic Needs Of The Network Increase. All Cisco Switches Have The Ability To Support Etherchannel.

    When An Etherchannel Is Configured All Adapters That Are Part Of The Channel Share The Same Layer 2 (MAC) Address. This Makes The Etherchannel Transparent To Network Applications And Users Because They Only See The One Logical Connection; They Have No Knowledge Of The Individual Links.

    Etherchannel Aggregates The Traffic Across All The Available Active Ports In The Channel. The Port Is Selected Using A Cisco-Proprietary Hash Algorithm, Based On Source Or Destination MAC Addresses, IP Addresses Or TCP And UDP Port Numbers.

    For More Info - > Cisco – Etherchannel:




    CISCO LOAD BALANCING


    INTRODUCTION OF LOAD BALANCING :


    Load Balancing Is A Standard Functionality Of The Cisco IOS® Router Software, And Is Available Across All Router Platforms. It Is Inherent To The Forwarding Process In The Router And Is Automatically Activated If The Routing Table Has Multiple Paths To A Destination.

    It Is Based On Standard Routing Protocols, Such As Routing Information Protocol (RIP), RIPv2, Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), And Interior Gateway Routing Protocol (IGRP), Or Derived From Statically Configured Routes And Packet Forwarding Mechanisms. It Allows A Router To Use Multiple Paths To A Destination When Forwarding Packets.

  • OSPF Will Do Equal Cost Lad Balancing By Default So If You Want To Load Balance Between Two Links, Simply Make There Cost Equal. Use Ip OSPF Cost Command In Interface Mode.

  • The IGRP And EIGRP Routing Processes Also Support Unequal Cost Load-Balancing. You Can Use The Variance Command With IGRP And EIGRP To Accomplish Unequal Cost Load-Balancing.

  • The Terminology Stems From The World Of Link-State Routing Protocols, Which Facilitate A Cost-Based Metric; OSPF And Intermediate System-To-Intermediate System (IS-IS) Explicitly Allow ECMP Routing. Load Balancing Can Be Carried Out Based On Equal Cost Or Unequal Cost, Per Packet Or Per Destination.

    Because Of The Absence Of A Metric (Weight), Static Routes Under Cisco IOS Software Support Only Equal-Cost Load Sharing.

    NOTE :To Disable Destination-Based Fast Switching, You Can Force Cisco IOS Software To Process Switch On A Per-Packet Basis With The Interface Command No Ip Route-Cache. However, This Does Not Affect CEF. Use Ip Load-Sharing Per-Packet In That Case.


    HOW DOES LOAD BALANCING WORK


    HOW DOES LOAD BALANCING WORK?


    When A Router Learns Multiple Routes To A Specific Network Via Multiple Routing Processes (Or Routing Protocols, Such As RIP, Ripv2, IGRP, EIGRP, And OSPF), It Installs The Route With The Lowest Administrative Distance In The Routing Table.

    Sometimes The Router Must Select A Route From Among Many Learned Via The Same Routing Process With The Same Administrative Distance. In This Case, The Router Chooses The Path With The Lowest Cost (Or Metric) To The Destination. Each Routing Process Calculates Its Cost Differently And The Costs May Need To Be Manipulated In Order To Achieve Load-Balancing.

    If The Router Receives And Installs Multiple Paths With The Same Administrative Distance And Cost To A Destination, Load-Balancing Can Occur. The Number Of Paths Used Is Limited By The Number Of Entries The Routing Protocol Puts In The Routing Table.

    The IGRP And EIGRP Routing Processes Also Support Unequal Cost Load-Balancing. You Can Use The Variance Command With IGRP And EIGRP To Accomplish Unequal Cost Load-Balancing.

    Issue The Maximum-Paths Command In Order To Determine The Number Of Routes That Can Be Installed Based On The Value Configured For The Protocol. If You Set The Routing Table To One Entry, It Disables Load Balancing. Refer To How Does Unequal Cost Path Load-Balancing (Variance) Work In IGRP And EIGRP? For More Information About Variance. You Can Usually Use The Show IP Route Command To Find Equal Cost Routes. The Show IP Route Command Output To A Particular Subnet That Has Multiple Routes. Notice There Are Two Routing Descriptor Blocks. Each Block Is One Route. There Is Also An Asterisk (*) Next To One Of The Block Entries. This Corresponds To The Active Route That Is Used For New Traffic. The Term 'New Traffic' Corresponds To A Single Packet Or An Entire Flow To A Destination, Depending On The Type Of Switching Configured.

    NOTE:

    FOR PROCESS-SWITCHING: Load Balancing Is On A Per-Packet Basis And The Asterisk (*) Points To The Interface Over Which The Next Packet Is Sent.

    FOR FAST-SWITCHING: Load Balancing Is On A Per-Destination Basis And The Asterisk (*) Points To The Interface Over Which The Next Destination-Based Flow Is Sent.


    TYPE OF LOAD BALANCING WORK


    PER-PACKET AND PER-DESTINATION LOAD BALANCING :


    There Are Two Types Of Load Balancing :

  • Per-Destination Load Balancing.

  • And Per-Packet Load Balancing.

    You Can Configure Load Balancing On A Per-Destination Or Per-Packet Basis. Because Load-Balancing Decisions Are Made On The Outbound Interface, Load Balancing Must Be Configured On The Outbound Interface.

  • 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


    PER-DESTINATION LOAD BALANCING


    PER-DESTINATION LOAD BALANCING :


    Per-Destination Load Balancing Allows The Router To Use Multiple Paths To Achieve Load Sharing Across Multiple Source-Destination Host Pairs. Packets For A Given Source-Destination Host Pair Are Guaranteed To Take The Same Path, Even If Multiple Paths Are Available. Traffic Streams Destined For Different Pairs Tend To Take Different Paths.

    Per-Destination Load Balancing Is Enabled By Default When You Enable Cisco Express Forwarding. To Use Per-Destination Load Balancing, You Do Not Perform Any Additional Tasks Once Cisco Express Forwarding Is Enabled. Per-Destination Is The Load-Balancing Method Of Choice For Most Situations.

    Because Per-Destination Load Balancing Depends On The Statistical Distribution Of Traffic, Load Sharing Becomes More Effective As The Number Of Source-Destination Host Pairs Increases.

    You Can Use Per-Destination Load Balancing To Ensure That Packets For A Given Host Pair Arrive In Order. All Packets Intended For A Certain Host Pair Are Routed Over The Same Link (Or Links).

    PER-DESTINATION LOAD BALANCES 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-DESTINATION LOAD BALANCING Is Enabled By Default When You Enable Cisco Express Forwarding. To Use Per-Destination Load Balancing, You Do Not Perform Any Additional Tasks Once Cisco Express Forwarding Is Enabled. Per-Destination Is The Load-Balancing Method Of Choice For Most Situations.

    Because Per-Destination Load Balancing Depends On The Statistical Distribution Of Traffic, Load Sharing Becomes More Effective As The Number Of Source-Destination Host Pairs Increases. You Can Use Per-Destination Load Balancing To Ensure That Packets For A Given Host Pair Arrive In Order. All Packets Intended For A Certain Host Pair Are Routed Over The Same Link (Or Links). Typically, You Disable Per-Destination Load Balancing When You Want To Enable Per-Packet Load Balancing. Per-Packet Load Balancing For Cisco Express Forwarding Traffic.


    PER-PACKET LOAD BALANCING


    PER-PACKET LOAD BALANCING :


    Per-Packet Load Balancing Allows The Router To Send Successive Data Packets Over Different Paths Without Regard To Individual Hosts Or User Sessions. It Uses The Round-Robin Method To Determine Which Path Each Packet Takes To The Destination. Per-Packet Load Balancing Ensures That The Traffic Is Balanced Over Multiple Links.

    Per-Packet Load Balancing Is Good For Single-Path Destinations, But Packets For A Given Source-Destination Host Pair Might Take Different Paths. Per-Packet Load Balancing Can Therefore Introduce Reordering Of Packets. This Type Of Load Balancing Is Inappropriate For Certain Types Of Data Traffic (Such As Voice Traffic Over IP) That Depend On Packets Arriving At The Destination In Sequence.

    Use Per-Packet Load Balancing To Help Ensure That A Path For A Single Source-Destination Host Pair Does Not Get Overloaded. If The Bulk Of The Data Passing Through Parallel Links Is For A Single Pair, Per-Destination Load Balancing Overloads A Single Link While Other Links Have Very Little Traffic. Enabling Per-Packet Load Balancing Allows You To Use Alternate Paths To The Same Busy Destination.

    BENEFITS OF PER-PACKET LOAD BALANCING :


  • Avoid Path Congestion

  • Per-Packet Load Balancing Avoids Overloading By Spreading Traffic For A Given Destination Across Different Network Links.

  • Improve Path Utilization

  • Data Traffic Is Balanced Over Multiple Links.

    RESTRICTIONS OF PER-PACKET LOAD BALANCING :


  • Out-Of-Sequence Packets

  • Using Per-Packet Load Balancing To Share The Traffic Load Across Available Paths To A Given Destination Can Cause Out-Of-Sequence Packets In A Particular Data Flow. This Can Result In Unsatisfactory Data Transmission For Video And Voice Streaming.

    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.


    LOAD BALANCING IN CISCO EXPRESS FORWARDING (CEF)


    LOAD BALANCING IN CISCO EXPRESS FORWARDING (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.

    The Following Example Shows How To Disable Per-Destination Load Balancing :

    Configure Terminal
    Interface Ethernet 1/1
    No IP Load-Sharing Per-Destination

    The Following Example Shows How To Configure Per-Packet Load Balancing For Cisco Express Forwarding :

    Configure Terminal
    Interface Ethernet 1/1
    Ip Load-Sharing Per-Packet

    If You Want To Enable Per-Packet Load Balancing For Traffic Intended For A Particular Destination, All Interfaces That Can Forward Traffic To That Destination Must Be Enabled For Per-Packet Load-Balancing.

    HOW CEF LOAD BALANCING WORKS:


    CEF Is An Advanced Layer 3 Switching Technology Inside A Router. Usually A Router Uses A Route Cache To Speed Up Packet Forwarding. The Route Cache Is Filled On Demand When The First Packet For A Specific Destination Needs To Be Forwarded. If The Destination Is On A Remote Network Reachable Via A Next Hop Router, The Entry In The Route Cache Is Consisting Of The Destination Network.

    If Parallel Paths Exist This Does Not Provide Load Balancing, As Only One Path Would Be Used. Therefor The Entry In The Route Cache Now Relates To A Specific Destination Address, Or Host. If Multiple Hosts On The Destination Network Are Receiving Traffic A Route Cache Entry For Each Individual Host Is Made, Balancing The Hosts Over The Available Paths. This Provides Per Destination Load Balancing. The Problem That Arises Is That For A Backbone Router Carrying Traffic For Several Thousands Of Destination Hosts A Respective Number Of Cache Entries Is Needed. This Consumes Memory And Makes Cache Maintenance A Demanding Task. In Addition The Decision About Which Path To Use Is Done At The Time The Route-Cache Is Filled, And It Is Based On The Utilization Of The Individual Links At That Point In Time. However The Amount Of Traffic On Individual Connections Can Change Over Time, Possibly Leading To A Situation Where Some Links Carry Mostly Idle Connections And Others Are Congested. CEF Takes A Different Approach As It Calculates All Information Necessary For The Forwarding Task In Advance And Decouples The Forwarding Information From The Next Hop Adjacency, Which Allows For Effective Load Balancing.

    THE TWO MAIN COMPONENTS OF CEF OPERATION ARE THE :


  • Forwarding Information Base

  • Adjacency Tables

    FORWARDING INFORMATION BASE :


    CEF Uses A Forwarding Information Base (FIB) To Make IP Destination Prefix-Based Switching Decisions. The FIB Is Conceptually Similar To A Routing Table Or Information Base. It Maintains A Mirror Image Of The Forwarding Information Contained In The IP Routing Table. When Routing Or Topology Changes Occur In The Network, The IP Routing Table Is Updated, And Those Changes Are Reflected In The FIB. The FIB Maintains Next-Hop Address Information Based On The Information In The IP Routing Table. Because There Is A One-To-One Correlation Between FIB Entries And Routing Table Entries, The FIB Contains All Known Routes And Eliminates The Need For Route Cache Maintenance That Is Associated With Earlier Switching Paths Such As Fast Switching And Optimum Switching.

    ADJACENCY TABLES :


    Network Nodes In The Network Are Said To Be Adjacent If They Can Reach Each Other With A Single Hop Across A Link Layer. In Addition To The FIB, CEF Uses Adjacency Tables To Prepend Layer 2 Addressing Information. The Adjacency Table Maintains Layer 2 Next-Hop Addresses For All FIB Entries.

    The Adjacency Table Is Populated As Adjacencies Are Discovered. Each Time An Adjacency Entry Is Created (Such As Through The ARP Protocol), A Link-Layer Header For That Adjacent Node Is Precomputed And Stored In The Adjacency Table. Once A Route Is Determined, It Points To A Next Hop And Corresponding Adjacency Entry. It Is Subsequently Used For Encapsulation During CEF Switching Of Packets.

    A Route Might Have Several Paths To A Destination Prefix, Such As When A Router Is Configured For Simultaneous Load Balancing And Redundancy. For Each Resolved Path A Pointer Is Added For The Adjacency Corresponding To The Next-Hop Interface For That Path. This Mechanism Is Used For Load Balancing Across Several Paths.

    For Per Destination Load Balancing A Hash Is Computed Out Of The Source And Destination IP Address. This Hash Points To Exactly One Of The Adjacency Entries In The Adjacency Table, Providing That The Same Path Is Used For All Packets With This Source/Destination Address Pair.

    If Per Packet Load Balancing Is Used The Packets Are Distributed Round Robin Over The Available Paths. In Either Case The Information In The FIB And Adjacency Tables Provide All The Necessary Forwarding Information, Just Like For Non-Load Balancing Operation. The Additional Task For Load Balancing Is To Select One Of The Multiple Adjacency Entries For Each Forwarded Packet.


    CONFIGURE CEF (CISCO EXPRESS FORWARDING)


    CONFIGURE CEF :


    NOTE: Load Balancing Is Based On A Combination Of Source And Destination Packet Information; It Allows You To Optimize Resources By Distributing Traffic Over Multiple Equal-Cost Connections For Transferring Data To A Destination.

    You Configure Load Balancing On Outbound Interfaces On A Per-Destination Or Per-Packet Basis.

    ENABLE CEF :


    To Enable CEF, Use The Following Command In Global Configuration Mode:

    Router(Config)# IP CEF

    ENABLE PER-PACKET LOAD BALANCING :


    Per-Destination Load Balancing Is Enabled By Default When You Enable CEF. Typically, You Would Disable Per-Destination Load Balancing When You Want To Enable Per-Packet Load Balancing.

    To Disable Per-Destination Load Balancing, Use The Following Command In Interface Configuration Mode:

    Router (Config-If) # No IP Load-Sharing Per-Destination

    TO ENABLE PER-PACKET LOAD BALANCING, USE THE FOLLOWING COMMAND IN INTERFACE CONFIGURATION MODE :


    Router (Config-If) # IP Load-Sharing Per-Packet

    ENABLE NETWORK ACCOUNTING FOR CEF:


    Hash Bucket Accounting To Collect Statistics Is Better To Understand Cisco Express Forwarding Patterns In Your Network. Use The Following Command To Enable It:

    Router (Config) # IP CEF Accounting Load-Balance-Hash

    VERIFYING CEF :


    Use The Use The Following Commands In Privileged EXEC Mode To View The Path-Tobucket Assignment Result From The Hash Bucket Accounting.

    Router# Show IP CEF {Prefix} Internal


    TUNNEL LOAD-BALANCING FOR CEF


    TUNNEL LOAD-BALANCING FOR CEF :


    The Following Example Shows How To Select A Tunnel Load-Balancing Algorithm For Cisco Express Forwarding :

    Configure Terminal
    IP CEF Load-Sharing Algorithm Tunnel

    The Following Example Shows How To Disable The Tunnel Load-Balancing Algorithm :

    Configure Terminal
    No IP CEF Load-Sharing Algorithm Tunnel

    LAYER 4 LOAD-BALANCING ALGORITHM FOR CISCO EXPRESS FORWARDING TRAFFIC :


    The Following Example Shows How To Select An Include-Ports Layer 4 Load-Balancing Algorithm For Cisco Express Forwarding Traffic:

    Configure Terminal
    IP CEF Load-Sharing Algorithm Include-Ports Source

    NOTE :This Example Sets Up Load Sharing That Includes The Source Port In The Load-Balancing Decision.

    To Disable The Include-Ports Layer 4 Load-Balancing Algorithm And Return To The Default Universal Mode, Enter The Following Commands:

    Configure Terminal
    No IP Cef Load-Sharing Algorithm


    SUMMARY OF LOAD BALANCING


    SUMMARY :


    LOAD SHARING IS : The Ability To Distribute Outgoing Traffic (Or Influence The Flow Of Incoming Traffic) Over Multiple Paths.

    LOAD BALANCING IS : The Ability To Split The Load Toward The Same Destination (Host Or IP) Over Multiple Paths (Load-Balancing Will Split The Traffic Sent, In A Equal Fashion Using Multiple Paths To A Destination When Forwarding Packets).

    PER DESTINATION LOAD BALANCING : This Is The Default Load Balancing Method Enabled On The Router. Packets For A Given Source-Destination Host Pair Will Take The Same Path, Even If Multiple Paths Are Available. For Example, Given Two Paths To The Same Network, All Packets For Destinationa On That Network Go Over The First Path (If Having The Same Source In Case Of CEF), All Packets For Destinationb On That Network Go Over The Second Path, And So On.

    PER-PACKET LOAD BALANCING : Allows The Router To Send Successive Data Packets Over Paths Without Regard To Individual Hosts Or User Sessions. It Uses The Round-Robin Method To Determine Which Path Each Packet Takes To The Destination. With Per-Packet Load Balancing Enabled, 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 Ensures Balancing Over Multiple Links.

    Although Path Utilization With Per-Packet Load Balancing Is Beneficial, Packets For A Given Pair Of Source-Destination Hosts Might Take Different Paths. This Means That Per-Packet Load Balancing Can Introduce Reordering Of Packets. This Load Balancing Method Would Be Inappropriate For Certain Types Of Data Traffic (Such As Voice Traffic Over IP) That Depend On Packets Arriving At The Destination In Sequence.

    Per-Packet Load Balancing To Ensure That A Path For A Single Source-Destination Pair Does Not Get Overloaded. If The Bulk Of Data Passing Through Parallel Links Is For A Single Pair, Per-Destination Load Balancing Overloads A Single Link While Other Links Have Very Little Traffic. Enabling Per-Packet Load Balancing Allows You To Use Alternate Paths To The Same Busy Destination.

    CISCO EXPRESS FORWARDING :A Layer 3 Switching Technology. Cisco Express Forwarding Can Also Refer To Central Cisco Express Forwarding Mode, One Of Two Modes Of Cisco Express Forwarding Operation.

    Cisco Express Forwarding Enables A Route Processor To Perform Express Forwarding. Distributed Cisco Express Forwarding Is The Other Mode Of Cisco Express Forwarding Operation.

    NOTE : CEF Is Mainly Used To Increase Packet Switching Speed By Reducing The Overhead And Delays Introduced By Other Routing Techniques. CEF Consists Of Two Key Components: The Forwarding Information Base (FIB) And Adjacencies. CEF Currently Supports Ethernet, Frame Relay, ATM, PPP, FDDI, Tunnels, And Cisco HDLC.

    For More Info - > Cisco Express Forwarding:



    ADJACENCY : A Relationship Formed Between Selected Neighboring Routers And End Nodes For The Purpose Of Exchanging Routing Information. Adjacency Is Based Upon The Use Of A Common Media Segment By The Routers And Nodes Involved.

    DISTRIBUTED CISCO EXPRESS FORWARDING :A Mode Of Cisco Express Forwarding Operation In Which Line Cards (Such As Versatile Interface Processor [VIP] Line Cards) Maintain Identical Copies Of The Forwarding Information Base (FIB) And Adjacency Tables. The Line Cards Perform The Express Forwarding Between

    PORT ADAPTERS : This Relieves The Route Switch Processor Of Involvement In The Switching Operation.

    FIB :Forwarding Information Base. A Component Of Cisco Express Forwarding That Is Conceptually Similar To A Routing Table Or Information Base. The Router Uses The FIB Lookup Table To Make Destination-Based Switching Decisions During Cisco Express Forwarding Operation. The Router Maintains A Mirror Image Of The Forwarding Information In An IP Routing Table.

    LSP :Label Switched Path. A Sequence Of Hops (Router 0...Router N). A Packet Travels From R0 To Rn By Means Of Label Switching Mechanisms. An LSP Can Be Chosen Dynamically, Based On Normal Routing Mechanisms, Or You Can Configure The LSP Manually.

    PREFIX: The Network Address Portion Of An IP Address. A Prefix Is Specified By A Network And Mask And Is Generally Represented In The Format Network/Mask. The Mask Indicates Which Bits Are The Network Bits.

    FOR EXAMPLE: 1.0.0.0/16 Means That The First 16 Bits Of The IP Address Are Masked, Making Them The Network Bits. The Remaining Bits Are The Host Bits. In This Example, The Network Number Is 10.0.

    RIB :Routing Information Base. A Central Repository Of Routes That Contains Layer 3 Reachability.


    LOAD BALANCING LAB CONFIGURATION


    CONFIGURE CEF :


  • Load Balancing Is Based On A Combination Of Source And Destination Packet Information;

  • It Allows You To Optimize Resources By Distributing Traffic Over Multiple Equal-Cost Connections For Transferring Data To A Destination.

  • You Configure Load Balancing On Outbound Interfaces On A Per-Destination Or Per-Packet Basis.

    ENABLE CEF :


    To Enable CEF, Use The Following Command In Global Configuration Mode: Router(Config)# Ip Cef

    ENABLE PER-PACKET LOAD BALANCING :


    Per-Destination Load Balancing Is Enabled By Default When You Enable CEF. Typically, You Would Disable Per-Destination Load Balancing When You Want To Enable Per-Packet Load Balancing.

    To Disable Per-Destination Load Balancing, Use The Following Command In Interface Configuration Mode:

    Router (Config-If) # No Ip Load-Sharing Per-Destination

    To Enable Per-Packet Load Balancing, Use The Following Command In Interface Configuration Mode:

    Router (Config-If) # Ip Load-Sharing Per-Packet

    ENABLE NETWORK ACCOUNTING FOR CEF:


    Hash Bucket Accounting To Collect Statistics Is Better To Understand Cisco Express Forwarding Patterns In Your Network. Use The Following Command To Enable It:

    Router (Config) # IP CEF Accounting Load-Balance-Hash

    VERIFYING CEF :


    Use The Use The Following Commands In Privileged EXEC Mode To View The Path-Tobucket Assignment Result From The Hash Bucket Accounting.

    Router# Show IP CEF {Prefix} Internal

    For More Info - > How Does Unequal Cost Path Load Balancing (Variance) Work in IGRP and EIGRP?




    CONCLUSION:


    The Goal Of This Article Is To Give An Easy Way To Understand The “CISCO - LOAD BALANCING”. Hope This Article Will Help Every Beginners Who Are Going To Start Cisco Lab Practice Without Any Doubts. Thank You And Best Of Luck.

    This Article Written Author By: Premakumar Thevathasan. CCNA, CCNP, CCIP, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.

    DISCLAIMER:


    This Document Carries No Explicit Or Implied Warranty. Nor Is There Any Guarantee That The Information Contained In This Document Is Accurate. Every Effort Has Been Made To Make All Articles As Complete And As Accurate As Possible.

    It Is Offered In The Hopes Of Helping Others, But You Use It At Your Own Risk. The Author Will Not Be Liable For Any Special, Incidental, Consequential Or Indirect Any Damages Due To Loss Of Data Or Any Other Reason That Occur As A Result Of Using This Document. But No Warranty Or Fitness Is Implied. The Information Provided Is On An "As Is" Basic. All Use Is Completely At Your Own Risk.

    For Home Page Of - > SCN InF4 TECH


    To Send Email



  • 4 comments:

    Anonymous said...

    Glossary

    Cisco Express Forwarding—A high performance IP forwarding path. Forwarding can be done in software or hardware.

    FP—Forwarding processor.

    IP—Internet protocol.

    path—A valid route to reach a destination IP prefix. Specified in terms of a next-hop IP address and output interface.

    PPLB—Per-packet load-balancing.

    RP—Route processor.

    session—A unidirectional end-to-end IP communication between two IP nodes. All packets in the session have the same source and destination address.

    Anonymous said...

    HOW TO VERIFY EIGRP LOAD BALANCING:

    The Default Setting For Load Balancing Under EIGRP Is “Per-Destination”.

    As We’re Working With Only One Destination, We Will Still End Up Using One Link For All Traffic, So It Is Better To Implement “Per-Packet” Load-Balancing.

    To Enable “Per-Packet” Load-Balancing We Will Need To Check Our CEF (Cisco Express Forwarding) Settings. If This Device Did Not Use CEF, We Would Have To Disable Fast-Switching On The Interfaces With The Interface Command “No Ip Route-Cache“
    To Check CEF For This Route, Use The Command “Show Ip Cef 124.0.0.1“

    You Can See Here That Per-Destination Sharing Is Enabled For These Two Routes.

    To Change This To “Per-Packet” Use The Interface Command “Ip Load-Sharing Per-Packet” On All Interfaces That Forward Traffic To The Destination.

    R1#Conf T
    R1(Config)#Int Fa 0/0
    R1(Config-If)#Ip Load-Sharing

    Per-Packet
    R1(Config-If)#Int Fa 0/1
    R1(Config-If)#Ip Load-Sharing Per-Packet

    If You Now Enter The Command ”Show Ip Cef 124.0.0.1” Again, You Can See That Sharing Is Now Per-Packet Based.

    That’s It, We’ve Configured And Verified Equal-Cost Load Balancing.
    On To Objective 3, Configure And Verify Unequal-Cost Load Balancing.
    To Start This, I Will Higher The Delay Value For R1, Fa 0/0 And R2, Fa 0/0 To Make One Of The Links Appear Faster And Therefor More Preferred.

    R1(Config)#Int Fa 0/0
    R1(Config-If)#Delay 5000
    R1(Config)#Int Fa 0/1
    R1(Config-If)#Delay 5000

    If You Look At The EIGRP Topology Now, You Can See One Of The Routes Has A Higher Metric. This Has As Result That Only The Route Via R3 Is Being Used To Forward Traffic.

    If We Want To Use Multiple Links That Do Not Have The Same Metric For Load-Balancing, We Need To Use The Router Process Command “Variance X” Where X Is A

    Multiplier For The Lowest Metric Of The Routes That You Want To Use.
    So For Example “Variance 2″ Would Use Routes With A Metric Between 2323456 And, Twice That, 4646912.

    In This Case It Would Allow Our Higher Metric Route Via R2 To Be Used In Unequal-Cost Load-Balancing For The Route To 124.0.0.0/24.
    R1#Conf T
    R1(Config)#Router Eigrp 10
    R1(Config-Router)#Variance ?
    <1-128> Metric Variance Multiplier
    R1(Config-Router)#Variance 2
    And If We Take Another Look At The EIGRP Topology, We Can See Both The Router Via R3, And The Higher Metric Route Via R2, Are Being Used.

    Looking At The Output From “Show Ip Cef 124.0.0.1“, We Can See That Both Routes Are Being Used, But The Lower Route Has A Higher Traffic Share, Meaning That It Will Get To Forward A Bigger Share Of The Traffic That Is Being Load-Balanced.

    And With This, We Have Successfully Implemented And Verified Unequal-Cost Load-Balancing.

    Anonymous said...

    Unequal-cost EIGRP load balancing

    The degree to which EIGRP performs load balancing is controlled with the variance command.

    You set the variance to a number from 1 to 128. The default is 1, which indicates equal-cost load balancing. The multiplier defines the range of metric values that are accepted for load balancing by the EIGRP process.

    Anonymous said...

    Hence When Testing Load Balancing:

    Do Not Issue Ping And Observe The Results From The Router That Connects To The Same Metric Parallel Paths, As The Locally Generated Ping Packets Are Process-Switched Rather Than Fast-Switched And Might Produce Confusing Results.