4 Protocol Examples
The following example shows the sequence of messages exchanged when a machine running Windows Vista operating system with Service Pack 1 (SP1) (name: "testclient.contoso.com") with IP address 1.1.1.1 (client 100 megabits per second connection) establishes a PPTP tunnel with a machine running Windows Server 2008 operating system (name: "testserver.contoso.com") with IP address 2.2.2.2 (server, 100 megabits per second connection).
In this example, the machine "testclient.contoso.com" is PAC and the machine "testserver.contoso.com" is PNS.
-
In this example, PAC initiates the tunnel establishment process. A TCP connection with source IP address 1.1.1.1 and dynamically chosen (ephemeral) source port to destination IP address 2.2.2.2 and destination port 1723 (by default) is established to begin the tunnel establishment process. Start-Control-Connection-Request The Start-Control-Connection-Request is a PPTP control message used to establish the control connection between a PNS and a PAC. Each PNS-PAC pair requires a dedicated control connection to be established. The establishment of the control connection can be initiated by either the PNS or PAC. The details of the PPTP packet are as follows. Packet Fields: Length: set to 156 (0x9C). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 1 (Start-Control-Connection-Request) Reserved0: Set to 0 Protocol Version: Set to 0x0100 (version 1, revision 0) Reserved1: Set to 0 Framing Capabilities: Set to 1 (Asynchronous Framing) Bearer Capabilities: Set to 1 (Analog access) Maximum Channels: Set to 0 Firmware Revision: Set to 0 Host Name: This field (64 bytes) is filled with octets of value 0 Vendor Name: The first nine octets are set as 0x4D 0x69 0x63 0x72 0x6F 0x73 0x6F 0x66 0x74 (Microsoft) The remaining 55 octets are filled with value 0. Start-Control-Connection-Reply The Start-Control-Connection-Reply is a PPTP control message sent in reply to a received Start-Control-Connection-Request message. The details of the PPTP packet are as follows. Packet Fields: Length: set to 156 (0x9C). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 2 (Start-Control-Connection-Reply) Reserved0: Set to 0 Protocol Version: Set to 0x0100 (version 1, revision 0) Result Code: Set to 1 (Successful) Error Code: Set to 0 (None) Framing Capabilities: Set to 1 (Asynchronous Framing) Bearer Capabilities: Set to 1 (Analog access) Maximum Channels: Set to 0 Firmware Revision: Set to 0 Host Name: This field (64 bytes) is filled with octets of value 0 Vendor Name: The first nine octets are set as 0x4D 0x69 0x63 0x72 0x6F 0x73 0x6F 0x66 0x74 (Microsoft) The remaining 55 octets are filled with value 0. Outgoing-Call-Request The Outgoing-Call-Request is a PPTP control message sent by the PNS to the PAC to indicate that an outbound call from the PAC is to be established. Packet Fields: Length: set to 168 (0xA8). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 7 (Outgoing-Call-Request) Reserved0: Set to 0 Call ID: 64234 (0xFAEA) Call Serial Number: 1 Minimum BPS: 300 (0x12C) Maximum BPS: 100000000 (0x5F5E100) Bearer Type: 3(Any type of channel) Framing Type: 3(Any type of framing) Packet Recv. Window Size: 64 (0x40) Packet Processing Delay: 0 Phone Number Length: 0 Reserved1: 0 Phone Number: The field is filled with octets of value 0 Subaddress: (All hex values) E3 57 2A 57 E0 A2 BD 41 B8 26 F1 45 41 06 F2 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The first 16 octets of this field are filled with a GUID (Correlation ID). The remainder of this field is filled with octets of value 0. Outgoing-Call-reply The Outgoing-Call-Reply is a PPTP control message sent by the PAC to the PNS in response to a received Outgoing-Call-Request message. The reply indicates the result of the outgoing call attempt. Packet Fields: Length: set to 32 (0x20). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 8 (Outgoing-Call-Reply) Reserved0: Set to 0 Call ID: 58378 (0xE40A) Peer's Call ID: 64234 (0xFAEA) Result Code: 1(Connected) Error Code: 0 (None) Cause Code: 0 Connect Speed: 5317890 (0x512502) Packet Recv. Window Size: 16384 (0x4000) Packet Processing Delay: 0 Physical Channel ID: 0 GRE-Packet GRE packets are used to carry the PPP session (control and data). IP Header: Versions: 4 (IPv4) Header Length = 20 (5) Differentiated Services Field: DSCP: 0, ECN: 0 Total Length: 48 (0x30) Identification: 9665 (0x25C1) Fragment Flags: 0 (0x0) Reserved: (0...............) DF: (.0..............) May Fragment MF: (..0.............) Last fragment Fragment Offset:(...0000000000000) First fragment Time To Live: 126 (0x7E) Next Protocol: 47(0x2f, GRE, General Routing Encapsulation) Checksum: 22225 (0x56D1) Source Address: 1.1.1.1 Destination Address: 2.2.2.2 GRE Enhanced Header: flags: 0x3081 C: (0...............) Checksum Absent R: (.0..............) Offset Absent K: (..1.............) Key Present S: (...1............) Sequence Number Present ssr: (....0...........) Strict Source Route Absent Recur: (.....000........) Recursion Control A: (........1.......) Acknowledgment sequence number Present Reserved Flags: (.........0000...) Version: (.............001) 1 Next Protocol: PPP (0x880B) Payload Length: 12 (0xC) Call ID: 64234 (0xFAEA) Sequence Number: 15 (0xF) Acknowledgment Number: 15 (0xF) Call-Clear-Request The Call-Clear-Request is a PPTP control message sent by the PNS to the PAC indicating that a particular call is to be disconnected. Packet Fields: Length: set to 32 (0x20). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 12 (Call-Clear-Request) Reserved0: Set to 0 Call ID: 64234 (0xFAEA) Reserved1: 0 Call-Disconnect-Notify The Call-Disconnect-Notify message is a PPTP control message sent by the PAC to the PNS. It is issued whenever a call is disconnected, due to the receipt by the PAC of a Call-Clear-Request or for any other reason. Packet Fields: Length: set to 148 (0x94). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 13 (Call-Disconnect-Notify) Reserved0: Set to 0 Call ID: 58378 (0xE40A) Result Code: 0 (Undefined) Error Code: 0 Cause Code: 0 Call Statistics: This field is filled with 128 octets of value 0. Stop-Control-Connection-Request The Stop-Control-Connection-Request is a PPTP control message sent by one peer of a PAC-PNS control connection to inform the other peer that the control connection should be closed. Packet Fields: Length: set to 16 (10). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 3 (Stop-Control-Connection-Request) Reserved0: Set to 0 Reason: 1 (None) Reserved1: 0 Reserved2: 0 Stop-Control-Connection-Reply The Stop-Control-Connection-Reply is a PPTP control message sent by one peer of a PAC-PNS control connection upon receipt of a Stop-Control-Connection-Request from the other peer. Packet Fields: Length: set to 16 (10). PPTP Message Type: Set to 1 (Control Message) Magic Cookie: Set to 0x1A2B3C4D Control Message Type: Set to 4 (Stop-Control-Connection-Reply) Reserved0: Set to 0 Result Code: 1 (OK) Error Code: 0 Reserved1: 0