The Cisco NX-OS software load balances traffic across all operational
interfaces in a port channel by hashing the addresses in the frame to a
numerical value that selects one of the links in the channel. Port channels
provide load balancing by default. Port-channel load balancing uses MAC
addresses, IP addresses, or Layer 4 port numbers to select the link.
Port-channel load balancing uses either source or destination addresses or
ports, or both source and destination addresses or ports.
You can configure the load- balancing mode to apply to all port channels
that are configured on the entire device or on specified modules. The
per-module configuration takes precedence over the load-balancing configuration
for the entire device. You can configure one load-balancing mode for the entire
device, a different mode for specified modules, and another mode for the other
specified modules. You cannot configure the load-balancing method per port
channel.
You can configure the type of load-balancing algorithm used. You can
choose the load-balancing algorithm that determines which member port to select
for egress traffic by looking at the fields in the frame.
The default load-balancing mode for Layer 3 interfaces is the source and
destination IP address, and the default load-balancing mode for non-IP traffic
is the source and destination MAC address. Use the
port-channel load-balance command to set the
load-balancing method among the interfaces in the channel-group bundle. The
default method for Layer 2 packets is src-dst-mac. The default method for Layer
3 packets is src-dst-ip.
You can configure the device to use one of the following methods to load
balance across the port channel:
-
Destination MAC address
-
Source MAC address
-
Source and destination MAC address
-
Destination IP address
-
Source IP address
-
Source and destination IP address
-
Source TCP/UDP port number
-
Destination TCP/UDP port number
-
Source and destination TCP/UDP port number
Non-IP and Layer 3 port channels both follow the configured
load-balancing method, using the source, destination, or source and destination
parameters. For example, when you configure load balancing to use the source IP
address, all non-IP traffic uses the source MAC address to load balance the
traffic while the Layer 3 traffic load balances the traffic using the source IP
address. Similarly, when you configure the destination MAC address as the
load-balancing method, all Layer 3 traffic uses the destination IP address
while the non-IP traffic load balances using the destination MAC address.
You can configure load balancing either by the entire system or by
specific modules.
The load-balancing algorithms that use port channels do not apply to
multicast traffic. Regardless of the load-balancing algorithm you have
configured, multicast traffic uses the following methods for load balancing
with port channels:
-
Multicast traffic with Layer 4 information—Source IP address, source
port, destination IP address, destination port
-
Multicast traffic without Layer 4 information—Source IP address,
destination IP address
-
Non-IP multicast traffic—Source MAC address, destination MAC address
Note |
Devices that run Cisco IOS can optimize the behavior of the member
ports ASICs if a failure of a single member occurred by running the
port-channel hash-distribution command. The Cisco Nexus 9000 Series device
performs this optimization by default and does not require or support this
command. Cisco NX-OS does support the customization of the load-balancing
criteria on port channels through the port-channel load-balance command, either
for the entire device or on a per-module basis.
|