or at the [edit policy-options policy-statement policy-name term term-name then] hierarchy
level:
[edit policy-options policy-statement policy-name term term-name then]
load-balance per-packet;
To complete the configuration you must apply the routing policy to routes exported from
the routing table to the forwarding table, by including the policy name in the list specified
by the export statement:
export [ policy-names ];
You can include this statement at the following hierarchy levels:
•
[edit routing-options forwarding-table]
•
[edit logical-systems logical-system-name routing-options forwarding-table]
By default, the software ignores port data when determining flows. To enable per-flow
load balancing, you must set the load-balance per-packet action in the routing policy
configuration.
To include port data in the flow determination, include the family inet statement at the
[edit forwarding-options hash-key] hierarchy level:
[edit forwarding-options hash-key]
family inet {
layer-3;
layer-4;
}
If you include both the layer-3 and layer-4 statements, the router uses the following
Layer 3 and Layer 4 information to load-balance:
•
Source IP address
•
Destination IP address
•
Protocol
•
Source port number
•
Destination port number
•
Incoming interface index
•
IP type of service
The router recognizes packets in which all of these layer-3 and layer-4 parameters are
identical, and ensures that these packets are sent out through the same interface. This
prevents problems that might otherwise occur with packets arriving at their destination
out of their original sequence.
This is appropriate behavior for Transmission Control Protocol (TCP) and User Datagram
Protocol (UDP) packets. For Internet Control Message Protocol (ICMP) packets, the field
location offset is the checksum field, which makes each ping packet a separate “flow.”
There are other protocols that can be encapsulated in IP that may have a varying value
791Copyright © 2017, Juniper Networks, Inc.
Chapter 25: Configuring Layer 2 and Layer 3 Services