Reference Guide

Interfaces | 381
Load balancing through port channels
FTOS uses hash algorithms for distributing traffic evenly over channel members in a port channel (LAG).
The hash algorithm distributes traffic among ECMP paths and LAG members. The distribution is based on
a flow, except for packet-based hashing. A flow is identified by the hash and is assigned to one link. In
packet-based hashing, a single flow can be distributed on the LAG and uses one link.
Packet based hashing is used to load balance traffic across a port-channel based on the IP Identifier field
within the packet. Load balancing uses source and destination packet information to get the greatest
advantage of resources by distributing traffic over multiple paths when transferring data to a destination.
FTOS allows you to modify the hashing algorithms used for flows and for fragments. The
load-balance
and
hash-algorithm commands are available for modifying the distribution algorithms.
S-Series load-balancing
For LAG hashing on S-Series, the source IP, destination IP, source TCP/UDP port, and destination TCP/
UDP port are used for hash computation by default. For packets without a Layer 3 header, FTOS
automatically uses
load-balance mac source-dest-mac.
IP hashing or MAC hashing should not be configured at the same time. If you configure an IP and MAC
hashing scheme at the same time, the MAC hashing scheme takes precedence over the IP hashing scheme.
To change the IP traffic load balancing default on the S-Series, use the following command:
Note: Hash-based load-balancing on MPLS does not work when packet-based hashing (load-balance
ip-selection packet-based) is enabled.
Command Syntax Command Mode Purpose
[no] load-balance {ip-selection
[dest-ip | source-ip]} | {mac
[dest-mac | source-dest-mac |
source-mac]} | {tcp-udp enable}
{ipv6-selection} {tunnel} and
{ingress-port}
CONFIGURATION Replace the default IP 4-tuple method of balancing
traffic over a port channel. You can select one, two, or
all three of the following basic hash methods
ip-selection [dest-ip | source-ip]—Distribute IP traffic
based on IP destination or source address.
mac [dest-mac | source-dest-mac | source-mac]—
Distribute IPV4 traffic based on the destination or
source MAC address, or both, along with the VLAN,
Ethertype, source module ID and source port ID.
tcp-udp enable—Distribute traffic based on TCP/UDP
source and destination ports.
ingress-port -------Option to Source Port Id for ECMP/
LAG hashing.
ipv6-selection------Set the IPV6 key fields to use in
hash computation.
tunnel------Set the tunnel key fields to use in hash
computation