Secrets of load sharing traffic on Juniper devices with IGP,BGP and MPLS part 1

To have traffic evenly load shared or even in certain scenarios have the traffic unevenly load shared can be little of a secret that now will be demystified and revealed in a series of articles.

Scenario 1, load sharing traffic on multiple directly connected links between two devices using aggregated ethernet (802.3ad)

The simplest form to load share traffic between two devices if they are directly connected with multiple interfaces is to use an aggregated ethernet interface (ae interface). It is simply put a bundle of interfaces which will try to distribute traffic among them evenly. The best hash algorithm to use for this on Juniper devices is “per packet”, which really is per session. Session in this case is defined as a hash built on source and destination IP. More fields in the packet can be used to create the hash which is more relevant in a MPLS scenario for example. But for native IP connectivity L3 and L4 headers is enough to create a statistically well distributed traffic pattern. Please remember it needs a lot of sessions to achieve this statistically. With a low number of sessions, for instance 10 sessions, the load sharing might look less than perfect.

Interfaces bundled needs to be of the same media type, for example. gigabit ethernet dont bundle with fastethernet or 10 gigabit ethernet interfaces. So when creating the bundle, make sure they are all of the same type. Interfaces in the same ae group can be on different FPCs/MPCs and PICs/MICs. The bundling is done on layer2 and if LACP/LAG trunk features are available on the Junuiper platform you use, they can be activated. The bundle interface, ae, can then be addressed as any other interface for different features in protocols stanzas etc etc. Below is a simple example on bundling two gigabit ethernet interface upstream on a branch J series using 802.3ad, i.e. no LACP/LAG features activated.

First we declare how many ae interfaces we want to use on the whole device:
set chassis aggregated-devices ethernet device-count 1

We create the ae interface and define the IP address:
set interface ae0.0 family inet address 192.168.142.254/24

The interfaces used in the bundle cant have any units or protocol families declared, they just should have the following configuration:
set interface ge-0/0/2 gigether-options 802.3ad ae0
set interface ge-0/0/3 gigether-options 802.3ad ae0

Then we need to make sure we have activated the per packet (per session) load sharing method and have a proper hash:
set policy-options policy-statement LB then load-balance per-packet
set routing-options forwarding-table export LB
set forwarding-options hash-key family inet layer-3
set forwarding-options hash-key family inet layer-4

Then the same thing is done in the other end and we have a bundled link between the devices. ae interfaces are available on all JUNOS devices including EX switch series and is configured the same. This method is also compatible between Juniper and most other vendors.

So a configuration summary:
set chassis aggregated-devices ethernet device-count 1
set interface ae0.0 family inet address 192.168.142.254/24
set interface ge-0/0/2 gigether-options 802.3ad ae0
set interface ge-0/0/3 gigether-options 802.3ad ae0
set policy-options policy-statement LB then load-balance per-packet
set routing-options forwarding-table export LB
set forwarding-options hash-key family inet layer-3
set forwarding-options hash-key family inet layer-4

Next article will deal with load sharing of multiple routed links instead of physical bundles.
Stay tuned!

This entry was posted in Juniper Networking, Networking. Bookmark the permalink.

Leave a Reply