PPP agreement on the key points of computer network review 2016.6.17

Source: Internet
Author: User

Point-to-Point protocol PPP is currently the most widely used data Link layer protocol.

Features of the 1.PPP protocol:

* * We know that Internet users often need to connect to an ISP to access the Internet, and the PPP protocol is the data Link layer protocol used by computers and ISPs to communicate.

(1) Simple: The receiver receives a frame each, the CRC test, such as the CRC test is correct, take this frame; instead, discard the frame and do nothing else.

(2) Package framing: The PPP protocol must specify special characters as frame delimiters (that is, the characters that mark the beginning and end of a frame) so that the position of the beginning and end of the frame can be accurately found in the bit stream received by the receiving side.

(3) Transparency: PPP protocol must ensure the transparency of data transmission. This means that if there happens to be a combination of bits and frames in the data, it is necessary to take effective measures to solve the problem.

(4) Multiple network layer protocols: The PPP protocol must be able to support the operation of multiple network layer protocols simultaneously on the same physical link.

(5) Multiple types of links: In addition to protocols that support multiple network layers, PPP must be able to operate on multiple types of links. For example, serial (one bit at a time) or parallel (sending multiple bits in parallel at a time), synchronous or asynchronous, low speed or high speed, electrical or optical, switched (dynamic) or non-switched (static) point-to-point links.

**pppoe is a typical example of how PPP protocols can accommodate multiple links. PPPoE is a link-layer protocol used for broadband Internet hosts, which encapsulates PPP frames in an Ethernet frame. Now, even if only one user is using ADSL for broadband Internet access (not shared with other people to the ISP's broadband link), it is also using the PPPoE protocol.

(6) Error detection: The PPP association must be able to detect the frame received at the receiving end, and immediately discard the wrong frame.

(7) Detect Connection Status: PPP protocol must have a mechanism to automatically detect whether the link is in normal working condition.

(8) Maximum Transmission Unit: The PPP protocol must set the standard default value for the Maximum Transfer Unit MTU for each of the type of point-to-point links. The MTU is the maximum length of a data link layer's frame that can load the data portion, rather than the total length of the frame.

(9) Network Layer Address negotiation: The PPP protocol must provide a mechanism for entities that communicate between two network layers (for example, two IP layers) to be able to negotiate to know or be able to configure each other's network layer addresses.

(10) Data compression negotiation: PPP protocol must provide a way to negotiate the use of data compression algorithms

The PPP protocol does not support multipoint lines (that is, one master takes turns and communicates with multiple slave stations on the link), and only point-to-point link traffic is supported. PPP protocol only supports full-link.

Composition of the 2.PPP protocol

(1) A method that encapsulates an IP datagram to a serial link. The PPP protocol supports both asynchronous links (8-bit data without parity), and bit-oriented synchronization links.

(2) A Link Control protocol LCP used to establish, configure, and test the data link connection.

(3) A set of network control Protocol NCP, each of which supports different network layer protocols, such as Ip,osi network layer, DECnet and apptalk, etc.

Frame format for 3.PPP protocol:

(1) The meaning of each field:

* * The first field of the header and the second field at the end are the Flag field F, which is specified as 0x7e (symbol 0x indicates that the characters following it are in hexadecimal notation. hexadecimal 7E binary representation is 01111110);

* * The Address field A in the header is specified as 0xFF (i.e. 11111111) and the control field C is specified as 0x03 (000000011);

* * The fourth field in the header is a 2-byte protocol field. When the Protocol field is 0x0021, the information fields for PPP frames are IP datagrams. For 0xc021, the information field is the data of the PPP Link Control protocol LCP, and 0x8021 indicates that this is the control data of the network layer.

* * The length of the information field is variable, not exceeding 1500 bytes.

* * The first field (2 bytes) in the trailer is the sequence FCS using the CRC frame test.

(2) Byte padding

* * When PPP uses asynchronous transfer, it defines the escape character as 0x7d (that is, 01111101) and fills it with bytes

① converts each 0x7e byte that appears in the Information field to a 2-byte sequence (0x7d,0x5e);

② If a 0x7d byte appears in the Information field (i.e., a bit combination with the same escape character), the 0x7d is transformed into a 2-byte sequence (0x7d,0x5d);

③ if the control character of the ASCII code appears in the Information field (that is, a character with a value less than 0x20), a 0x7d byte is added before the character, and the encoding of the character is changed. For example, the occurrence of a 0x03 (in the control word "transmit end") turns it into a 2-byte sequence (0x7d,0x23).

(3) 0-bit padding

When the **PPP protocol is on the SONET/SDH link, it uses synchronous transmission (a series of bit continuous transfers) rather than asynchronous transmission (character by line), in which case the PPP protocol uses a 0-bit fill method

* * The specific practice of 0-bit padding is:

On the sending side, the entire information field is scanned first, and as long as 5 consecutive 1 are found, fill in a 0 immediately. Therefore, after such a bit-filled data, you can guarantee that there will be no 6 consecutive 1 in the Information field. At the receiving end, when a frame is received, the Flag field F is found to determine the bounds of the frame, and then the bit stream is scanned with hardware. After each discovery of 5 consecutive, the 5 consecutive 1 after the deletion of a 0.

The working status of the 4.PPP protocol:

* * When a user dials in to an ISP, a physical connection from the user's PC to the ISP is established. The user PC sends a series of link Control Protocol LCP groupings (encapsulated into multiple PPP frames) to the ISP in order to establish LCP connections. These groupings and their responses select some of the PPP parameters to be used, followed by network layer configuration, the Network Control Protocol NCP assigns a temporary IP address to the newly accessed user PC, so that the user PC becomes the host with an IP address on the Internet;

* * When the user communication is complete, the NCP releases the network layer connection, reclaims the original assigned IP address, then LCP releases the data link layer connection, and finally releases the physical layer connection.

* * Complete process:

The starting and terminating state of the ①PPP link is always a "link-static" state, when there is no physical layer connection between the user's PC and the ISP's router;

② when the user PC calls the router through the modem (the connection button), the router detects the carrier signal from the modem, and after the physical connection is established, PPP enters the "link establishment" state, which is to establish the LCP connection of the link layer;

③ at this time LCP began to negotiate some configuration options, that is, send LCP configuration request frame, which is a PPP frame, its Protocol field is set to LCP corresponding code, and the Information field contains a specific configuration request;

The other end of the ④ link can send one of the following types of responses:

* * Configuration Confirmation Frame: all options are accepted;

* * Configure deny frames: All options are understandable but unacceptable;

* * Configure reject Frames: Some of the options are unrecognized or unacceptable and need to be negotiated;

⑤ after the negotiation, the two sides established LCP link, then entered the "identification" state, in this state, only allow to send LCP Protocol packet, identification protocol grouping and monitoring the link quality of the group

* * Authentication method: Password Authentication protocol PAP (the party that needs to initiate the communication sends identity match password); Password Handshake Authentication Protocol CHAP (more complex authentication protocol);

* * The authentication succeeds, then enters the "Network layer protocol"; The authentication fails, then goes to the "link termination" state;

⑥ in the "Network layer Protocol" State, the network control protocol NCP at both ends of the PPP link exchanges network Layer-specific network control groupings based on the different protocols of the network layer;

* * When the network layer is configured, the link enters the "link-open" State for data communication, and the two PPP endpoints of the link can send each other a packet;

* * After the end of the data transfer, a termination request can be made by one end of the link to terminate the link connection, and after receiving the terminating acknowledgement from the other party, the LCP packet is transferred to the "link termination" state.

PPP agreement on the key points of computer network review 2016.6.17

Related Article

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.