match packet-length

Configures matching based on packet length for a route-map sequence number.

Syntax

match packet-length { eq | gt | lt } value-1
match packet-length neq value-1 [ ... value-32 ]
match packet-length range value-1 value-2
no match packet-length { eq | gt | lt } value-1
no match packet-length neq value-1 [ ... value-32 ]
no match packet-length range value-1 value-2

Command Default

Matching based on packet length is not configured.

Parameters

eq value-1
Specifies that matching occurs when the packet length (including the IP header but excluding the Layer 2 header) is equal to the specified value.
gt value-1
Specifies that matching occurs when the packet length (including the IP header but excluding the Layer 2 header) is greater than the specified value.
lt value-1
Specifies that matching occurs when the packet length (including the IP header but excluding the Layer 2 header) is less than the specified value.
neq value-1 [ ... value-32 ]
Specifies that matching occurs when the traffic packet length (including the IP header but excluding the Layer 2 header)is not equal to all of the specified values. You can specify a maximum of 32 values.
range value-1 value-2
Specifies that matching occurs when the packet length (including the IP header but excluding the Layer 2 header) is within the range of specified values.

Modes

Route-map configuration mode

Usage Guidelines

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

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

Only one match packet-length 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 based on a packet length of 1500 for sequence number 4 in a route map named rm.

device# configure terminal
device(config)# route-map rm permit 4
device(config-route-map-rm/permit/4)# match packet-length eq 1500