<s>
In	O
computer	B-Architecture
networking	I-Architecture
,	O
Layer	B-Application
2	I-Application
Tunneling	I-Application
Protocol	I-Application
(	O
L2TP	B-Application
)	O
is	O
a	O
tunneling	B-Protocol
protocol	I-Protocol
used	O
to	O
support	O
virtual	B-Application
private	I-Application
networks	I-Application
(	O
VPNs	B-Application
)	O
or	O
as	O
part	O
of	O
the	O
delivery	O
of	O
services	O
by	O
ISPs	O
.	O
</s>
<s>
Rather	O
,	O
it	O
provides	O
a	O
tunnel	O
for	O
Layer	O
2	O
(	O
which	O
may	O
be	O
encrypted	O
)	O
,	O
and	O
the	O
tunnel	O
itself	O
may	O
be	O
passed	O
over	O
a	O
Layer	O
3	O
encryption	B-Protocol
protocol	I-Protocol
such	O
as	O
IPsec	B-Protocol
.	O
</s>
<s>
Point-to-Point	B-Protocol
Tunneling	I-Protocol
Protocol	I-Protocol
(	O
PPTP	B-Protocol
)	O
.	O
</s>
<s>
A	O
new	O
version	O
of	O
this	O
protocol	O
,	O
L2TPv3	B-Protocol
,	O
appeared	O
as	O
proposed	O
standard	O
RFC	O
3931	O
in	O
2005	O
.	O
</s>
<s>
L2TPv3	B-Protocol
provides	O
additional	O
security	O
features	O
,	O
improved	O
encapsulation	O
,	O
and	O
the	O
ability	O
to	O
carry	O
data	O
links	O
other	O
than	O
simply	O
Point-to-Point	B-Protocol
Protocol	I-Protocol
(	O
PPP	O
)	O
over	O
an	O
IP	B-Protocol
network	I-Protocol
(	O
for	O
example	O
:	O
Frame	B-Protocol
Relay	I-Protocol
,	O
Ethernet	O
,	O
ATM	O
,	O
etc	O
.	O
</s>
<s>
The	O
entire	O
L2TP	B-Application
packet	O
,	O
including	O
payload	O
and	O
L2TP	B-Application
header	O
,	O
is	O
sent	O
within	O
a	O
User	B-Protocol
Datagram	I-Protocol
Protocol	I-Protocol
(	O
UDP	O
)	O
datagram	O
.	O
</s>
<s>
It	O
is	O
common	O
to	O
carry	O
PPP	O
sessions	O
within	O
an	O
L2TP	B-Application
tunnel	O
.	O
</s>
<s>
L2TP	B-Application
does	O
not	O
provide	O
confidentiality	O
or	O
strong	O
authentication	O
by	O
itself	O
.	O
</s>
<s>
IPsec	B-Protocol
is	O
often	O
used	O
to	O
secure	O
L2TP	B-Application
packets	O
by	O
providing	O
confidentiality	O
,	O
authentication	O
and	O
integrity	O
.	O
</s>
<s>
The	O
combination	O
of	O
these	O
two	O
protocols	O
is	O
generally	O
known	O
as	O
L2TP/IPsec	O
(	O
discussed	O
below	O
)	O
.	O
</s>
<s>
The	O
two	O
endpoints	O
of	O
an	O
L2TP	B-Application
tunnel	O
are	O
called	O
the	O
L2TP	B-Application
access	O
concentrator	O
(	O
LAC	O
)	O
and	O
the	O
L2TP	B-Application
network	I-Application
server	I-Application
(	O
LNS	O
)	O
.	O
</s>
<s>
To	O
be	O
useful	O
for	O
networking	O
,	O
higher-level	O
protocols	O
are	O
then	O
run	O
through	O
the	O
L2TP	B-Application
tunnel	O
.	O
</s>
<s>
To	O
facilitate	O
this	O
,	O
an	O
L2TP	B-Application
session	O
is	O
established	O
within	O
the	O
tunnel	O
for	O
each	O
higher-level	O
protocol	O
such	O
as	O
PPP	O
.	O
</s>
<s>
The	O
traffic	O
for	O
each	O
session	O
is	O
isolated	O
by	O
L2TP	B-Application
,	O
so	O
it	O
is	O
possible	O
to	O
set	O
up	O
multiple	O
virtual	O
networks	O
across	O
a	O
single	O
tunnel	O
.	O
</s>
<s>
The	O
packets	O
exchanged	O
within	O
an	O
L2TP	B-Application
tunnel	O
are	O
categorized	O
as	O
either	O
control	O
packets	O
or	O
data	O
packets	O
.	O
</s>
<s>
L2TP	B-Application
provides	O
reliability	O
features	O
for	O
the	O
control	O
packets	O
,	O
but	O
no	O
reliability	O
for	O
data	O
packets	O
.	O
</s>
<s>
Reliability	O
,	O
if	O
desired	O
,	O
must	O
be	O
provided	O
by	O
the	O
nested	O
protocols	O
running	O
within	O
each	O
session	O
of	O
the	O
L2TP	B-Application
tunnel	O
.	O
</s>
<s>
L2TP	B-Application
allows	O
the	O
creation	O
of	O
a	O
virtual	O
private	O
dialup	O
network	O
(	O
VPDN	B-Application
)	O
to	O
connect	O
a	O
remote	O
client	O
to	O
its	O
corporate	O
network	O
by	O
using	O
a	O
shared	O
infrastructure	O
,	O
which	O
could	O
be	O
the	O
Internet	O
or	O
a	O
service	O
provider	O
's	O
network	O
.	O
</s>
<s>
An	O
L2TP	B-Application
tunnel	O
can	O
extend	O
across	O
an	O
entire	O
PPP	O
session	O
or	O
only	O
across	O
one	O
segment	O
of	O
a	O
two-segment	O
session	O
.	O
</s>
<s>
An	O
L2TP	B-Application
packet	O
consists	O
of	O
:	O
</s>
<s>
Offset	O
Size	O
(	O
optional	O
)	O
Specifies	O
where	O
payload	O
data	O
is	O
located	O
past	O
the	O
L2TP	B-Application
header	O
.	O
</s>
<s>
If	O
the	O
offset	O
field	O
is	O
present	O
,	O
the	O
L2TP	B-Application
header	O
ends	O
after	O
the	O
last	O
byte	O
of	O
the	O
offset	O
padding	O
.	O
</s>
<s>
At	O
the	O
time	O
of	O
setup	O
of	O
L2TP	B-Application
connection	O
,	O
many	O
control	O
packets	O
are	O
exchanged	O
between	O
server	O
and	O
client	O
to	O
establish	O
tunnel	O
and	O
session	O
for	O
each	O
direction	O
.	O
</s>
<s>
Because	O
of	O
the	O
lack	O
of	O
confidentiality	O
inherent	O
in	O
the	O
L2TP	B-Application
protocol	O
,	O
it	O
is	O
often	O
implemented	O
along	O
with	O
IPsec	B-Protocol
.	O
</s>
<s>
This	O
is	O
referred	O
to	O
as	O
L2TP/IPsec	O
,	O
and	O
is	O
standardized	O
in	O
IETF	O
RFC	O
3193	O
.	O
</s>
<s>
The	O
process	O
of	O
setting	O
up	O
an	O
L2TP/IPsec	O
VPN	B-Application
is	O
as	O
follows	O
:	O
</s>
<s>
Negotiation	O
of	O
IPsec	B-Protocol
security	B-Protocol
association	I-Protocol
(	O
SA	O
)	O
,	O
typically	O
through	O
Internet	B-Protocol
key	I-Protocol
exchange	I-Protocol
(	O
IKE	O
)	O
.	O
</s>
<s>
Negotiation	O
and	O
establishment	O
of	O
L2TP	B-Application
tunnel	O
between	O
the	O
SA	O
endpoints	O
.	O
</s>
<s>
The	O
actual	O
negotiation	O
of	O
parameters	O
takes	O
place	O
over	O
the	O
SA	O
's	O
secure	O
channel	O
,	O
within	O
the	O
IPsec	B-Protocol
encryption	O
.	O
</s>
<s>
L2TP	B-Application
uses	O
UDP	O
port	O
1701	O
.	O
</s>
<s>
When	O
the	O
process	O
is	O
complete	O
,	O
L2TP	B-Application
packets	O
between	O
the	O
endpoints	O
are	O
encapsulated	O
by	O
IPsec	B-Protocol
.	O
</s>
<s>
Since	O
the	O
L2TP	B-Application
packet	O
itself	O
is	O
wrapped	O
and	O
hidden	O
within	O
the	O
IPsec	B-Protocol
packet	O
,	O
the	O
original	O
source	O
and	O
destination	O
IP	O
address	O
is	O
encrypted	O
within	O
the	O
packet	O
.	O
</s>
<s>
Also	O
,	O
it	O
is	O
not	O
necessary	O
to	O
open	O
UDP	O
port	O
1701	O
on	O
firewalls	O
between	O
the	O
endpoints	O
,	O
since	O
the	O
inner	O
packets	O
are	O
not	O
acted	O
upon	O
until	O
after	O
IPsec	B-Protocol
data	O
has	O
been	O
decrypted	O
and	O
stripped	O
,	O
which	O
only	O
takes	O
place	O
at	O
the	O
endpoints	O
.	O
</s>
<s>
A	O
potential	O
point	O
of	O
confusion	O
in	O
L2TP/IPsec	O
is	O
the	O
use	O
of	O
the	O
terms	O
tunnel	O
and	O
secure	O
channel	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
L2TP/PPP	O
,	O
it	O
allows	O
L2TP/PPP	O
packets	O
to	O
be	O
transported	O
over	O
IP	O
.	O
</s>
<s>
In	O
L2TP/IPsec	O
,	O
first	O
IPsec	B-Protocol
provides	O
a	O
secure	O
channel	O
,	O
then	O
L2TP	B-Application
provides	O
a	O
tunnel	O
.	O
</s>
<s>
IPsec	B-Protocol
also	O
specifies	O
a	O
tunnel	O
protocol	O
:	O
this	O
is	O
not	O
used	O
when	O
a	O
L2TP	B-Application
tunnel	O
is	O
used	O
.	O
</s>
<s>
Windows	O
has	O
had	O
native	O
support	O
(	O
configurable	O
in	O
control	O
panel	O
)	O
for	O
L2TP	B-Application
since	O
Windows	B-Application
2000	I-Application
.	O
</s>
<s>
Windows	B-Application
Vista	I-Application
added	O
2	O
alternative	O
tools	O
,	O
an	O
MMC	B-Application
snap-in	I-Application
called	O
"	O
Windows	O
Firewall	O
with	O
Advanced	O
Security	O
"	O
(	O
WFwAS	O
)	O
and	O
the	O
"	O
netsh	O
advfirewall	O
"	O
command-line	O
tool	O
.	O
</s>
<s>
Windows	B-Operating_System
10	I-Operating_System
added	O
the	O
""	O
and	O
""	O
PowerShell	B-Application
commands	O
.	O
</s>
<s>
L2TP	B-Application
is	O
often	O
used	O
by	O
ISPs	O
when	O
internet	O
service	O
over	O
for	O
example	O
ADSL	O
or	O
cable	O
is	O
being	O
resold	O
.	O
</s>
<s>
From	O
there	O
on	O
,	O
over	O
an	O
IP	B-Protocol
network	I-Protocol
,	O
an	O
L2TP	B-Application
tunnel	O
runs	O
from	O
the	O
BRAS	O
(	O
acting	O
as	O
LAC	O
)	O
to	O
an	O
LNS	O
which	O
is	O
an	O
edge	O
router	O
at	O
the	O
boundary	O
of	O
the	O
ultimate	O
destination	O
ISP	O
's	O
IP	B-Protocol
network	I-Protocol
.	O
</s>
