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. Name must not exceed 64 characters and must start with an alphabetic character or an underscore followed by an arbitrary sequence of alphabetic or numeric characters, underscores, hyphens, or dots.

Modes

Modes

Egress-group config mode

Usage Guidelines

You must have the admin role to perform this task.

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:
  • Unconfigure the load-balance method in other port-channels co-existing in egress-groups.
  • Configure the same load-balance method in all port-channels that already exist in egress-groups and the new egress object
  • Add the new egress object to the group.
Table 1. Error messages
Message Reason
Error: egress name identifier must start with an alphabetic character or an underscore. Egress name begins with non-alphabetic character or does not begin with an underscore.
Error: egress name identifier cannot exceed 64 characters Egress name is longer than 64 characters.
Error: egress name identifier must start with an alphabetic character or an underscore Egress name begins with non-alphabetic character or does not begin with an underscore.
Error: egress name identifier must be an arbitrary sequence of alphabets, numerals, underscores, hyphens or dots. Egress name contains invalid characters.
Error: egress name identifier must not be reserved keyword "egress". Egres name includes the reserved word egress

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 displays when the load-balance type is in conflict with new and existing egress objects:
Error: all egress objects present in group should have same load-balance type. new egress(eg3) has conflicting type

Following example adds 2 egress objects containing port-channels with conflicting load-balance types. In this example, port-channel 1 was already mapped to eg1 and load-balance configured to src-dst-ip-l4port. The port-channel 2 was mapped to eg2 and load-balance configured to src-dst-ip-l4port-tid.

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

To correct this action, unconfigure load-balance type in port-channel 1, then configure it to match load-balance type of port-channel 2. After this corrective action, eg2 can be added to the group.

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