Introduction to GTPv1 Message Filtering and GTP Message Types
Learn about GTPv1 message filters, including message-length and message-type filters. This topic explains how devices process GTP packets, apply inspection policies, and enforce security rules.
A GTP packet contains a message body and the GTP, UDP, and the IP headers. A GTP packet is passed or dropped based on the GTP message filters. The GTP messages are filtered based on the message length and message type.
Types of GTP Message Filters
When the device receives a GPRS tunneling protocol (GTP) packet, it checks the packet against policies configured on the device. If the packet matches a policy, the device inspects the packet according to the GTP configuration applied to the policy. If the packet fails to meet any of the GTP configuration parameters, the device will pass or drop the packets based on the configuration of the GTP inspection object.
A GTP packet consists of the message body and three headers: GTP, UDP, and IP. If the resulting IP packet is larger than the maximum transmission unit (MTU) on the transferring link, the sending Serving GPRS Support Node (SGSN) or gateway GPRS support node (GGSN) performs an IP fragmentation.
By default, the device buffers IP fragments until it receives a complete GTP message, and then inspects the GTP message.
GTP Message-Length Filter
Devices can be configured to drop packets outside the allowed minimum or maximum message length. The message length field in the GTP header indicates the size (in octets) of the GTP payload, excluding GTP, UDP, and IP headers.
Default minimum length: 0 bytes
Default maximum length: 65,535 bytes
GTP Message-Type Filter
Devices can permit or deny GTP packets based on their message type. By default, all GTP message types are permitted.Filtering applies at the message type level. Denying one message type (e.g.,
sgsn-context) denies all its related messages (request, response, acknowledge).Message-type filtering can differ by GTP version. For example, a type may be denied in one version but permitted in another.
Example: Set the GTP Message-Length Filter
This example shows how to set the GTP message lengths.
Requirements
No special configuration beyond device initialization is required before configuring this feature.
Overview
In this example, you configure the minimum GTP message length to 8 octets and the maximum GTP message length to 1200 octets for the GTP inspection object.
Configuration
Step-by-Step Procedure
To configure the GTP message lengths:
Specify the GTP profile.
[edit] user@host# set security gtp profile gtp1
Specify the minimum message length.
[edit] user@host# set security gtp profile gtp1 min-message-length 8
Specify the maximum message length.
[edit] user@host# set security gtp profile gtp1 max-message-length 1200
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Supported GTP Message Types
Table 1 lists the GTP messages supported in GTP Releases 1997 and 1999 (including charging messages for GTP) and the message types that you can use to configure GTP message-type filtering.
Message |
Message Type |
Version 0 |
Version 1 |
|---|---|---|---|
create AA pdp context request |
create-aa-pdp |
b |
|
create AA pdp context response |
create-aa-pdp |
b |
|
create pdp context request |
create-pdp |
b |
b |
create pdp context response |
create-pdp |
b |
b |
data record request |
data-record |
b |
b |
data record response |
data-record |
b |
b |
delete AA pdp context request |
delete-aa-pdp |
b |
|
delete AA pdp context response |
delete-aa-pdp |
b |
|
delete pdp context request |
delete-pdp |
b |
b |
delete pdp context response |
delete-pdp |
b |
b |
echo request |
echo |
b |
b |
echo response |
echo |
b |
b |
error indication |
error-indication |
b |
b |
failure report request |
failure-report |
b |
b |
failure report response |
failure-report |
b |
b |
forward relocation request |
fwd-relocation |
b |
b |
forward relocation response |
fwd-relocation |
b |
b |
forward relocation complete |
fwd-relocation |
b |
b |
forward relocation complete acknowledge |
fwd-relocation |
b |
b |
forward SRNS context |
fwd-srns-context |
b |
b |
forward SRNS context acknowledge |
fwd-srns-context |
b |
b |
identification request |
identification |
b |
b |
identification response |
identification |
b |
b |
node alive request |
node-alive |
b |
b |
node alive response |
node-alive |
b |
b |
note MS GPRS present request |
note-ms-present |
b |
b |
note MS GPRS present response |
note-ms-present |
b |
b |
pdu notification request |
pdu-notification |
b |
b |
pdu notification response |
pdu-notification |
b |
b |
pdu notification reject request |
pdu-notification |
b |
b |
pdu notification reject response |
pdu-notification |
b |
b |
RAN info relay |
ran-info |
b |
b |
redirection request |
redirection |
b |
b |
redirection response |
redirection |
b |
b |
relocation cancel request |
relocation-cancel |
b |
b |
relocation cancel response |
relocation-cancel |
b |
b |
send route info request |
send-route |
b |
b |
send route info response |
send-route |
b |
b |
sgsn context request |
sgsn-context |
b |
b |
sgsn context response |
sgsn-context |
b |
b |
sgsn context acknowledge |
sgsn-context |
b |
b |
supported extension headers notification |
supported-extension |
b |
b |
g-pdu |
gtp-pdu |
b |
b |
update pdp context request |
update-pdp |
b |
b |
updated pdp context response |
update-pdp |
b |
b |
version not supported |
version-not-supported |
b |
b |
Example: Filter GTP Message Types
This example shows how to permit and deny GTP message types.
Requirements
No special configuration beyond device initialization is required before configuring this feature.
Overview
In this example, for the gtp1 profile, you configure the device to drop the error-indication and failure-report message types for version 1.
Configuration
Step-by-Step Procedure
To permit and deny GTP message types:
Configure the device.
[edit] user@host# set security gtp profile gtp1
Drop the error indication.
[edit] user@host# set security gtp profile gtp1 drop error-indication 1
Drop the failure report messages.
[edit] user@host# set security gtp profile gtp1 drop failure-report 1
If you are done configuring the device, commit the configuration.
[edit] user@host# commit