listener-policy

Creates or removes a listener policy.

Syntax

listener-policy { name sequence-id }
no listener-policy { [ name sequence-id ]| sequence-id | all }

Parameters

name
Specifies the listener policy name. Supports 1-64 characters. Characters allowed are alpha-numeric, underscore, and dot.
Underscore is not allowed as the first character.
sequence-id
Specifies the sequence id. The range is 1-65535.
all
Specifies that all listener policies are to be deleted with the no form of the command.

Modes

Config mode

Usage Guidelines

Valid listener policy name must be provided.

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.

Attempts to remove any listener policy that is not configured are ignored.

Table 1. Error messages
Message Reason
Error: listener-policy name identifier must be an arbitrary sequence of alphabets, numerals, underscores, hyphens or dots Name begins with non-alphabetic character, contains invalid characters, or does not begin with an underscore.
Error: listener-policy name identifier must start with an alphabetic character or an underscore Name begins with non-alphabetic character or does not begin with an underscore.
Error: listener-policy name identifier cannot exceed 64 characters Name is longer than 64 characters.
Error: listener-policy name identifier must not be reserved keyword Name includes the reserved word indicated.

Examples

The following examples show how to configure a listener policy.

device# configure terminal
device(config)# listener-policy lp1 4 13

device(config)# listener-policy lp2 5 

device(config)# no listener-policy lp1 4 13 
device(config)# no listener-policy lp2 5  

The following example removes the configured listener policy.

device# configure terminal
device(config)# no listener-policy lp1 4 243

The following examples show error messages for the listener policy command.

device(config)# listener-policy #abc1 100 
Error: listener-policy name identifier must start with an alphabetic character or an underscore 

device(config-listener-policy)# listener-policy abcdefghijklmnopqrstuvwxyz_abcdefghijklmnopqrstuvwxyz_abcdefghijklmnopqrstuvwxyz 
Error: listener-policy name identifier cannot exceed 64 characters 

device(config-listener-policy)# listener-policy egress 10 23
Error: listener-policy name identifier must not be reserved keyword "egress"