Topic: tech juniper jir prev next

tech juniper jir > 04: Load Balancing

04: Load Balancing

Concepts and Operations

Equal-cost multipath load balancing (or load sharing) gives the ability to distribute traffic to the same destination prefix over equal-cost paths. Load balancing is per-packet or per-flow.

Per-Packet

Per-packet load balancing forwards packets in a round robin fashion. Forwarding per-packet can actually decrease performance, because the packets can arrive at the destination out of order. Modern Junos devices do not implement per-packet load balancing.

Per-Flow

Per-flow load balancing maintains individual traffic flows between end stations. By default, traffic is considered to belong to a single flow if it enters through the same ingress interface and has the same source address, destination address and protocol. This is a broader definition than, for instance, a TCP flow. VPLS traffic between the same two routers would be part of the same flow. All protocols, not just TCP, can benefit from a flow through the network. Junos can be configured to use other attributes, including Layer 4 attributes, into account.

For IGPs, Junos installs one of the available next hops (in the RIB) into the FIB. For iBGP, in which there may be many routes with equal cost, the routes are distributed evenly between multiple links. This should, but is not guaranteed, to lead to a roughly equal distribution of traffic across the links.

Layer 3 Load Balancing

How to implement and monitor Layer 3 load balancing.

Use routing policy to alter the default behaviour. A load balancing policy can affect all destination prefixes with equal-cost paths, or select prefixes only. Policies are configured under edit policy-options;

policy-options {
    policy-statement load-balance-some {
        from {
            route-filter .../24 exact;
        }
        then {
            load-balance per-packet;
        }
    }
    policy-statement load-balance-all {
        then {
            load-balance per-packet;
        }
    }
}

Note that, although the load balancing action is per-packet, the actual operation is platform dependant.

Load balancing affects the local router only. For load balancing across the network, load balancing must be configured on each router.