set egress

Sets the egress to be used by an egress group.

Syntax

set egress name
no set egress name

Parameters

name
Specifies the name of the configured egress. Supports 1-64 characters.
The name must start with an alphabet character or an underscore character, followed by alphanumeric characters or special characters (underscores, hyphens, or periods).

Modes

Egress-group config mode

Usage Guidelines

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

The following reserved keywords cannot be used as name identifiers: all, ingress-group, egress, egress-group, match, list, access-list, route-map, and listener-policy.

If the new egress object contains port-channel, the load-balance method of that port-channel must match the load-balance method configured in other egress-objects of the group.

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 same load-balance method in all port-channels that exist in egress-groups and the new egress object.
  3. Add the port-channels to the existing egress objects in egress-groups.
  4. Add the new egress object to the group.

Examples

The following example binds an egress to an egress group.

device# configure terminal
device(config)# egress-group eg1 
device(config-egress-group)# set egress egress_1

device# show running-config egress-group
egress-group eg1 
  set egress egress_1

The following example unbinds an egress from an egress group.

device# configure terminal
device(config)# egress-group eg1 
device(config-egress-group)# no set egress egress_1 

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

device(config)# egress-group egg1
device(config-egress-group)#
device(config-egress-group)# set egress eg1
device(config-egress-group)#
device(config-egress-group)# set egress eg2
Error: all egress objects present in group should have same loadbalance type. new egress(eg2) has conflicting type
device(config-egress-group)#
device(config-egress-group)# exit

device(config)# egress eg1
device(config-egress)# no precedence 10
device(config-egress)# exit
device(config)# interface port-channel 1
device(config-if-po-1)# load-balance src-dst-ip-l4port
device(config-if-po-1)# exit
device(config)#
device(config)# egress-group egg1
device(config-egress-group)# set egress eg2
device(config-egress-group)#