precedence

Configures or deletes precedence for the specified interface or port channel. Precedence indicates the priority given to a port or port channel. The lower the number, the higher the priority.

Syntax

precedence number interface [ ethernet IFNAME | port-channel 1-255 ]
no precedence number

Parameters

precedence number
Specifies the precedence value. The valid range is 1 through 65535.
interface
Specifies the interface type.
ethernet IFNAME
Specifies the Ethernet interface name.
port-channel 1-255
Specifies the port channel. The valid range is 1 through 255.

Modes

Egress config mode

Usage Guidelines

A valid interface for the platform must be provided.

The no version of the command deletes the interface from the egress instance.

If the interface is a port-channel, 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 example configures the egress object, egress-123 at precedence 10 and 20.

device (conf)# egress egress-123
device(conf-egress)# precedence 10 interface ethernet 2/10

Show running: 
egress egress-123
precedence 10 interface ethernet 2/10

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

device(config)# do show egress-group egg1

    Name : egg1
          egress : eg1
          egress : eg2
device(config)# egress eg2
device(config-egress)# precedence 20 interface port-channel 2
Error: all egress objects present in group should have same loadbalance type. 
eg1 has type SRC_DST_IP_L4_PORT in group egg1
device(config-egress)#

device(config)# egress eg1
device(config-egress)# no precedence 10
device(config-egress)# exit
device(config)#
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)#
device(config)# egress eg1
device(config-egress)# precedence 10 interface port-channel 1
device(config-egress)# exit

device(config)# egress eg2
device(config-egress)# precedence 20 interface port-channel 2
device(config-egress)#
device(config-egress)# exit