PPP

Point to Point Protocol
unfold10 entries with the same name
Collect
Check out my collection
0 Useful +1
0
This entry is reviewed by the "Science China" science encyclopedia entry compilation and application work project.
Peer-to-peer protocol ( Point to Point Protocol , PPP) is in Point-to-point connection Over transport multiprotocol Data packet Provide a Standard method . PPP was originally designed for use between two peers IP Traffic transmission provides an encapsulation protocol. in TCP -IP protocol set It is used Synchronous modulation conjunctive Data link layer protocol (Layer 2 in the OSI pattern), replacing the original non-standard Layer 2 protocol, i.e SLIP . PPP can carry other protocols besides IP, including DECnet and Novell Internet packet switching IPX ).
Chinese name
Peer-to-peer protocol
Foreign name
Point to Point Protocol
class
Data link layer protocol
Ask for
Simple, encapsulated into frames
Write briefly
PPP

intro

broadcast
EDITOR
Point-to-point protocol ( Point to Point Protocol , PPP) is for transmission between equivalent units Data packet So simple Link design the Link layer Agreement. [1] This link provides Full duplex Operation, and pass the packets in order. Designed primarily to be used by dialing or Private line mode Set up Point-to-point connection Send data to make it into various hosts, Network bridge A common solution for simple connections to and from routers. PPP has the following functions:
(1) PPP has Dynamic allocation IP The ability of the address to allow negotiation at connection time IP address ;
(2) PPP supports various types Network protocol , for example TCP/IP , NetBEUI , NWLINK Etc.;
(3) PPP has error detection capability, but does not have error correction capability, so ppp is not reliable Transport protocol ;
(4) None retransmission The network overhead is small and the speed is fast.
(5) PPP has Identity authentication Features.
(6) PPP can be used on many types of physical media, including serial cable, Telephone line PPP is also used for Internet access.

Frame format

broadcast
EDITOR
PPP frame format
fields
7E
FF
03
agreement
Message
FCS
7E
byte
1
1
1
2
x
2
1
PPP uses 7EH as the start and end of a frame (F); Where address fields (A) and Control domain (C) Take A fixed value (A=FFH, C=03H); The protocol domain (two bytes) is represented by 0021H IP 8021H represents network control data and C021H represents link control data. Frame check field ( FCS Also for two bytes, it is used for pairs Information domain The verification of. If 7EH appears in the information field, it is converted to two characters (7DH, 5EH). When 7DH appears in the information field, it is converted to (7DH, 5DH). when Information flow Appear in ASCII Code's Control character (less than 20H), that is, a 7DH character is added before this character.

Partial composition

broadcast
EDITOR
Encapsulation: An encapsulation of multiple protocols datagram The way. PPP encapsulation offers a difference Network layer protocol Simultaneously transmitted on the same link Multiplexing technology . The PPP package is carefully designed to remain on most common hardware compatibility And overcame the SLIP deficiency A multi-purpose, point-to-point protocol that it provides WAN Data link Encapsulated services are similar to closed services provided by a LAN. So, PPP doesn't just provide Frame demarcation , and provides protocol identification and bit levels integrality Check the service.
Link control protocol (LCP) : An extended link control protocol used to build, configure, test, and manage Data link connection .
Network control protocol (NCP) : negotiates the packets transmitted on the link Data packet Format and type, establish and configure different network layer protocols;
Configuration: Use links Control protocol The simple and homemade mechanism. This mechanism is also applied to other control protocols, such as Network Control Protocol (NCP).
In order to establish Point-to-point link Communication: Each end of a PPP link must first send LCP packets for setup and testing Data link . After the link is established and the optional functions required for the LCP are selected, PPP must send NCP packets to select and configure one or more network layer protocols. Once each selected network layer protocol has been set, datagrams from each network layer protocol can be sent over the link.
The link will remain in the communication Settings until LCP and NCP packets close the link, or when some external event (e.g., resting state) occurs timer Expiration or Network administrator Interference).
Should be used: Suppose the same is true Windows 98 And has been created" Dial connection ". Then you can set the PPP protocol by the following method: First, open the "Dialup connection" property, also select" Server type " TAB ; Then, select the default "PPP: Internet, Windows NT Server, Windows 98 ", you can set other function options of the protocol in the advanced options; Finally, click the "OK" button.

Work flow

broadcast
EDITOR
Speech flow
Be a user Dial access ISP When the router modem Confirm the dial and create a message Physical connection (Bottom up). The PC sends a series of messages to the router LCP Grouping (encapsulated into multiple PPP frames).
Select some PPP parameters for these packets and their responses, and configure them at the network layer (PAP or CHAP authentication must be passed before). NCP Assign a temporary IP address to the newly connected PC so that the PC becomes a host on the Internet.
When the communication is complete, NCP releases the network layer connection and retrieves the originally assigned IP address. Then the LCP is released Data link layer Connect. The last release is Physical layer The connection of.

Features and authentication methods

broadcast
EDITOR
peculiarity
PPP is a point-point-point Serial communication protocol . PPP has processing error detection, supports multiple protocols, allows IP address negotiation at connection time, and allows Identity authentication Such features, and others. PPP provides three types of functions: framing; Link control Protocol (LCP); Network Control Protocol (NCP). PPP is a character-oriented protocol.
Field name table
Flag field
Address field
Control field
agreement
Information section
FCS
Flag field
PPP is a multi-protocol framing mechanism, which is suitable for modem HDLC bit sequence lines, SONET and others Physical layer Use on. It supports error detection, option negotiation, header compression, and the use of HDLC type frame formats (optional) Reliable transmission . PPP provides three types of functionality:
1 Frame: It can unambiguously separate the start and end of a frame.
2 Link Control: There is a link control protocol called LCP that supports both synchronous and asynchronous lines, as well as byte-oriented and bit-oriented Encoding mode , can be used to start routes, test routes, negotiate parameters, and close lines. Link Control Protocol (LCP) Establishes point-to-point links, which is the actual working part of PPP. The LCP sits above the physical layer and is responsible for establishing, configuring, and testing data link connections. The LCP is also responsible for negotiating and setting control options on the WAN data link, which are handled by the NCP.
3 Network control : Has a method for negotiating network layer options, and the negotiation method is independent of the network layer protocol used. PPP allows multiple network protocols to share a single link, and the Network Control Protocol (NCP) is responsible for connecting PPP (Layer 2) and network protocols (Layer 3). PPP uses a separate NCP for each network layer protocol used To connect . For example, IP uses the IP Control Protocol (IP Control Protocol) IPCP ), used by IPX Novell IPX Control Protocol (IPXCP).
Authentication mode
One is PAP and the other is CHAP. PAP authentication is less secure than CHAP authentication. PAP is transmitting. password Is plaintext, and CHAP is Transmission process It does not transmit the password. Instead, it is hash ( Hash value ). PAP authentication is achieved through two handshakes, while CHAP authentication is passed Three-way handshake Realized. In PAP authentication, the called party makes a connection request and the calling party responds. In CHAP mode, the calling party sends a request, and the called party replies with a packet containing the random hash value sent by the calling party. After confirming the error in the database, the calling party sends a packet indicating that the connection is successful.

demand

broadcast
EDITOR
Simple: cause IETF In design Internet architecture When, put the most complicated part in TCP Protocol, Internet protocol IP It's relatively simple, so yes Data link layer No error correction, no serial number, and no need Flow control . Simplicity is the first requirement
A simple design can also be that the protocol is not error-prone when implemented, so that different vendors have different implementations of the protocol interoperability It's improved.
encapsulation framing : The PPP agreement must specify Special character Act as Frame delimiter (a character that marks the beginning and end of a frame) so that the receiving end can receive from it Bit stream It can find out exactly where the frame starts and ends.
Transparency: The PPP protocol must be guaranteed Data transmission Transparency. (That is, if the data happens to have the same bit combination as the frame delimiter, effective measures should be taken to solve this problem.)
variety Network layer protocol The PPP protocol must be able to support multiple network layer protocols (such as IP and IP) on the same physical link IPX Etc.) operation [2] .
when Point-to-point link When connecting to a LAN or router, the PPP protocol must also support various network layer protocols running on the LAN or router to which the link is connected.
Multiple types of links: In addition to supporting multiple network layer protocols, PPP must be able to run on multiple types of links.
Error detection The PPP protocol must be able to detect the frames received by the receiver and immediately discard the frames with errors.
Connection status detection: The PPP protocol must have a mechanism to automatically detect whether the link is in the normal state in a timely manner Working condition .
Maximum transport unit (MTU) : PPP protocols must set the MTU standard for each type of point-to-point link Default value (At least 1500 bytes). If the packet sent by the high-level protocol is too long and exceeds the MTU value, PPP discards such a frame and returns an error. MTU is the maximum length of the data portion that a frame at the data link layer can load, rather than the total length of the frame.
Network layer address Negotiation: The PPP protocol must provide a mechanism to enable communication between the two Network layer (For example, two IP layer Entities can know or configure each other's network layer addresses through negotiation. The negotiation algorithm should be as simple as possible and be able to reach a negotiated result in all cases.
Data compression Negotiation: PPP protocols must provide a way to negotiate the use of data compression algorithms, but PPP protocols do not require that data compression algorithms be standardized. in The TCP/IP protocol family Medium, reliable transport by Transport layer Therefore, PPP at the data link layer does not need to perform error correction, serial number setting, or traffic control. The PPP protocol is not supported Multipoint line (that is, a Master station Alternate and multiple on the link Slave station To communicate), but only supported peer-to-peer In addition, the PPP protocol is only supported Full duplex Link. [3]

Configuration method

broadcast
EDITOR

Basic configuration

1. Enable ppp
RouterTest#config terminal
Enter configuration commands,one per line. End with CNTL/Z.
RouterTest(config)#interface serial 0/0
RouterTest(config-if)#encapsulation ppp
RouterTest(config-if)#
2, the address configuration command
RouterTest(config-if)#ip address 10.1.1.1 255.255.255.0
PAP configuration instance
Router(config)# hostname RouterA
RouterA(config)#RouterB password itsasecret
RouterA(config)#interface Async 0
RouterA(config-if)#encapsulation ppp
RouterA(config-if)#ip address 10.0.0.1 255.255.255.0
RouterA(config-if)#dialer-map ip 10.0.0.2 name RouterB 5551234
RouterA(config-if)#username RouterA password itsasecret2
Router(config)#hostname RouterB
RouterB (config)#RouterA password itsasecret
RouterB (config)#interface Async 0
RouterB (config-if)#encapsulation ppp
RouterB (config-if)#ip address 10.0.0.2 255.255.255.0
RouterB (config-if)#dialer-map ip 10.0.0.1 name RouterA 5551234
RouterB (config-if)#username RouterB password itsasecret2

CHAP configuration instance

Router(config)#hostname RouterA
RouterA(config)#RouterB password itsasecret
RouterA(config)#interface Async 0
RouterA(config-if)dialer in-band
RouterA(config-if)#encapsulation ppp
RouterA(config-if)#ppp authentication chap
RouterA(config-if)#ip address 10.0.0.1 255.255.255.0
RouterA(config-if)#dialer-map ip 10.0.0.2 name RouterB 5551234
RouterA(config-if)#username RouterA password itsasecret2
Router(config)#hostname RouterB
RouterB (config)#RouterA password itsasecret
RouterB (config)#interface Async 0
RouterB(config-if)dialer in-band
RouterB (config-if)#encapsulation ppp
RouterB (config-if)#ppp authentication chap
RouterB (config-if)#ip address 10.0.0.2 255.255.255.0
RouterB (config-if)#dialer-map ip 10.0.0.1 name RouterA 5551234
RouterB (config-if)#username RouterB password itsasecret2

CHAP and PAP

Router(config-if)#ppp authentication chap pap
Configure PPP callback

Use compression

cisco Supported compression methods:
Predictor: Determine if your data has been compressed. If the data is compressed, it is sent immediately without wasting time compressing the already compressed data.
Stacker: One based on Lempel-Ziv(LZ) Compression algorithm For each Data type , only send once about it in Data stream The location of... The receiver reorganizes the data flow based on this information.
MPPC: The MPPC protocol (RFC2118) enables cisco routers to communicate with microsoft The client exchanges the compressed data using a compression algorithm based on LZ
TCP masthead Compression: Also called Van Jacobson compression, it is only used to compress tcp headers.

Configuration compression

Router(config)#interface serial2
Router(config-if)# compress { predictor |stac|mppc}
Or
Router(config)#interface async
Router(config-if)#ip tcp header-compression
Or
Router(config)#interface async
Router(config-if)#ip tcp header-compression passive
This command tells routers to use tcp header compression only after receiving a compressed header from the other party.
multilink PPP
By using multi-link PPP, you can bundle multiple connections into one virtual connection.
Router(config-if)#ppp multilink
Router(config-if)#dialer load-threshold load [ outbound | inbound | either ]
The dialer load-threshol load command specifies under what circumstances more B channel Added to the MLP link bundle. When the total load of all B channels exceeds the specified Threshold value After dialing interface ( BRI Or PRI) adds a channel to a multilink bundle.
Similarly, if the total load falls below the threshold, the B channel will be removed.
The load parameter is the average load of the interface, which ranges from 1 (no load) to 255 (full load).
Parameter outbound ( Default value Specify that only outbound data flows are considered when calculating loads; The inbound parameter specifies that only inbound data flows are considered; either When specifying the load to calculate, select the larger of the outbound and inbound loads.

Troubleshooting command

broadcast
EDITOR
debug ppp negotiation - Determine whether the client can negotiate through PPP. This is when you check the address negotiation.
debug ppp authentication - Determines whether the client can pass authentication. If you are using Cisco IOS Software version For versions earlier than 11.2, run the debug ppp chap command.
debug ppp error - Displays protocol errors and statistical errors related to PPP connection negotiation.
debug aaa authentication - To determine which method is being used for validation (should be RADIUS unless RADIUS server Failure), and whether the user is authenticated.
debug aaa authorization - To determine which method is being used for authentication and whether the user passes the authentication.
debug aaa accounting - View the sent records.
debug radius - View the properties of the user and server exchange.