match ip icmp-type

Configures matching based on Internet Control Message Protocol (ICMP) type for a route-map sequence number.

Syntax

match ip icmp-type { eq | gt | lt } icmp-type-1
match ip icmp-type neq icmp-type-1 [icmp-type-32 ]
match ip icmp-type range icmp-type-1 icmp-type-2
no match ip icmp-type { eq | gt | lt } icmp-type-1
no match ip icmp-type neq icmp-type-1 [icmp-type-32 ]
no match ip icmp-type range icmp-type-1 icmp-type-2

Command Default

Matching based on ICMP type is not configured.

Parameters

eq icmp-type-1
Specifies that matching occurs when the packet ICMP type is equal to the specified ICMP type or well-known ICMP type value.
gt icmp-type-1
Specifies that matching occurs when the packet ICMP type is greater than the specified ICMP type or well-known ICMP type value.
lt icmp-type-1
Specifies that matching occurs when the packet ICMP code is less than the specified ICMP type or well-known ICMP type value.
neq icmp-type-1 [icmp-type-32 ]
Specifies that matching occurs when the packet ICMP type (or ICMP type value) is not equal to all of the specified ICMP types. You can specify a maximum of 32 ICMP types. S
range icmp-type-1 icmp-type-2
Specifies that matching occurs when the packet ICMP type is within the range of specified ICMP types or well-known ICMP type values.

Modes

Route-map configuration mode

Usage Guidelines

When match protocol and match ip icmp-type are specified in the same stanza, the protocol specified by the match protocol command must be ICMP; specifying any other protocol value using the match protocol command results in the rule being evaluated as false and it becomes inactive.

Up to 128 match ip icmp-type statements are allowed per route-map sequence number for the following options:
  • eq
  • range

When multiple match ip icmp-type statements of the same type exist, matching occurs when traffic matches any one of the statements.

Only one match ip icmp-type statement is allowed per route-map sequence number for the following options:
  • lt
  • gt
  • neq
Note

Note

Configuring the range option may create a lot of TCAM entries (due to rule expansion).

The no form of the command disables the configuration.

Examples

The following example shows how to configure matching when the packet ICMP type is not equal to 5.

device# configure terminal
device(config)# route-map rm permit 4
device(config-route-map-rm/permit/4)# match ip icmp-type neq 5