<s>
Generic	B-Protocol
Routing	I-Protocol
Encapsulation	I-Protocol
(	O
GRE	O
)	O
is	O
a	O
tunneling	B-Protocol
protocol	I-Protocol
developed	O
by	O
Cisco	O
Systems	O
that	O
can	O
encapsulate	B-Protocol
a	O
wide	O
variety	O
of	O
network	B-Application
layer	I-Application
protocols	O
inside	O
virtual	O
point-to-point	B-Architecture
links	I-Architecture
or	O
point-to-multipoint	O
links	O
over	O
an	O
Internet	B-Protocol
Protocol	I-Protocol
network	B-Application
.	O
</s>
<s>
In	O
conjunction	O
with	O
PPTP	B-Protocol
to	O
create	O
VPNs	B-Application
.	O
</s>
<s>
In	O
conjunction	O
with	O
IPsec	B-Protocol
VPNs	B-Application
to	O
allow	O
passing	O
of	O
routing	O
information	O
between	O
connected	O
networks	O
.	O
</s>
<s>
In	O
A8/A10	O
interfaces	O
to	O
encapsulate	B-Protocol
IP	B-Protocol
data	O
to/from	O
Packet	O
Control	O
Function	O
(	O
PCF	O
)	O
.	O
</s>
<s>
Linux	B-Application
and	O
BSD	B-Operating_System
can	O
establish	O
ad-hoc	O
IP	B-Protocol
over	O
GRE	B-Protocol
tunnels	I-Protocol
which	O
are	O
interoperable	O
with	O
Cisco	O
equipment	O
.	O
</s>
<s>
Distributed	O
denial	O
of	O
service	O
(	O
DDoS	O
)	O
protected	O
appliance	O
to	O
an	O
unprotected	O
endpoint	B-Protocol
.	O
</s>
<s>
Network	B-Application
(	O
GRE-encapsulated	O
)	O
IPv4EncapsulationGRE3	O
.	O
</s>
<s>
Based	O
on	O
the	O
principles	O
of	O
protocol	O
layering	O
in	O
OSI	O
,	O
protocol	O
encapsulation	B-Protocol
,	O
not	O
specifically	O
GRE	O
,	O
breaks	O
the	O
layering	O
order	O
.	O
</s>
<s>
GRE	O
packets	O
that	O
are	O
encapsulated	O
within	O
IP	B-Protocol
directly	O
,	O
use	O
IP	B-Protocol
protocol	I-Protocol
type	B-Protocol
47	I-Protocol
in	O
the	O
IPv4	B-Protocol
header	B-General_Concept
's	O
Protocol	O
field	O
or	O
the	O
IPv6	B-Protocol
header	B-General_Concept
's	O
Next	O
Header	B-General_Concept
field	O
.	O
</s>
<s>
For	O
performance	O
reasons	O
,	O
GRE	O
can	O
also	O
be	O
encapsulated	O
in	O
UDP	B-Protocol
packets	I-Protocol
.	O
</s>
<s>
Better	O
throughput	O
may	O
be	O
achieved	O
by	O
using	O
Equal-cost	B-Protocol
multi-path	I-Protocol
routing	I-Protocol
.	O
</s>
<s>
The	O
extended	O
version	O
of	O
the	O
GRE	O
packet	B-General_Concept
header	I-General_Concept
is	O
represented	O
below	O
:	O
</s>
<s>
C	O
(	O
1	O
bit	O
)	O
Checksum	B-Algorithm
bit	O
.	O
</s>
<s>
Set	O
to	O
1	O
if	O
a	O
checksum	B-Algorithm
is	O
present	O
.	O
</s>
<s>
Protocol	O
Type	O
(	O
16	O
bits	O
)	O
Indicates	O
the	O
ether	B-Protocol
protocol	I-Protocol
type	I-Protocol
of	O
the	O
encapsulated	O
payload	O
.	O
</s>
<s>
(	O
For	O
IPv4	B-Protocol
,	O
this	O
would	O
be	O
hex	O
0800	O
.	O
)	O
</s>
<s>
Checksum	B-Algorithm
(	O
16	O
bits	O
)	O
Present	O
if	O
the	O
C	O
bit	O
is	O
set	O
;	O
contains	O
the	O
checksum	B-Algorithm
for	O
the	O
GRE	O
header	B-General_Concept
and	O
payload	O
.	O
</s>
<s>
A	O
standard	O
GRE	O
packet	B-General_Concept
header	I-General_Concept
structure	O
is	O
represented	O
in	O
the	O
diagram	O
below	O
.	O
</s>
<s>
C	O
(	O
1	O
bit	O
)	O
Checksum	B-Algorithm
bit	O
.	O
</s>
<s>
Set	O
to	O
1	O
if	O
a	O
checksum	B-Algorithm
is	O
present	O
.	O
</s>
<s>
Protocol	O
Type	O
(	O
16	O
bits	O
)	O
Indicates	O
the	O
ether	B-Protocol
protocol	I-Protocol
type	I-Protocol
of	O
the	O
encapsulated	O
payload	O
.	O
</s>
<s>
(	O
For	O
IPv4	B-Protocol
,	O
this	O
would	O
be	O
hexadecimal	O
0x0800	O
;	O
for	O
IPv6	B-Protocol
,	O
it	O
would	O
be	O
0x86DD	O
.	O
)	O
</s>
<s>
Checksum	B-Algorithm
(	O
16	O
bits	O
)	O
Present	O
if	O
the	O
C	O
bit	O
is	O
set	O
;	O
contains	O
the	O
checksum	B-Algorithm
for	O
the	O
GRE	O
header	B-General_Concept
and	O
payload	O
.	O
</s>
<s>
The	O
original	O
GRE	O
RFC	O
defined	O
further	O
fields	O
in	O
the	O
packet	B-General_Concept
header	I-General_Concept
which	O
became	O
obsolete	O
in	O
the	O
current	O
standard	O
:	O
</s>
<s>
C	O
(	O
1	O
bit	O
)	O
Checksum	B-Algorithm
bit	O
.	O
</s>
<s>
Set	O
to	O
1	O
if	O
a	O
checksum	B-Algorithm
is	O
present	O
.	O
</s>
<s>
Protocol	O
Type	O
(	O
16	O
bits	O
)	O
Indicates	O
the	O
ether	B-Protocol
protocol	I-Protocol
type	I-Protocol
of	O
the	O
encapsulated	O
payload	O
.	O
</s>
<s>
Checksum	B-Algorithm
(	O
16	O
bits	O
)	O
Present	O
if	O
the	O
C	O
bit	O
is	O
set	O
;	O
contains	O
the	O
checksum	B-Algorithm
for	O
the	O
GRE	O
header	B-General_Concept
and	O
payload	O
.	O
</s>
<s>
The	O
Point-to-Point	B-Protocol
Tunneling	I-Protocol
Protocol	I-Protocol
(	O
PPTP	B-Protocol
)	O
uses	O
a	O
variant	O
GRE	O
packet	B-General_Concept
header	I-General_Concept
structure	O
,	O
represented	O
below	O
.	O
</s>
<s>
PPTP	B-Protocol
creates	O
a	O
GRE	B-Protocol
tunnel	I-Protocol
through	O
which	O
the	O
PPTP	B-Protocol
GRE	O
packets	O
are	O
sent	O
.	O
</s>
<s>
C	O
(	O
1	O
bit	O
)	O
Checksum	B-Algorithm
bit	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
0	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
0	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
1	O
.	O
</s>
<s>
(	O
All	O
PPTP	B-Protocol
GRE	O
packets	O
carry	O
a	O
key	O
.	O
)	O
</s>
<s>
Set	O
to	O
1	O
if	O
a	O
sequence	O
number	O
is	O
supplied	O
,	O
indicating	O
a	O
PPTP	B-Protocol
GRE	O
data	O
packet	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
0	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
these	O
are	O
set	O
to	O
0	O
.	O
</s>
<s>
Set	O
to	O
1	O
if	O
an	O
acknowledgment	O
number	O
is	O
supplied	O
,	O
indicating	O
a	O
PPTP	B-Protocol
GRE	O
acknowledgment	O
packet	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
these	O
are	O
set	O
to	O
0	O
.	O
</s>
<s>
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
1	O
.	O
</s>
<s>
Protocol	O
Type	O
(	O
16	O
bits	O
)	O
For	O
PPTP	B-Protocol
GRE	O
packets	O
,	O
this	O
is	O
set	O
to	O
hex	O
880B	O
.	O
</s>
<s>
Key	O
Payload	O
Length	O
(	O
16	O
bits	O
)	O
Contains	O
the	O
size	O
of	O
the	O
payload	O
,	O
not	O
including	O
the	O
GRE	O
header	B-General_Concept
.	O
</s>
<s>
Key	O
Call	O
ID	O
(	O
16	O
bits	O
)	O
Contains	O
the	O
Peer	O
's	O
Call	O
ID	O
for	O
the	O
session	B-Application
to	O
which	O
the	O
packet	O
belongs	O
.	O
</s>
