CPM Filter Commands

cpm-filter

Syntax

[no] cpm-filter

Context

config>system>security

Description

This command enables the context to configure a CPM (referred to as CSM on the 7705 SAR) filter. A CPM filter is a hardware filter (that is, implemented on the network processor) for the CSM-destined traffic that applies to all the traffic destined for the CSM CPU. It can be used to drop or accept packets, as well as allocate dedicated hardware queues for the traffic. The hardware queues are not user-configurable.

The no form of the command disables the CPM filter.

default-action

Syntax

default-action {accept | drop}

Context

config>system>security>cpm-filter

Description

This command specifies the action to be applied to packets when the packets do not match the specified criteria in all of the IP filter entries of the filter. If there are no filter entries defined, the packets received is either accepted or dropped based on that default action.

Default

accept

Parameters

accept

packets are accepted unless there is a specific filter entry that causes the packet to be dropped

drop

packets are dropped unless there is a specific filter entry that causes the packet to be accepted

ip-filter

Syntax

ip-filter

Context

config>system>security>cpm-filter

Description

This command enables the context to configure IPv4 CPM filter parameters.

ipv6-filter

Syntax

ipv6-filter

Context

config>system>security>cpm-filter

Description

This command enables the context to configure IPv6 CPM filter parameters.

entry

Syntax

entry entry-id [create]

no entry entry-id

Context

config>system>security>cpm-filter>ip-filter

config>system>security>cpm-filter>ipv6-filter

Description

This command specifies a particular CPM filter match entry. Every CPM filter must have at least one filter match entry. A filter entry with no match criteria set matches every packet, and the entry action is taken.

The create keyword must be used with every new entry configured. After the entry has been created, you can navigate to the entry context without using the create keyword.

All IPv4 filter entries can specify one or more matching criteria. There are no range-based restrictions on any IPv4 filter entries.

For IPv6 filters, the combined number of fields for all entries in a filter must not exceed 16 fields (or 256 bits), where a field contains the bit representation of the matching criteria.

Parameters

entry-id

identifies a CPM filter entry as configured on this system.

Values

1 to 64

action

Syntax

action {accept | drop}

no action

Context

config>system>security>cpm-filter>ip-filter>entry

config>system>security>cpm-filter>ipv6-filter>entry

Description

This command specifies the action to take for packets that match this filter entry.

Default

drop

Parameters

accept

packets matching the entry criteria are forwarded

drop

packets matching the entry criteria are dropped

log

Syntax

log log-id

no log

Context

config>system>security>cpm-filter>ip-filter>entry

config>system>security>cpm-filter>ipv6-filter>entry

Description

This command specifies the log in which packets matching this entry should be entered. The value 0 indicates that logging is disabled.

The no form of the command deletes the log ID.

Parameters

log-id

the log ID where packets matching this entry should be entered

Values

101 to 199

match

Syntax

match [protocol protocol-id]

no match

Context

config>system>security>cpm-filter>ip-filter>entry

Description

This command enables the context to enter match criteria for the IPv4 filter entry. When the match criteria have been satisfied, the action associated with the match criteria is executed.

If more than one match criterion (within one match statement) is configured, all criteria must be satisfied (AND function) before the action associated with the match is executed.

A match context may consist of multiple match criteria, but multiple match statements cannot be entered per entry.

The no form of the command removes the match criteria for the entry-id.

Parameters

protocol-id

protocol-number or protocol-name

protocol-number

the protocol number in decimal, hexadecimal, or binary, to be used as an IP filter match criterion. Common protocol numbers include ICMP(1), TCP(6), and UDP(17). See Table: IP Protocol IDs and Descriptions for the protocol IDs and descriptions for the IP protocols.

Values

[0 to 255]D

[0x0 to 0xFF]H

[0b0 to 0b11111111]B

protocol-name

the protocol name to be used as an IP filter match criterion. See Table: IP Protocol IDs and Descriptions for the protocol IDs and descriptions for the IP protocols.

Values

none, icmp, igmp, ip, tcp, egp, igp, udp, rdp, ipv6, ipv6-route, ipv6-frag, idrp, rsvp, gre, ipv6-icmp, ipv6-no-nxt, ipv6-opts, iso-ip, eigrp, ospf-igp, ether-ip, encap, pnni, pim, vrrp, l2tp, stp, ptp, isis, crtp, crudp, sctp, mpls-in-ip, * - udp/tcp wildcard

Table: IP Protocol IDs and Descriptions

Protocol ID

Protocol

Description

1

icmp

Internet Control Message

2

igmp

Internet Group Management

4

ip

IP in IP (encapsulation)

6

tcp

Transmission Control

8

egp

Exterior Gateway Protocol

9

igp

Any private interior gateway

17

udp

User Datagram

27

rdp

Reliable Data Protocol

41

ipv6

IPv6

43

ipv6-route

Routing Header for IPv6

44

ipv6-frag

Fragment Header for IPv6

45

idrp

Inter-Domain Routing Protocol

46

rsvp

Reservation Protocol

47

gre

General Routing Encapsulation

58

ipv6-icmp

ICMP for IPv6

59

ipv6-no-nxt

No Next Header for IPv6

60

ipv6-opts

Destination Options for IPv6

80

iso-ip

ISO Internet Protocol

88

eigrp

EIGRP

89

ospf-igp

OSPFIGP

97

ether-ip

Ethernet-within-IP Encapsulation

98

encap

Encapsulation Header

102

pnni

PNNI over IP

103

pim

Protocol Independent Multicast

112

vrrp

Virtual Router Redundancy Protocol

115

l2tp

Layer Two Tunneling Protocol

118

stp

Schedule Transfer Protocol

123

ptp

Performance Transparency Protocol

124

isis

ISIS over IPv4

126

crtp

Combat Radio Transport Protocol

127

crudp

Combat Radio User Datagram

132

sctp

Stream Control Transmission Protocol

137

mpls-in-ip

MPLS in IP

match

Syntax

match [next-header next-header]

no match

Context

config>system>security>cpm-filter>ipv6-filter>entry

Description

This command enables the context to enter match criteria for the IPv6 filter entry. When the match criteria have been satisfied, the action associated with the match criteria is executed.

If more than one match criterion (within one match statement) is configured, all criteria must be satisfied (AND function) before the action associated with the match is executed.

A match context may consist of multiple match criteria, but multiple match statements cannot be entered per entry.

The no form of the command removes the match criteria for the entry-id.

Parameters

next-header

protocol-number or protocol-name

protocol-number

the IPv6 next header to match, expressed as a protocol number in decimal, hexadecimal, or binary. This parameter is similar to the protocol parameter used in IPv4 filter match criteria. See Table: IP Protocol IDs and Descriptions for the protocol IDs and descriptions for the IP protocols.

Values

[1 to 42 | 45 to 49 | 52 to 59 | 61 to 255]D

[0x0 to 0x2A | 0x2D to 0x31 | 0x34 to 0x3B | 0x3D to 0xFF]H

[0b0 to 0b101010 | 0b101101 to 0b110001 | 0b110100 to 0b111011 | 0b111101 to 0b11111111]B

protocol-name

the IPv6 next header to match, expressed as a protocol name. This parameter is similar to the protocol parameter used in IPv4 filter match criteria. See Table: IP Protocol IDs and Descriptions for the protocol IDs and descriptions for the IP protocols.

Values

none, icmp, igmp, ip, tcp, egp, igp, udp, rdp, ipv6, idrp, rsvp, gre, ipv6-icmp, ipv6-no-nxt, iso-ip, eigrp, ospf-igp, ether-ip, encap, pnni, pim, vrrp, l2tp, stp, ptp, isis, crtp, crudp, sctp, mpls-in-ip, * - udp/tcp wildcard

dscp

Syntax

dscp dscp-name

no dscp

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures a DiffServ Code Point (DSCP) name to be used as an IP filter match criterion.

The no form of the command removes the DSCP match criterion.

Default

no dscp

Parameters

dscp-name

a DSCP name that has been previously mapped to a value using the dscp-name command. The DiffServ Code Point can only be specified by its name.

Values

be|cp1|cp2|cp3|cp4|cp5|cp6|cp7|cs1|cp9|af11|cp11|

af12|cp13|af13|cp15|cs2|cp17|af21|cp19|af22|cp21|

af23|cp23|cs3|cp25|af31|cp27|af32|cp29|af33|cp31|cs4|

cp33|af41|cp35|af42|cp37|af43|cp39|cs5|cp41|cp42|

cp43|cp44|cp45|ef|cp47|nc1|cp49|cp50|cp51|cp52|cp53|

cp54|cp55|nc2|cp57|cp58|cp59|cp60|cp61|cp62|cp63

dst-ip

Syntax

dst-ip {ip-address/mask | ip-address ipv4-address-mask | ip-prefix-list prefix-list-name}

no dst-ip

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command configures a destination IPv4 address range or specifies an IPv4 prefix list configured under the match-list command to be used as an IP filter match criterion. See the 7705 SAR Router Configuration Guide for information about the match-list command.

To match on the destination IP address, specify the address and its associated mask; for example, 10.1.0.0/16. The conventional notation of 10.1.0.0 255.255.0.0 can also be used.

The no form of the command removes the destination IPv4 address or IPv4 prefix list match criterion.

Default

no dst-ip

Parameters

ip-address

the IP prefix for the IP match criterion in dotted-decimal notation

Values

0.0.0.0 to 255.255.255.255

mask

the subnet mask length expressed as a decimal integer

Values

1 to 32

ipv4-address-mask

the dotted-decimal equivalent of the mask length

Values

0.0.0.0 to 255.255.255.255

prefix-list-name

the name of the IPv4 prefix list configured with the match-list command

dst-ip

Syntax

dst-ip {ipv6-address/prefix-length | ipv6-prefix-list ipv6-prefix-list-name}

no dst-ip

Context

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures a destination IPv6 address range or specifies an IPv6 prefix list configured under the match-list command to be used as an IP filter match criterion. See the 7705 SAR Router Configuration Guide for information about the match-list command.

To match on the destination IP address, specify the address and prefix length; for example, 11::12/128.

The no form of the command removes the destination IPv6 address or IPv6 prefix list match criterion.

Default

n/a

Parameters

ipv6-address/prefix-length

the IPv6 address on the interface

Values

ipv6-address:        x:x:x:x:x:x:x:x (eight 16-bit pieces)

                                 x:x:x:x:x:x:d.d.d.d

                                   x:   [0 to FFFF]H

                                   d:   [0 to 255]D

prefix-length:      1 to 128

ipv6-prefix-list-name

the name of the IPv6 prefix list configured with the match-list command

dst-port

Syntax

dst-port tcp/udp port-number [mask]

no dst-port

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command specifies the TCP/UDP port to match the destination port of the packet.

The no form of the command removes the destination port match criterion.

The TCP or UDP protocol must be configured using the match command before this filter can be configured.

Parameters

tcp/udp port-number

the destination port number to be used as a match criterion

Values

[0 to 65535]D

[0x0 to 0xFF]H

[0b0 to 0b1111111111111111]B

mask

the 16-bit mask to be applied when matching the destination port

Values

[0 to 65535]D

[0x0000 to 0xFFFF]H

[0b0000000000000000 to 0b1111111111111111]B

fragment

Syntax

fragment {true | false}

no fragment

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command configures fragmented or non-fragmented IP packets as an IP filter match criterion.

The no form of the command removes the match criterion.

This command applies to IPv4 filters only.

Default

false

Parameters

true

configures a match on all fragmented IP packets. A match occurs for all packets that have either the MF (more fragment) bit set or have the Fragment Offset field of the IP header set to a non-zero value.

false

configures a match on all non-fragmented IP packets. Non-fragmented IP packets are packets that have the MF bit set to zero and have the Fragment Offset field also set to zero.

icmp-code

Syntax

icmp-code icmp-code

no icmp-code

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures matching on an ICMP code field in the ICMP header of an IP packet as an IP filter match criterion.

The ICMP protocol must be configured using the match command before this filter can be configured.

The no form of the command removes the criterion from the match entry.

Default

no icmp-code

Parameters

icmp-code

icmp-code-number or icmp-code-keyword

icmp-code-number

the ICMP code number in decimal, hexadecimal, or binary, to be used as a filter match criterion

Values

[0 to 255]D

[0x0 to 0xFF]H

[0b0 to 0b11111111]B

icmp-code-keyword

the ICMP code keyword to be used as a filter match criterion

Values

For IPv4 filter: none, network-unreachable, host-unreachable, protocol-unreachable, port-unreachable, fragmentation-needed, source-route-failed, dest-network-unknown, dest-host-unknown, src-host-isolated, network-unreachable-for-tos, host-unreachable-for-tos

For IPv6 filter: none, no-route-to-destination, comm-with-dest-admin-prohibited, beyond-scope-src-addr, address-unreachable, port-unreachable

icmp-type

Syntax

icmp-type icmp-type

no icmp-type

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures matching on an ICMP type field in the ICMP header of an IP packet as an IP filter match criterion.

The ICMP protocol must be configured using the match command before this filter can be configured.

The no form of the command removes the criterion from the match entry.

Default

no icmp-type

Parameters

icmp-type

icmp-type-number or icmp-type-keyword

icmp-type-number

the ICMP type number in decimal, hexadecimal, or binary, to be used as a match criterion

Values

[0 to 255]D

[0x0 to 0xFF]H

[0b0 to 0b11111111]B

icmp-type-keyword:

icmp-type-keyword

the ICMP type keyword to be used as a match criterion

Values

For IPv4 filter: none, echo-reply, dest-unreachable, source-quench, redirect, echo-request, router-advt, router-selection, time-exceeded, parameter-problem, timestamp-request, timestamp-reply, addr-mask-request, addr-mask-reply, photuris

For IPv6 filter: none, dest-unreachable, packet-too-big, time-exceeded, parameter-problem, echo-request, echo-reply, multicast-listen-query, multicast-listen-report, multicast-listen-done, router-solicitation, router-advt, neighbor-solicitation, neighbor-advertisement, redirect-message, router-renumbering, icmp-node-info-query, icmp-node-info-resp, inv-nd-solicitation, inv-nd-adv-message, multicast-listener-report-v2, home-agent-ad-request, home-agent-ad-reply, mobile-prefix-solicitation, mobile-prefix-advt, cert-path-solicitation, cert-path-advt, multicast-router-advt, multicast-router-solicitation, multicast-router-termination, fmipv6, rpl-control, ilnpv6-locator-update, duplicate-addr-request, duplicate-addr-confirmation

ip-option

Syntax

ip-option ip-option-value [ip-option-mask]

no ip-option

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command configures matching packets with a specific IP option or a range of IP options in the IP header as an IP filter match criterion.

The option type octet contains 3 fields:

  • 1 bit copied flag (copy options in all fragments)

  • 2 bits option class

  • 5 bits option number

The no form of the command removes the match criterion.

This command applies to IPv4 filters only.

Default

no ip-option

Parameters

ip-option-value

the 8-bit option type (can be entered using decimal, hexadecimal, or binary formats). The mask is applied as an AND to the option byte and the result is compared with the option value.

The decimal value entered for the match should be a combined value of the 8-bit option type field and not just the option number. Therefore, to match on IP packets that contain the Router Alert option (option number = 20), enter the option type of 148 (10010100).

Values

0 to 255

ip-option-mask

specifies a range of option numbers to use as the match criteria

This 8-bit mask can be entered using decimal, hexadecimal, or binary formats as shown in Table: IP Option Formats.

Table: IP Option Formats

Format Style

Format Syntax

Example

Decimal

DDD

20

Hexadecimal

0xHH

0x14

Binary

0bBBBBBBBB

0b0010100

Values

0 to 255

Default

255 (decimal) (exact match)

multiple-option

Syntax

multiple-option {true | false}

no multiple-option

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command configures matching packets that contain more than one option field in the IP header as an IP filter match criterion.

The no form of the command removes the checking of the number of option fields in the IP header as a match criterion.

This command applies to IPv4 filters only.

Default

no multiple-option

Parameters

true

specifies matching on IP packets that contain more than one option field in the header

false

specifies matching on IP packets that do not contain multiple option fields in the header

option-present

Syntax

option-present {true | false}

no option-present

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command configures matching packets that contain the option field or have an option field of 0 in the IP header as an IP filter match criterion.

The no form of the command removes the checking of the option field in the IP header as a match criterion.

This command applies to IPv4 filters only.

Parameters

true

specifies matching on all IP packets that contain the option field in the header. A match occurs for all packets that have the option field present. An option field of 0 is considered as no option present.

false

specifies matching on IP packets that do not have any option field present in the IP header (an option field of 0)

src-ip

Syntax

src-ip {ip-address/mask | ip-address ipv4-address-mask | ip-prefix-list prefix-list-name}

no src-ip

Context

config>system>security>cpm-filter>ip-filter>entry>match

Description

This command specifies the IPv4 address or specifies an IPv4 prefix list configured under the match-list command to be used as a match criterion for an IP filter. See the 7705 SAR Router Configuration Guide for information about the match-list command.

To match on the source IPv4 address, specify the address and its associated mask; for example, 10.1.0.0/16. The conventional notation of 10.1.0.0 255.255.0.0 can also be used.

The no form of the command removes the source IPv4 address or IPv4 prefix list match criterion.

Default

no src-ip

Parameters

ip-address

the IP prefix for the IP match criterion in dotted-decimal notation

Values

0.0.0.0 to 255.255.255.255

mask

the subnet mask length expressed as a decimal integer

Values

1 to 32

ipv4-address-mask

the dotted-decimal equivalent of the mask length

Values

0.0.0.0 to 255.255.255.255

prefix-list-name

the name of the IPv4 prefix list configured with the match-list command

src-ip

Syntax

src-ip {ipv6-address/prefix-length | ipv6-prefix-list ipv6-prefix-list-name}

no src-ip

Context

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures a source IPv6 address range or specifies an IPv6 prefix list configured under the match-list command to be used as a match criterion for an IP filter. See the 7705 SAR Router Configuration Guide for information about the match-list command.

To match on the source IP address, specify the address and prefix length; for example, 11::12/128.

The no form of the command removes the source IP address match criterion.

Default

n/a

Parameters

ipv6-address/prefix-length

the IPv6 address on the interface

Values

ipv6-address:       x:x:x:x:x:x:x:x (eight 16-bit pieces)

                              x:x:x:x:x:x:d.d.d.d

                              x:   [0 to FFFF]H

                              d:   [0 to 255]D

                              prefix-length        1 to 128

ipv6-prefix-list-name

the name of the IPv6 prefix list configured with the match-list command

src-port

Syntax

src-port tcp/udp port-number [mask]

no src-port

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command specifies the TCP/UDP port to match the source port of the packet.

Default

no src-port

Parameters

tcp/udp port-number

the source port number to be used as a match criterion

Values

[0 to 65535]D

[0x0 to 0xFF]H

[0b0 to 0b1111111111111111]B

mask

the 16-bit mask to be applied when matching the source port

Values

[0 to 65535]D

[0x0000 to 0xFFFF]H

[0b0000000000000000 to 0b1111111111111111]B

tcp-ack

Syntax

tcp-ack {true | false}

no tcp-ack

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures matching on the ACK bit being set or reset in the control bits of the TCP header of an IP packet as an IP filter match criterion.

The no form of the command removes the criterion from the match entry.

Default

no tcp-ack

Parameters

true

specifies matching on IP packets that have the ACK bit set in the control bits of the TCP header of an IP packet

false

specifies matching on IP packets that do not have the ACK bit set in the control bits of the TCP header of the IP packet

tcp-syn

Syntax

tcp-syn {true | false}

no tcp-syn

Context

config>system>security>cpm-filter>ip-filter>entry>match

config>system>security>cpm-filter>ipv6-filter>entry>match

Description

This command configures matching on the SYN bit being set or reset in the control bits of the TCP header of an IP packet as an IP filter match criterion.

The SYN bit is normally set when the source of the packet wants to initiate a TCP session with the specified destination IP address.

The no form of the command removes the criterion from the match entry.

Default

no tcp-syn

Parameters

true

specifies matching on IP packets that have the SYN bit set in the control bits of the TCP header

false

specifies matching on IP packets that do not have the SYN bit set in the control bits of the TCP header

renum

Syntax

renum old-entry-id new-entry-id

Context

config>system>security>cpm-filter>ip-filter

config>system>security>cpm-filter>ipv6-filter

Description

This command renumbers existing IP filter entries to resequence filter entries.

Resequencing may be required in some cases because the process is exited when the first match is found and the actions are executed according to the accompanying action command. This requires that entries be sequenced correctly from most to least explicit.

Parameters

old-entry-id

the entry number of an existing entry

Values

1 to 64

where: 1 to 29 are filter entries

30 to 64 are extended filter entries

new-entry-id

the new entry number to be assigned to the old entry

Values

1 to 64

where: 1 to 29 are filter entries

30 to 64 are extended filter entries