<s>
GPRS	B-Protocol
Tunnelling	I-Protocol
Protocol	I-Protocol
(	O
GTP	O
)	O
is	O
a	O
group	O
of	O
IP-based	O
communications	O
protocols	B-Protocol
used	O
to	O
carry	O
general	O
packet	O
radio	O
service	O
(	O
GPRS	O
)	O
within	O
GSM	O
,	O
UMTS	B-Protocol
,	O
LTE	O
and	O
5G	O
NR	O
radio	O
networks	O
.	O
</s>
<s>
In	O
3GPP	O
architectures	O
,	O
GTP	O
and	O
Proxy	B-Protocol
Mobile	I-Protocol
IPv6	I-Protocol
based	O
interfaces	O
are	O
specified	O
on	O
various	O
interface	O
points	O
.	O
</s>
<s>
GTP	O
can	O
be	O
decomposed	O
into	O
separate	O
protocols	B-Protocol
,	O
GTP-C	O
,	O
GTP-U	O
and	O
GTP	O
 '	O
.	O
</s>
<s>
The	O
user	O
data	O
transported	O
can	O
be	O
packets	O
in	O
any	O
of	O
IPv4	B-Protocol
,	O
IPv6	B-Protocol
,	O
or	O
PPP	B-Protocol
formats	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
for	O
carrying	O
charging	O
data	O
from	O
the	O
charging	O
data	O
function	O
(	O
CDF	O
)	O
of	O
the	O
GSM	O
or	O
UMTS	B-Protocol
network	O
to	O
the	O
charging	O
gateway	O
function	O
(	O
CGF	O
)	O
.	O
</s>
<s>
GTP	O
can	O
be	O
used	O
with	O
UDP	B-Protocol
or	O
TCP	B-Protocol
.	O
</s>
<s>
UDP	B-Protocol
is	O
either	O
recommended	O
or	O
mandatory	O
,	O
except	O
for	O
tunnelling	O
X.25	B-Protocol
in	O
version	O
0	O
.	O
</s>
<s>
GTP	O
version	O
1	O
is	O
used	O
only	O
on	O
UDP	B-Protocol
.	O
</s>
<s>
The	O
structure	O
of	O
the	O
messages	O
is	O
the	O
same	O
,	O
with	O
a	O
GTP	O
header	O
following	O
the	O
UDP/TCP	O
header	O
.	O
</s>
<s>
GTPv1	B-Protocol
headers	O
contain	O
the	O
following	O
fields	O
:	O
</s>
<s>
For	O
GTPv1	B-Protocol
,	O
this	O
has	O
a	O
value	O
of	O
1	O
.	O
</s>
<s>
Sequence	B-Protocol
number	I-Protocol
flag	O
(	O
S	O
)	O
a	O
1-bit	O
value	O
that	O
states	O
whether	O
there	O
is	O
a	O
Sequence	B-Protocol
Number	I-Protocol
optional	O
field	O
.	O
</s>
<s>
Sequence	B-Protocol
number	I-Protocol
an	O
(	O
optional	O
)	O
16-bit	O
field	O
.	O
</s>
<s>
There	O
is	O
no	O
GTPv2-U	O
protocol	O
,	O
GTP-U	O
in	O
LTE	O
also	O
uses	O
GTPv1-U	O
.	O
</s>
<s>
TEID	O
flag	O
If	O
this	O
bit	O
is	O
set	O
to	O
1	O
then	O
the	O
TEID	O
field	O
will	O
be	O
present	O
between	O
the	O
message	O
length	O
and	O
the	O
sequence	B-Protocol
number	I-Protocol
.	O
</s>
<s>
The	O
TEID	O
(	O
if	O
present	O
)	O
and	O
the	O
Sequence	B-Protocol
Number	I-Protocol
shall	O
be	O
included	O
in	O
the	O
length	O
count	O
.	O
</s>
<s>
Apart	O
from	O
the	O
two	O
messages	O
previously	O
mentioned	O
,	O
there	O
are	O
no	O
other	O
messages	O
common	O
across	O
all	O
GTP	O
variants	O
meaning	O
that	O
,	O
for	O
the	O
most	O
part	O
,	O
they	O
effectively	O
form	O
three	O
completely	O
separate	O
protocols	B-Protocol
.	O
</s>
<s>
This	O
is	O
a	O
UDP	B-Protocol
message	O
on	O
port	O
2123	O
.	O
</s>
<s>
GTP-U	O
is	O
,	O
in	O
effect	O
a	O
relatively	O
simple	O
IP	B-Protocol
based	O
tunnelling	B-Protocol
protocol	I-Protocol
which	O
permits	O
many	O
tunnels	O
between	O
each	O
set	O
of	O
end	O
points	O
.	O
</s>
<s>
When	O
used	O
in	O
the	O
UMTS	B-Protocol
,	O
each	O
subscriber	O
will	O
have	O
one	O
or	O
more	O
tunnel	O
,	O
one	O
for	O
each	O
PDP	O
context	O
that	O
they	O
have	O
active	O
,	O
as	O
well	O
as	O
possibly	O
having	O
separate	O
tunnels	O
for	O
specific	O
connections	O
with	O
different	O
quality	O
of	O
service	O
requirements	O
.	O
</s>
<s>
This	O
happens	O
on	O
UDP	B-Protocol
port	O
2152	O
.	O
</s>
<s>
The	O
GTPv1-U	O
protocol	O
is	O
used	O
to	O
exchange	O
user	O
data	O
over	O
GTP	O
tunnels	O
across	O
the	O
Sx	O
interfaces	O
.	O
</s>
<s>
An	O
IP	B-Protocol
packet	O
for	O
a	O
UE	O
(	O
user	O
endpoint	O
)	O
is	O
encapsulated	O
in	O
an	O
GTPv1-U	O
packet	O
and	O
tunnelled	O
between	O
the	O
P-GW	O
and	O
the	O
eNodeB	O
for	O
transmission	O
with	O
respect	O
to	O
a	O
UE	O
over	O
S1-U	O
and	O
S5/S8	O
interfaces	O
.	O
</s>
<s>
GTP	O
 '	O
uses	O
TCP/UDP	O
port	O
3386	O
.	O
</s>
<s>
It	O
is	O
the	O
protocol	O
which	O
allows	O
end	O
users	O
of	O
a	O
GSM	O
or	O
UMTS	B-Protocol
network	O
to	O
move	O
from	O
place	O
to	O
place	O
whilst	O
continuing	O
to	O
connect	O
to	O
the	O
Internet	O
as	O
if	O
from	O
one	O
location	O
at	O
the	O
GGSN	O
.	O
</s>
<s>
GGSNs	O
and	O
SGSNs	O
(	O
collectively	O
known	O
as	O
GSNs	O
)	O
listen	O
for	O
GTP-C	O
messages	O
on	O
UDP	B-Protocol
port	O
2123	O
and	O
for	O
GTP-U	O
messages	O
on	O
port	O
2152	O
.	O
</s>
<s>
The	O
Charging	O
Gateway	O
Function	O
(	O
CGF	O
)	O
listens	O
to	O
GTP	O
 '	O
messages	O
sent	O
from	O
the	O
GSNs	O
on	O
TCP/UDP	O
port	O
3386	O
.	O
</s>
<s>
GTP	O
can	O
be	O
used	O
with	O
UDP	B-Protocol
or	O
TCP	B-Protocol
.	O
</s>
<s>
GTP	O
version	O
1	O
is	O
used	O
only	O
on	O
UDP	B-Protocol
.	O
</s>
<s>
In	O
version	O
0	O
,	O
the	O
signalling	O
protocol	O
(	O
the	O
protocol	O
which	O
sets	O
up	O
the	O
tunnels	O
by	O
activating	O
the	O
PDP	O
context	O
)	O
is	O
combined	O
with	O
the	O
tunnelling	B-Protocol
protocol	I-Protocol
on	O
one	O
port	O
.	O
</s>
<s>
Versions	O
1	O
and	O
2	O
are	O
each	O
effectively	O
two	O
protocols	B-Protocol
,	O
one	O
for	O
control	O
(	O
called	O
GTP-C	O
)	O
and	O
one	O
for	O
user	O
data	O
tunneling	O
(	O
called	O
GTP-U	O
)	O
.	O
</s>
<s>
GTP-U	O
is	O
also	O
used	O
to	O
transport	O
user	O
data	O
from	O
the	O
RNC	O
to	O
the	O
SGSN	O
in	O
UMTS	B-Protocol
networks	O
.	O
</s>
<s>
options	O
were	O
provided	O
for	O
transporting	O
X.25	B-Protocol
;	O
</s>
<s>
the	O
fixed	O
port	O
number	O
3386	O
was	O
used	O
for	O
all	O
functions	O
(	O
not	O
just	O
charging	O
as	O
in	O
GTPv1	B-Protocol
)	O
;	O
</s>
<s>
TCP	B-Protocol
was	O
allowed	O
as	O
a	O
transport	O
option	O
instead	O
of	O
UDP	B-Protocol
,	O
but	O
support	O
for	O
this	O
was	O
optional	O
;	O
</s>
<s>
Fortunately	O
,	O
however	O
the	O
use	O
of	O
different	O
port	O
numbers	O
allows	O
easy	O
blocking	O
of	O
version	O
0	O
through	O
simple	O
IP	B-Protocol
access	O
lists	O
.	O
</s>
<s>
With	O
the	O
creation	O
of	O
the	O
UMTS	B-Protocol
standards	O
this	O
was	O
moved	O
over	O
to	O
the	O
3GPP	O
which	O
,	O
maintains	O
it	O
as	O
3GPP	O
standard	O
29.060	O
.	O
</s>
<s>
Later	O
versions	O
of	O
TS	O
29.060	O
deprecate	O
GTPv1/v0	O
interworking	O
such	O
that	O
there	O
is	O
no	O
fallback	O
in	O
the	O
event	O
that	O
the	O
GSN	O
does	O
not	O
support	O
the	O
higher	O
version	O
.	O
</s>
<s>
GTPv2	O
offers	O
fallback	O
to	O
GTPv1	B-Protocol
via	O
the	O
earlier	O
"	O
Version	O
Not	O
Supported	O
"	O
mechanism	O
but	O
explicitly	O
offers	O
no	O
support	O
for	O
fallback	O
to	O
GTPv0	O
.	O
</s>
