load-balance

Enables or disables masking of different load balancing options while computing hashing per LAG basis.

Syntax

load-balance dst-ip
load-balance dst-l4-port
load-balance protocol
load-balance src-dst-ip-l4port
load-balance src-dst-ip-l4port-tid
load-balance src-ip
load-balance src-l4-port
load-balance tun-id
no load-balance

Parameters

dst-ip
Specifies the destination IP.
dst-l4-port
Specifies the destination TCP/UDP port.
protocol
Specifies the IP protocol.
src-dst-ip-l4port
Specifies source IP, destination IP, l4port, and protocol-based load balancing (default) method.
src-dst-ip-l4port-tid
Specifies source IP, destination IP, l4 port, protocol, and specific GTP tunnel ID-based load-balancing.
src-ip
Specifies the source IP.
src-l4-port
Specifies the source TCP/UDP port.
tun-id
Specifies the tunnel ID.

Modes

Port-channel config mode

Usage Guidelines

This command is available only to users with the admin role.

The no load-balance command sets the default value to LAG hash.

The port-channel must be created first.

The load-balance method configured in other egress-objects that co-exist in the same egress-group must match the new load-balance setting.

If there is a conflict in load-balance setting with other egress objects:

  1. Remove the port-channels from other egress objects co-existing in egress-groups.
  2. Configure the new load-balance method in all port-channels that co-exist in egress-groups with the current port-channel.
  3. Add the port-channels back to egress objects with the original configuration.

Examples

The following examples enable load balancing.

device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance dst-ip 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance dst-l4-port 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance protocol 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance src-dst-ip-l4port 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance src-dst-ip-l4port-tid 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance src-ip 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance src-l4-port 
device# configure terminal  
device#(config)# interface port-channel 1  
device(config-if-po-1)# load-balance tun-id 

The following example shows how to resolve a conflicting load-balance type setting.

device# show egress-group all 

Number of egress-groups: 1 
    Name : egg1 
          egress : eg2 
          egress : eg3 

device# show egress eg2 
    Name : eg2 
        Precedence : 20 
         Interface : port-channel 1 

device# show egress eg3 
    Name : eg3 
        Precedence : 30 
         Interface : port-channel 2 

device# show run interface port-channel 1 
interface port-channel 1 
  no shutdown --> load-balance type is default (src-dst-ip-l4port) 
device# show run interface port-channel 2 

interface port-channel 2 
  no shutdown --> load-balance type is default (src-dst-ip-l4port) 

device(config)# interface port-channel 1 
device(config-if-po-1)# load-balance src-dst-ip-l4port-tid 

Error: all egress objects present in group should have same loadbalance type. eg3 has type SRC_DST_IP_L4_PORT in group egg1

device(config-if-po-1)# exit 
device(config)# egress eg2 
device(config-egress)# no precedence 20 
device(config-egress)# exit
 
device(config)# egress eg3 
device(config-egress)# no precedence 30 
device(config-egress)# exit 

device(config)# interface port-channel 1 
device(config-if-po-1)# load-balance src-dst-ip-l4port-tid 
device(config-if-po-1)# exit
 
device(config)# interface port-channel 2 
device(config-if-po-2)# load-balance src-dst-ip-l4port-tid 
device(config-if-po-2)# 
device(config-if-po-2)# exit 
 
device(config)# egress eg2 
device(config-egress)# precedence 20 interface port-channel 1 
device(config-egress)# exit 

device(config)# egress eg3 
device(config-egress)# precedence 30 interface port-channel 2