By default, in the event of equal-cost next-hops Juniper will randomly pick one next-hop per route to install in the forwarding table.
If you configure "per-packet-load balancing" , then multiple next-hops will be installed in the forwarding table. ( But routing process will show only one next-hop as selected in the routing-table)
The term "per-packet load balancing" used by Juniper is not actually the laod-balancing of packets by packets.
The first generation ASIC's used that kind of load balancing which was not desirable for many reasons.
The modern day hardware ASICs are capable of load-sharing based on per flow. But still the configuration is called "per-packet" .
The EX series will do the per flow load-sharing, when you configure "per-packet" policy.
Check this KB for more information about EX Series.
http://kb.juniper.net/InfoCenter/index?page=content&id=KB21407&cat=EX_SERIES&actp=LIST
I created the following example in an EX4200 to explain this,
Without "per packet" load-sharing policy configured , Per- prefix load-sharing =============================================================
<routing-options>
static {
route 10.10.10.0/24 next-hop [ 2.2.2.1 1.1.1.1 ];
route 20.20.20.0/24 next-hop [ 2.2.2.1 1.1.1.1 ];
}
show route 20.20.20.0/24
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
20.20.20.0/24 *[Static/5] 00:04:22
to 1.1.1.1 via vlan.32
> to 2.2.2.1 via vlan.31
show route 10.10.10.0/24
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.0/24 *[Static/5] 01:40:13
> to 1.1.1.1 via vlan.32
to 2.2.2.1 via vlan.31
show route forwarding-table destination 10.10.10.0/24
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
10.10.10.0/24 user 0 1.1.1.1 ucst 1639 5 vlan.32
show route forwarding-table destination 20.20.20.0/24
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
20.20.20.0/24 user 0 2.2.2.1 ucst 1668 4 vlan.31
With "per packet" load-sharing policy configured ,, Per- flow load-sharing .
===========================================================
<routing-options>
static {
route 10.10.10.0/24 next-hop [ 2.2.2.1 1.1.1.1 ];
route 20.20.20.0/24 next-hop [ 2.2.2.1 1.1.1.1 ];
}
forwarding-table {
export lb-per-packet;
}
policy-statement lb-per-packet {
term 1 {
from {
route-filter 10.10.10.0/24 orlonger;
route-filter 20.20.20.0/24 orlonger;
}
then {
load-balance per-packet;
}
}
}
run show route 20.20.20.0/24
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
20.20.20.0/24 *[Static/5] 00:00:14
to 1.1.1.1 via vlan.32
> to 2.2.2.1 via vlan.31
show route 10.10.10.0/24
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.0/24 *[Static/5] 01:36:38
> to 1.1.1.1 via vlan.32
to 2.2.2.1 via vlan.31
show route forwarding-table destination 20.20.20.0/24
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
20.20.20.0/24 user 0 ulst 131070 3
1.1.1.1 ucst 1639 4 vlan.32
2.2.2.1 ucst 1668 2 vlan.31
show route forwarding-table destination 10.10.10.0/24
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
10.10.10.0/24 user 0 ulst 131070 3
1.1.1.1 ucst 1639 4 vlan.32
2.2.2.1 ucst 1668 2 vlan.31
to answer your questions directly
1) Yes EX can do load-balancing, by default per prefix / route and next-hop will be chosen randomly for each route.
2) NA
3)Depending on your requirment , you can configure per-flow load sharing as mentioned above.
Regards
Moses N
-------------------------------------------------------
If this post answers your question, please mark it as "Accepted Solution".
Kudos are a nice way of expressing your gratitude