Cisco OL-15491-01 User Manual

Page 176

Advertising
background image

A-176

Cisco Content Services Gateway - 2nd Generation Release 2.0 Installation and Configuration Guide

OL-15491-01

Appendix A CSG2 Command Reference

match header

Usage Guidelines

This command is valid only for HTTP and Session Initiation Protocol (SIP).

You can use more than one match header command in CSG2 map configuration mode to specify
multiple header match patterns for a header map as follows:

You can configure more than one match header command in a given header map, but they must
reference different headers.

For example, the following is a valid configuration, because the first match header command
references header Host and the other references header User-Agent:

ip csg map HDR1

match header Host www.cisco.com

match header User-Agent myagent

But the following is not a valid configuration, because both match header commands reference
header Host:

ip csg map HDR1

match header Host www.cisco.com

match header Host my.cisco.com

If a flow matches all of a map’s header match patterns, then the CSG2 accepts and processes the
flow (unless another map associated with the flow does not match, of course).

If a flow does not match even one of a map’s header match patterns, then the match fails and the
CSG2 does not accept or process the flow.

The CSG2 treats each header match pattern as a double-wildcard match, which means that a header
match pattern that includes even a single wildcard, such as match header host* 1.2.3.4, is treated
as a triple-wildcard match. You can include more than one wildcard in a CSG2 header match pattern,
but doing so greatly increases the memory used for pattern-matching, effectively limiting the
number of match patterns that the CSG2 can ultimately support. Therefore, we highly recommend
against the use of multiple wildcards in match patterns.

By default, the header match patterns are case-sensitive. For example, if you define the following
header match pattern:

match header host1 *.2.*.44

but the actual HTTP header keyword is HOST1, then the match fails and the CSG2 does not accept
or process the flow.

If you do not want the header match patterns to be case-sensitive, configure the no ip csg
case-sensitive
command.

You can specify up to 8192 match patterns.

The following table shows and describes the special characters that you can use in the value argument
in header match patterns.

Convention Description

*

Zero or more characters.

+

Zero or more repeated instances of the token preceding the +.

?

Zero or one character.

Advertising