Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Microsoft Corporation
September 2000
Summary:This paper defines the Point-to-Point (PPP) and Point-to-Point Tunneling Protocol (PPTP) protocols, explains how they are supported in Microsoft Windows CE, and illustrates how to establish an Internet connection that uses PPP or PPTP. (8 printed pages)
Introduction
The Point-to-Point Protocol (PPP) and the Point-to-Point
Tunneling Protocol (PPTP), included in the TCP/IP protocol suite,
are protocols used for communications over the Internet. PPP is
widely used for the transmission of TCP/IP packets over dial-up
telephone connections, such as between a computer and the Internet.
PPTP supports virtual private networks (VPNs), which enhance the
security of communication using the Internet. Microsoft Windows CE
version 3.0 provides support for both protocols. This paper defines
both protocols, explains how they are supported in Windows CE, and
illustrates how to establish an Internet connection that uses PPP
or PPTP. PPP specifies an industry-standard suite of control protocols
that were designed to facilitate communication between two
computers through a serial, network, or infrared interface in a
dynamically changing network. A Windows CE–based device running
Remote Access Service (RAS) uses PPP to package data packets from
multiple protocols and forward them to a server over point-to-point
links. PPP is an improvement over the Serial Line Internet Protocol
(SLIP) in its error detection capability and its ability to handle
both synchronous and asynchronous communication. Windows CE
supports IP connections that use PPP. The PPP encryption support in
Windows CE is configurable between 40 bit and 128 bit. PPP relies on configuration parameters and peer-to-peer
negotiation to determine how a specific PPP connection will be
managed. PPP allows two computers that are linked to each other to
negotiate specific features of their connection, such as the
maximum size of datagrams one peer is willing to accept.
Peer-to-peer negotiations occur through packet exchanges between
two computers until both computers have agreed on a set of
parameters under which the connection will operate. PPP provides a
default format for the encapsulation of datagrams, but two peers in
a given link can also establish their own guidelines for PPP
framing. Windows CE 3.0 uses the Network Driver Interface Specification
(NDIS) to implement PPP network connections. In the networking
architecture, PPP is implemented as an NDIS protocol driver. PPP
communicates with the underlying WAN miniport—for example,
AsyncMAC—through the NDIS layer. When PPP receives a WAN packet
from TCP/IP, it passes the packet on to the AsyncMAC miniport.
After receiving a packet from PPP, the AsyncMAC miniport performs
the asynchronous framing and then forwards the packet to the TAPI
device by calling Win32 serial APIs. When receiving a packet
through the network, the AsyncMAC miniport strips the asynchronous
framing off the packet, checks the Cyclic Redundancy Check (CRC),
and passes the packet up to PPP through the NDIS layer. To create a PPP dial-up session between a Windows CE–based
device and a server device, both computers must complete three
distinct phases of negotiation before data can be transferred
between the two devices. The three phases of negotiation are:
PPP uses the Link Control Protocol (LCP) to establish, maintain,
and end the physical connection. Before information can be sent on
a link, each of the two computers that make up the connection must
test the link and agree on a set of parameters under which the link
will operate. During the initial phase of LCP, each computer in a given link
must specify the desired parameters for a PPP connection in a
Configure-Request and submit the request to its peer. If one of the
two computers in a link fails to acknowledge the parameters
received from its peer, the other computer must resubmit a packet
that contains a set of alternate parameters. During the link
authentication phase, the two peers also select which
authentication protocol will be used during the user authentication
phase. The two computers also decide whether they will negotiate
the use of compression and/or encryption. The actual choice of
compression/encryption algorithms and other details occurs during
phase 3. In the second phase, the client computer presents the user's
credentials to the remote access server. A more secure
authentication scheme provides protection against replay attacks
and remote client impersonation. Most implementations of PPP provide limited authentication
methods, typically the Password Authentication Protocol (PAP),
Challenge Handshake Authentication Protocol (CHAP), and Microsoft
Challenge Handshake Authentication Protocol (MS-CHAP).
CHAP is an improvement over PAP in that the clear text password
is not sent over the link. Instead, the password is used to create
an encrypted hash from the original challenge. The server knows the
client's clear text password and can therefore replicate the
operation and compare the result to the password sent in the
client's response. CHAP protects against replay attacks by using an
arbitrary challenge string for each authentication attempt. CHAP
protects against remote client impersonation by unpredictably
sending repeated challenges to the remote client throughout the
duration of the connection.
During phase 2 of the PPP link configuration, the NAS collects
the authentication data and then validates the data against its own
user database or against a central authentication database server,
such as one maintained by a Windows NT Primary Domain Controller
(PDC) or a Remote Authentication Dial-In User Service (RADIUS)
server. Once the previous phases have been completed, PPP invokes the
various Network Control Protocols (NCPs) that were selected during
the link establishment phase (phase 1) to configure protocols used
by the remote client. For example, during this phase, the IP
Control Protocol (IPCP) can assign a dynamic address to the dial-in
user. In Microsoft's implementation of PPP, the Compression Control
Protocol is used to negotiate both data compression (using
Microsoft Point-to-Point Compression) and data encryption (using
MPPE) for the simple reason that both are implemented in the same
routine. Once the three phases of negotiation have been completed, PPP
begins to forward data to and from the client and server. Data is
sent by PPP when IP passes it a packet to transmit. Each
transmitted data packet is wrapped in a PPP header, which is
removed by the receiving computer. If data compression was selected
in phase 1 and negotiated in phase 3, data will be compressed
before transmission. If data encryption was similarly selected and
negotiated, the data (optionally compressed) will be encrypted
before transmission. PPP then passes the packet to the miniport
driver—for example, AsyncMac—which performs appropriate framing and
transmits it to the physical layer. Packet reception is done using
these same steps in reverse order. PPTP is a network protocol that helps to transfer data securely
from a remote client to a private enterprise server, thus creating
a virtual private network (VPN ) by using TCP/IP-based data
networks. PPTP supports multiple network protocols and can be used
for virtual private networking over public and private networks.
PPTP can be used to provide on-demand, virtual networks with
enhanced security by using dial-up lines, local area networks
(LANs), wide area networks (WANs), or the Internet and other public
TCP/IP-based networks. A VPN can be defined as an on-demand connection between two
computers in different locations. It consists of the two computers
(one computer at each end of the connection) and a route, or
tunnel, over a public or private network. To enhance privacy
and secure communication, data transmitted between the two
computers is encrypted by PPP. To implement data encryption, one of
the two authentication schemes—MS-CHAP or MS-CHAPv2—is required,
both of which are supported by Windows CE 3.0. The encrypted data is routed over a dial-up or LAN connection by
a PPTP device. This device is referred to as a
virtual private networkor VPN. PPTP uses the VPN device to
establish and help maintain private, secure communication between
computers. It does this by using RAS and dial-up networking to
communicate over dial-up lines and public or private networks. A Windows CE–based PPTP-client device can connect to a PPTP
server in two ways:
PPTP clients that use an ISP network access server must be
configured with a modem and a VPN device to make the separate
connections to the ISP and the PPTP server. The PPTP client first
establishes a dial-up connection to an ISP over a modem using PPP.
The client device then establishes a VPN connection using PPTP,
over the modem and the ISP connection, to tunnel across the
Internet to a VPN device on the PPTP server. The second connection
requires the first connection because the tunnel between the VPN
devices is established using the modem and PPP connection to the
Internet. The exception to this two-connection requirement is using PPTP
to create a VPN between computers that are physically connected to
the private enterprise network LAN. In this scenario, a PPTP client
is already connected to the network and only uses dial-up
networking with a VPN device to create the connection to a PPTP
server on the LAN. In the Windows CE networking architecture, the PPTP WAN miniport
communicates directly with TCP/IP. After receiving a packet that is
addressed to the private network from TCP/IP, PPP performs the
framing and then forwards the packet to the PPTP WAN miniport. The
PPTP WAN miniport encapsulates the information contained in the
packet header and then reroutes the packet back to TCP/IP. IP then
attaches another header that contains the address of the PPTP
server to the packet and passes the packet on to PPP. PPP forwards
the packet to either the AsyncMAC WAN miniport or a LAN adapter,
such as an NE2000 adapter. After receiving the packet over the
network, the PPTP server strips the IP header off the packet and
routes the packet to the private network.
To establish a PPTP connection
When filling out the
RASENTRYstructure, fill out the
szDeviceType,
szLocalPhoneNumber, and
szDeviceNamefields with these PPTP-specific values:
Fill out all the remaining fields in the
RASENTRYstructure as shown in the
RASENTRYAPI Reference page.
For detailed information on developing distributed applications
that incorporate PPP and PPTP functionality, see the Microsoft
Platform SDK documentation. For information specific to developing
applications on Windows CE–based platforms, see the SDK
documentation for your target platform. ---------------------------------------------
The information contained in this document represents the
current view of Microsoft Corporation on the issues discussed as of
the date of publication. Because Microsoft must respond to changing
market conditions, it should not be interpreted to be a commitment
on the part of Microsoft, and Microsoft cannot guarantee the
accuracy of any information presented after the date of
publication.
This White Paper is for informational purposes only. MICROSOFT
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN
THIS DOCUMENT.
Complying with all applicable copyright laws is the
responsibility of the user. Without limiting the rights under
copyright, no part of this document may be reproduced, stored in or
introduced into a retrieval system, or transmitted in any form or
by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written
permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks,
copyrights, or other intellectual property rights covering subject
matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this
document does not give you any license to these patents,
trademarks, copyrights, or other intellectual property.
© 2000 Microsoft Corporation. All rights reserved.
Microsoft, Win32, Windows, and Windows NT are either registered
trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries.
The names of actual companies and products mentioned herein may
be the trademarks of their respective owners.
What Is PPP?
What Is PPTP?
Differences in Windows CE and Windows 2000
PPP and PPTP Implementations
For More Information
Introduction
What Is PPP?
PPP in Windows CE
Creating a PPP Dial-up Session
Phase 1: PPP Link Establishment
Phase 2: PPP User Authentication
Note A replay attack occurs when
a third party monitors a successful connection and uses captured
packets to play back the remote client's response so that it can
gain an authenticated connection. Remote client impersonation
occurs when a third party takes over an authenticated connection.
The intruder waits until the connection has been authenticated and
then traps the conversation parameters, disconnects the
authenticated user, and takes control of the authenticated
connection.
Phase 3: Invoking Network Layer Protocols
Data Transfer
What Is PPTP?
PPTP in Windows CE
Establishing a PPTP Connection
Field
Value
Description
szDeviceType
RASDT_VPN
Connection through a VPN
szLocalPhoneNumber
Example:"1.2.3.4" or "MyPPTPServerName"
Host name or IP address of PPTP server
szDeviceName
RAS VPN Line 0
Name of the line device
Differences in Windows CE and Windows
2000 PPP and PPTP Implementations
For More Information