Mailing List Archive

Load-Balacing Per-Packets on two equal paths
Hi

I tried to configure Load-Balancing Per-Packet on two equal paths. My
network diagram:

fe-0/2/2----eth0
/ \
TrafficGenerator---M10 NetBSD Computer (lo0 10.10.10.20)
\ /
fe-0/2/3----eth1

I sending about 6Mbit/s IP traffic from TrafficGenerator to NetBSD
loopback address. But traffic to NetBSD is sended only across one
interface :-(

M10 configuration:

interfaces {
fe-0/2/2 {
unit 0 {
family inet {
address 10.10.10.5/30;
}
}
}
fe-0/2/3 {
unit 0 {
family inet {
address 10.10.10.9/30;
}
}
}
}
routing-options {
route 10.10.10.20/32 next-hop [ 10.10.10.10 10.10.10.6 ];
}
forwarding-table {
export load-balancing;
}
}
policy-options {
policy-statement load-balancing {
from protocol [ static direct ];
then {
load-balance per-packet;
}
}
}

Some outputs from M10:

> show interfaces statistics | match "^Phy|Input rate|Output rate"

Physical interface: fe-0/2/2, Enabled, Physical link is Up
Input rate : 6285600 bps (533 pps)
Output rate : 0 bps (0 pps)
Physical interface: fe-0/2/3, Enabled, Physical link is Up
Input rate : 0 bps (0 pps)
Output rate : 3000 bps (4 pps)

> show route 10.10.10.20

inet.0: 118171 destinations, 118176 routes (118171 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.20/32 *[Static/5] 00:29:42
> to 10.10.10.10 via fe-0/2/3.0
to 10.10.10.6 via fe-0/2/2.0

--
many thanks for reply,
Tom
Load-Balacing Per-Packets on two equal paths [ In reply to ]
On Thu, Feb 13, 2003 at 11:51:17AM +0100, Tomasz Matusiewicz wrote:
> I tried to configure Load-Balancing Per-Packet on two equal paths.
[...]
> I sending about 6Mbit/s IP traffic from TrafficGenerator to NetBSD
> loopback address. But traffic to NetBSD is sended only across one
> interface :-(

Junipers with IP2 (all recent ones) can't do per-packet loadbalancing
at all, only per-flow (even if they call it "per-packet" for whatever
reasons - highly misleading). Often, per-flow is what you want to avoid
packet reordering problems with links with different traversal latency.
In your specific setup, per-packet would be OK though.


Regards,
Daniel
Load-Balacing Per-Packets on two equal paths [ In reply to ]
Try adding the following to your config:
set forwarding-options hash-key family inet layer-4

And then have your traffic generator generate 2 streams with
the same source ip, destination ip and source port number. The
destination port address of the 2 streams need to differ by a
multiple of 4.

At this point you should see equal traffic across both links.
All the traffic within each stream should be received in order.

FYI, the actual algorithms used to split the traffic are not well
documented and may be subject to revision on different platforms
and/or different OS revisions...



Tomasz Matusiewicz wrote:
>
> Hi
>
> I tried to configure Load-Balancing Per-Packet on two equal paths. My
> network diagram:
>
> fe-0/2/2----eth0
> / \
> TrafficGenerator---M10 NetBSD Computer (lo0 10.10.10.20)
> \ /
> fe-0/2/3----eth1
>
> I sending about 6Mbit/s IP traffic from TrafficGenerator to NetBSD
> loopback address. But traffic to NetBSD is sended only across one
> interface :-(
>
> M10 configuration:
>
> interfaces {
> fe-0/2/2 {
> unit 0 {
> family inet {
> address 10.10.10.5/30;
> }
> }
> }
> fe-0/2/3 {
> unit 0 {
> family inet {
> address 10.10.10.9/30;
> }
> }
> }
> }
> routing-options {
> route 10.10.10.20/32 next-hop [ 10.10.10.10 10.10.10.6 ];
> }
> forwarding-table {
> export load-balancing;
> }
> }
> policy-options {
> policy-statement load-balancing {
> from protocol [ static direct ];
> then {
> load-balance per-packet;
> }
> }
> }
>
> Some outputs from M10:
>
> > show interfaces statistics | match "^Phy|Input rate|Output rate"
>
> Physical interface: fe-0/2/2, Enabled, Physical link is Up
> Input rate : 6285600 bps (533 pps)
> Output rate : 0 bps (0 pps)
> Physical interface: fe-0/2/3, Enabled, Physical link is Up
> Input rate : 0 bps (0 pps)
> Output rate : 3000 bps (4 pps)
>
> > show route 10.10.10.20
>
> inet.0: 118171 destinations, 118176 routes (118171 active, 0 holddown, 0 hidden)
> + = Active Route, - = Last Active, * = Both
>
> 10.10.10.20/32 *[Static/5] 00:29:42
> > to 10.10.10.10 via fe-0/2/3.0
> to 10.10.10.6 via fe-0/2/2.0
>
> --
> many thanks for reply,
> Tom
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp

--
Joe Metzger
metzger@es.net
Network Engineering, ESnet
Lawrence Berkeley National Laboratory
Load-Balacing Per-Packets on two equal paths [ In reply to ]
On Thu, 13 Feb 2003 10:59:38 -0600
Joe Metzger <metzger@es.net> wrote:

JM> Try adding the following to your config:
JM> set forwarding-options hash-key family inet layer-4
JM>
JM> And then have your traffic generator generate 2 streams with
JM> the same source ip, destination ip and source port number. The
JM> destination port address of the 2 streams need to differ by a
JM> multiple of 4.
JM>
JM> At this point you should see equal traffic across both links.
JM> All the traffic within each stream should be received in order.
JM>
JM> FYI, the actual algorithms used to split the traffic are not well
JM> documented and may be subject to revision on different platforms
JM> and/or different OS revisions...

Tomasz,

Along the same lines of what Joe was saying, the more streams of traffic
you generate (for example: more source IPs and destination IPs), the
more you will see the loads distributed evenly across the two links.

Jeremy.