What is the difference between PPP and PDP activation?

Source: Internet
Author: User

From: http://www.mscbsc.com/askpro/question.php? Qid = 16261

PPP is equivalent to the link layer protocol socket, which encapsulates and applies the TCP/IP protocol.
For GPRS internet access, you must first set up PDP, and then establish a PPP connection. After the PPP connection is established, You can transmit TCP/IP,
To transmit TCP/IP data, socket is usually used.

PDP: it is a hardware and software environment for GPRS connection. It specifies the Access Point of the GPRS connection, the connection type IP address or PPP, and there are some other options;

PPP: Point-to-Point Protocol between the terminal and modem, including LCP between the terminal and modem, and server-to-terminal authentication (PAP or chap, this step is not mandatory ),
And network layer negotiation between the terminal and the server (basically ipcp );

Socket: communication between processes. To communicate with a service process on a mobile phone application (customer process), use a socket to communicate with a service process on the server based on the IP address through a fixed TCP or UDP port.
Data Transmission

I would like to add:
In ipcp configuration during PPP negotiation, the terminal uses a modem request to activate the PDP context to obtain an IP address to connect to the network. The APN set in PDP is the network of the terminal.
When the terminal accesses the internet, it must use this gateway. When the client process of the terminal communicates with the server's service process through socket, it is based on this IP address.

Taking the GPRS module as an example, why can I connect to multiple servers through a PPP connection? But can a socket connection be connected to only one server at a time?
As far as I know: from the network side, the most important step for a PPP connection is to obtain the IP address, which is allocated by the ggsn. The ggsn is the gateway from the GPRS network to the Internet, GSM and
The WCDMA protocol specifies that a modem can establish the PDP context with multiple ggsns. You do not know whether the server you are talking about refers to the ggsn.

The socket-Connected Server and ggsn are completely
A socket connects to a server in the Internet. A socket is used for inter-process communication. It binds a process to the top of a TCP/UDP port.
A client socket can only connect to one server socket. It determines that it can only connect to one server.
If you want to write an application, you only need to care about the socket function family. You do not need to consider how GPRS works. It is transparent to you.

Of course, you must pay attention to two items when writing applications.
Things:

1. Check whether GPRS is available. If GPRS cannot be connected at present, it makes no sense to open a socket;

2. Congestion Control. The GPRS speed is not very high. I used to be a friend of the broadband network.
You like to send one thousand bytes of content in each cycle of 1000 cycles in the previous second. You don't know how to die when the network is blocked.

Theoretically, if the TCP/IP address on your platform is complete enough
This does not require GPRS content. You only need to control application scheduling and Flow Control Based on the interfaces on the TCP/IP protocol stack. On a general platform, the TCP/IP protocol stack is "competition ".
Yang edition, so applications often need to read the GPRS status.
If you are writing a GPRS protocol stack, you can simply focus on PDP.

As described above, I intentionally "Ignore" a "very important question"-will the IP address change during mobile phone roaming?
If the GPRS of the mobile phone has not been disconnected for a long time, it will not change. PDP handles this issue. PDP is equivalent to maintaining an invisible network cable. No matter where you go, make sure that your IP address is not
Change. Or you can think that the context mark of PDP is the "MAC address" of the "Network Card" of the mobile phone ". As for how to implement PDP, you should go to the GPRS information.

PPP occurs between PDP and TCP/IP. The introduction of PPP is based on two historical origins:

1. After GPRS provides PDP, how does one port TCP/IP on it? TCP
/IP can certainly be overwritten on PDP, but this is almost a rewrite of TCP/IP. At an earlier stage, there was already a TCP/IP with PPP as the underlying layer. PPP transplantation is better than TCP/IP
Porting is much easier. So someone first transplanted the PPP to the PDP, and then built a layer of TCP/IP on it. PPP is actually a variant of DL (data link layer;

2. (In fact, this
Is the true main source), the initial processor capacity is not enough, after running GPRS, it is impossible to run the TCP/IP protocol stack and application, GPRS acts as the modem, TCP
/IP address and application are at one end of the PC. How can GPRS data be imported into the PC? This is the application of PPP. PC and GPRS
Modem uses a serial port for physical connection. The serial port overwrites the PPP protocol. one end of the PPP is the PDP of the GPRS Modem, and the other end is the data link layer interface of the TCP/IP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.