Traffic Load sharing

Discussion in 'Cisco' started by frederic.metz@gmail.com, Mar 26, 2007.

  1. Guest

    Hi all,

    I have a Cisco Router with two interfaces and I want the router to
    send the packets alternately on each interface.

    That means when I do a e.g. ping, the first packet has to be sent on
    int eth0, the second on ser0, the third on eth0 and so on.

    I know that this is possible, I saw that on a setup for a university
    project.

    How do I configure that ?

    Cheers,
    Frédéric-Philippe Metz
     
    , Mar 26, 2007
    #1
    1. Advertising

  2. Trendkill Guest

    On Mar 25, 7:19 pm, wrote:
    > Hi all,
    >
    > I have a Cisco Router with two interfaces and I want the router to
    > send the packets alternately on each interface.
    >
    > That means when I do a e.g. ping, the first packet has to be sent on
    > int eth0, the second on ser0, the third on eth0 and so on.
    >
    > I know that this is possible, I saw that on a setup for a university
    > project.
    >
    > How do I configure that ?
    >
    > Cheers,
    > Frédéric-Philippe Metz


    Load balancing (routing-wise) is only accomplished with a routing
    protocol (that supports load sharing) that knows about the same
    destination via two routes that have the same metric. In short, if
    you have two routers with DS3s to a remote destination, and both
    routers are advertising the remote network to the core, with the same
    routing protocol, and with the same metric, then load sharing will
    work presuming you are using a protocol like RIPv2, OSPF, etc. Static
    routing will not support load-balancing.

    In short, ensure that you have two routes to the destination, both of
    which have a remote router that is in the same protocol/autonomous
    system and the metric of the routes are the same.

    Lastly, if this is some kind of solution for load balancing internet
    circuits, you have other things to consider since the traffic back in
    will not be load balanced unless you have a single provider and work
    through their options for such a configuration. Additionally, you
    need to be careful with asynchronous routing if the traffic takes one
    path over and a different path back. While theoretically this should
    not be a problem, firewalls and other appliances can affect this
    traffic and do some funny things. CEF is also capable of load
    sharing, but still depends on a lower level protocol.

    http://www.cisco.com/warp/public/105/46.html
    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094820.shtml
    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008009437d.shtml
     
    Trendkill, Mar 26, 2007
    #2
    1. Advertising

  3. In article <>,
    Trendkill <> wrote:

    >Load balancing (routing-wise) is only accomplished with a routing
    >protocol (that supports load sharing) that knows about the same
    >destination via two routes that have the same metric.


    >Additionally, you
    >need to be careful with asynchronous routing if the traffic takes one
    >path over and a different path back. While theoretically this should
    >not be a problem, firewalls and other appliances can affect this
    >traffic and do some funny things.


    For some applications, the timing differences between the routes
    could break the application.

    Also, sending packets via alternating interfaces can lead to different
    packet fragments going different routes, and thus fragments arriving
    "out of order". You can end up with fragments discarded
    unless you are specifically using a protocol (such as PPP) that
    does fragment reassembly -- but PPP can lead to quite high CPU loads.

    Even without fragmentation, you can easily end up with TCP packets
    arriving out of order. If Selective ACK (SACK) is not turned on,
    alternate packets may be discarded, with the discarded packet NAK'd
    and so retransmitted by the source, with a complete round-trip latency
    to resynchronize. The throughput result can end up much much much worse
    than if you had used only a single interface.

    Because of factors such as these, sending alternate packets to
    alternating interfaces is seldom as effective as load distribution
    based upon the source and destination IP address (e.g., send through
    interface 0 if the bitwise "xor" of the last bits of the source
    and destination addresses is 0, send to interface 1 if the xor is 1.)
    Algorithms such as these more closely approach flow-based path
    distribution rather than per-packet load distribution. *If* the
    IP addresses involved in your flows tend towards having uniform
    random distribution of the data, flow-based distribution is more
    effective and still shares the costs. But if it happens that the
    bulk of your data is transferred between two consistant IP addresses
    (e.g., backing up a server to a remote tape library) then you need
    to be more careful with how you route the flows. "Policy-based routing"
    can assist in this. I also seem to recall reading that some IOS
    routers have the ability to do flow-based routing by examining the
    TCP ports as well as the IP addresses, but I have a stuffed head
    at the moment so I'm not certain of this.
     
    Walter Roberson, Mar 26, 2007
    #3
  4. Ignoring the question of WHY you would want to do this... To achieve
    alternating paths, you need to enable per packet load balancing (either by
    process switching or enabling CEF per packet) and have both exit paths see
    the same routing "cost" to the destination (via tweaking of routing
    protocols or configuration of static routes).

    Assuming this is a training exercise, the details of either are left as an
    exercise for the student. If this is a production application, I highly
    recommend you get some professional help, because this sure does not sound
    like an application where per packet load balancing makes sense.

    Good luck and have fun!
    --
    Vincent C Jones, Consultant Expert advice and a helping hand
    Networking Unlimited, Inc. for those who want to manage and
    Tenafly, NJ Phone: 201 568-7810 control their networking destiny
    http://www.networkingunlimited.com
     
    Vincent C Jones, Mar 26, 2007
    #4
  5. Guest

    Thanks,

    I'll try that and yes, it is an exercise for students. In theory, it
    is quite clear what I want the machine to do. But I have only basic
    knowledge of configuring it on the router.

    If the Router only knows 2 Routes to a destination network (via static
    conf or via routing protocol), that would help for what I want, isn't
    it ? Because the RIB has the information for both routes but the
    calculated FIB has only one entry for that net, right ?

    So the key is this process switching thing or/and Cisco express
    forwarding, right ?

    Thanks for help.

    Cheers,
    Frédéric-Philippe Metz
     
    , Mar 27, 2007
    #5
  6. Walter Roberson, Mar 27, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wr
    Replies:
    0
    Views:
    615
  2. Jason
    Replies:
    0
    Views:
    432
    Jason
    Feb 10, 2004
  3. Replies:
    1
    Views:
    2,348
    Vincent C Jones
    Nov 21, 2005
  4. jimmie
    Replies:
    1
    Views:
    768
    The-Wisest-One
    Feb 26, 2006
  5. palas_123
    Replies:
    1
    Views:
    2,108
    donjohnston
    Dec 28, 2009
Loading...

Share This Page