1. Introduction The point-to-point protocol is designed to establish a simple connection for transmitting data packets between two peer entities. This connection provides simultaneous bidirectional full-duplex operation and assumes that the data packets are delivered in order. PPP connection provides a wide range of solutions, conveniently using a variety of unforgettable values ​​as the maximum receiving unit value.
2. Padding field During transmission, the information field may be filled with any number of bytes to the maximum receiving unit length. Each protocol is responsible for distinguishing the information field and the padding field.
3. PPP connection operation 3.1 Overview In order to establish communication in a point-to-point connection, each end of the PPP connection must first send LCP packets to configure and test the data connection. After the connection is established, the peer entity may also need to be authenticated. Then, PPPP must send NC
P data packets to choose one or more network layer protocols to configure. Once the selected network layer protocol is configured, the network layer datagram can be transmitted on the link. The link will remain configurable until there are LCP packets and N
When the CP data packet terminates the connection, or when other external events occur (for example, the inactive clock is full or the network administrator interferes).
3.2 State diagram In the process of configuration maintenance and termination of point-to-point connections, PPP connections go through several different stages, which are illustrated by the following simplified state diagram:
+ ------ + + ----------- + + -------------- +
| | Connected | | Opened | | Success / None
| Death | -------> | Establishment | ----------> | Certification |-+
| | | | | | |
+ ------ + + ----------- + + -------------- + |
^ | | |
| Fail | Fail | |
+ <-------------- + + ---------- + |
| | |
| + ----------- + | + --------- + |
| Disconnect | | | Closing | | |
+ ------------ | Termination | <--- + <---------- | Network | <-+
| | | |
+ ----------- + + --------- +
3.3 Connection death phase (physical layer is not ready)
The beginning and end of a connection go through this stage. When an external event (such as carrier detection or network administrator configuration) indicates that the physical layer is ready and ready for use, PPP will enter the connection establishment phase. At this stage, LC
The P protocol automaton (to be mentioned later) is in the initial or starting state. U will be triggered when entering the connection establishment phase
The P event notifies the LCP protocol automaton.
Application notes:
Typically, a connection will automatically return to this stage after the modem connection is disconnected. In the case of connection using a telephone line, this stage will be quite short, so short that there is rarely enough time to detect its presence with the instrument.
3.4 Establish the connection phase Link Control Protocol (LCP) establishes a connection by exchanging configuration data packets. When the LCP protocol automaton enters the opened state, and the configuration confirmation packet is sent and received, the exchange process for establishing the connection is completed. All configuration options are assumed to be default values ​​unless changed during the configuration interaction. About LCP
See the following chapters for further discussion of configuration options.
It is very important that only options that are not related to a specific network layer protocol can be configured by the LCP. The configuration of a separate network layer protocol is configured by the corresponding network control protocol at the network layer protocol stage.
Any non-LCP data packets received at this stage will be silently discarded. Receiving the LCP configuration request data packet will cause the PPP connection to return from the network layer protocol phase or authentication phase to the connection establishment phase.
3.5 Authentication phase At certain connections, it is desirable to authenticate peer entities before allowing network layer protocol packet exchange. By default, authentication is not necessary. If the application wishes to use certain authentication protocols for authentication by peer entities, this requirement must be made during the connection establishment phase.
The authentication phase should be immediately after the connection establishment phase. However, there may be parallel decisions about the quality of the connection. In application, the connection quality is absolutely not allowed to determine the exchange of data packets, so that there is an uncertain delay in authentication. The network layer protocol phase after the authentication phase must wait for the authentication to end before it can begin. If the authentication fails, it will switch to the connection termination phase. Only data packets for connection control protocols, authentication protocols, and connection quality monitoring are allowed to appear at this stage. All other packets received during this phase will be silently discarded.
Application notes:
During application, it cannot be simply considered that authentication has failed because of timeout or lack of response. Retransmission should be allowed, and the connection termination phase should only be entered when the number of attempts to authenticate exceeds a certain limit.
If the other party refuses to authenticate, the other party has the right to enter the termination phase.
3.6 Network layer protocol stage Once PPP has completed the above stage, each network layer protocol (such as IP, IPX, AppleTalk)
k) Must be individually configured by the corresponding network control protocol (NCP). Each network control protocol can be turned on or off at any time.
Application notes:
Since the connection quality decision that takes a lot of time may be used from the beginning, a fixed timeout limit should be avoided when waiting for the other party to configure the network control protocol.
When a network control protocol automaton reaches the opened state, the corresponding network layer protocol data packet can be transmitted on the PPP connection. When any supported network layer protocol data packet is received, as long as the corresponding network control protocol state automaton does not enter the opened state, it will be silently discarded.
Application notes:
As long as the LCP protocol state automaton is turned on, any unsupported protocol data packets received will return a protocol rejection packet (to be mentioned later). Supported protocol packets will be silently discarded. At this stage, the connections include LCP packets, NCP packets and network layer protocol packets.
3.7 Terminating the connection phase
PPP connection can be terminated at any time. The cause may be carrier loss, authentication failure, connection quality failure, timeout counter overflow, or network administrator closing the connection.
LCP terminates the connection by exchanging connection termination packets. When the connection is being terminated, PPPP will notify the network layer so that it can take corresponding action.
After exchanging termination request packets, the physical layer will be notified to disconnect so that the connection is truly terminated, especially when the authentication fails. The party sending the connection termination request packet should wait for the connection termination confirmation packet or the timeout counter to expire before disconnecting. The party that receives the connection termination confirmation packet should wait for the other party to disconnect first, and never disconnect until at least one timeout timer overflows after sending the connection termination confirmation packet. Then PPPP should enter the connection death phase. At this stage, all non-LCP packets received will be silently discarded.
Application notes:
It is sufficient to use LCP when closing. It is not necessary for every NCP to send a connection termination packet. Conversely, an NCP protocol automaton does not close the entire PPP connection, even if the NCP protocol automaton is currently the only one that has been opened.
4. Option negotiation automata Finite state automata are defined by events, actions, and state transitions. Events include receiving external commands, such as opening, closing,
The timeout timer overflows and the data packet sent by the other party is received. Actions include turning on the timeout counter and sending packets to the other party. Some types of data packets, such as configuration negative packets and configuration rejection packets, or number rejection packets and protocol rejection packets,
Or the response request packet, response reply packet, and discard request packet are all indistinguishable in the description of the automaton. As will be mentioned later, although these different types of packets will cause the same state transition, they do play a different role.
Event action
Up = the lower layer is connected tlu = the layer is connected
Down = the lower layer is disconnected tld = the layer is disconnected
Open = Open connection tls = The layer has started connection
Close = close the connection tlf = the layer has closed the connection
TO + = timeout timer overflows and the timeout counter value is greater than zero irc = initialize the timeout counter
TO- = timeout timer overflows and timeout counter value is less than zero zrc = timeout counter is cleared
RCR + = received the correct configuration request packet scr = sent the configuration request packet
RCR- = Incorrect configuration request packet received
RCA = received configuration confirmation packet sca = sent configuration confirmation packet
RCN = received configuration negative / rejected packet scn = sent configuration negative / rejected packet
RTR = Termination request packet received str = Termination request packet sent
RTA = received termination confirmation packet sta = sent termination confirmation packet
RUC = received unknown encoding packet scj = sent encoding rejected packet
RXJ + = received code rejection packet (allowed)
Or rejected by agreement
RXJ- = received code rejection packet (bad)
Or rejected by agreement
RXR = response request packet received ser = response reply packet sent or response reply packet received or discard request packet received
4.1 State transition table The following is the complete state transition table. Status levels are listed. The lower floors are still not ready. The timeout timer is not running in this state.
When the lower layers become available, configuration request packets are sent.
Closed state In this state, the connection is valid, but there is no Open event. The timeout timer is not running in this state. After receiving the configuration request packet at this time, a termination request packet will be sent. After receiving the termination confirmation packet, it will be silently discarded to avoid loops.
Stopped state This state is migrated after the Open event occurs in the closed state. When the automaton is performing tlf
After the action or after sending the termination request packet and waiting for the Don event, it enters this state. The timeout timer is not running in this state. After receiving the configuration request packet, an appropriate response will be made. When other types of packets are received, a termination confirmation packet is sent. After receiving the termination confirmation packet, it will be silently discarded to avoid loops.
Fundamental:
The Stopped state is where the connection termination phase, connection configuration failure, and other automaton error modes intersect. There is also a competition between the Down event (triggered by tlf action) and the RCR event. When R or reject other users' requests. Since the connection is confirmed to be available, it can be simulated by a Dow event and a subsequent Open event to notify the LCP. It should be particularly noted that the Cross event cannot be triggered by other reasons. A Down event will be triggered at this time, followed immediately by an Up event. Doing so will cause the connection to start renegotiation in an orderly manner, and the automaton will transition from the Closing state to the Stopping state.
And tlf action will disconnect. The automaton will wait for the next connection in the Stopped or Started state.
Timeout (TO +, TO-) event The Timeout event indicates that the timeout timer has expired. After sending out the configuration request packet and terminating the request packet, the timeout timer starts counting. The TO + event indicates that the value of the timeout counter is still greater than zero. Every time the timeout counter decrements, it indicates that the configuration request packet or the termination request packet is retransmitted once. The TO-event indicates that the value of the timeout counter is less than zero, and no more packets need to be retransmitted.
Recive-Configure-Reqest (RCR +, RCR-) event The occurrence of an RCR event indicates that a configuration request packet sent from the other party has been received. The arrival of the configuration request packet indicates that the other party wishes to open the connection and specifies connection options. The configuration request packet will be described in more detail later.
The RCR + event indicates that the configuration request of the other party is acceptable, and the configuration confirmation packet will be transmitted.
The RCR-event indicates that the configuration request of the other party is unacceptable, and the corresponding configuration negative packet or configuration rejection packet will be transmitted.
Application notes:
These events can occur when the automaton is already in the Open state. You must be ready to renegotiate options immediately.
Recive-Configure-Ack (RCA) event The occurrence of the RCA event indicates that the other party's kappa recording has been received? é‘? å® ç¨¹? The result of this action is highly dependent on the application needs.
The This-Layer-Finished (tlf) action The tlf action indicates that the lower-level protocol automaton has entered the International state, the Crossed state, or the State
The state of "pepped", and the lower layer is no longer used for connection. When the lower layer terminates, the Down event should be used as an answer.
Typically, this action may be used by the LCP to enter the connection death phase early, or used by the NCP to notify the LCP
The connection may be terminated when no NCP is opened.
The result of this action is highly dependent on the needs of the application.
Initialize-Restort-Cont (irc) action irc action initializes the timeout counter to a suitable value (Max-Terminate or Max-Co
nfigure). Each time a data packet is transmitted, the counter is decremented by one and includes the first time.
Application notes:
In addition to setting the timeout counter, you must also set the length of the timeout event for the timeout timer.
The Zerro-Restort-Cont (Zrc) action Zrc action clears the timeout counter.
Application notes:
This action enables the finite automatic state machine to stop before entering the final desired state, allowing the other party to handle network traffic. In addition to setting the timeout counter, you must also set the length of the timeout event for the timeout timer.
Send-Configure-Reqest (scr) action The scr action will send a configuration request packet. This indicates that you expect to open the connection with the specified configuration options. When the configuration option packet is sent, the timeout timer starts to prevent it from being lost. Each time a configuration request packet is sent, the timeout counter is decremented by one.
Send-Configure-Ack (sc) action sca action sends configuration confirmation packet. It indicates that all configuration options in the received configuration request packet are confirmed.
Send-Configure-Nak (scn) action The scn action sends a configuration negative packet or a configuration rejection packet. It indicates that some configuration options in the received configuration request packet are denied. The configuration negative package is used to reject a certain configuration option value, and also suggests a new acceptable configuration option value. The configuration rejection package is used to reject all configuration options, typically because these options cannot be identified or used. How to use the configuration negative packet and the configuration rejection packet will be described in detail later in the chapter describing the link control protocol data packet format.
Send-Terminal-Reqest (str) action str action sends a termination request packet. It indicates that the connection is expected to be closed. When the termination request packet is sent, the timeout timer starts to prevent it from being lost. Each time a configuration request packet is sent, the timeout counter is decremented by one.
Send-Terminal-Ack (sta) action Sta action sends a termination confirmation packet. It indicates that the received termination request packet is confirmed or synchronized with the protocol automaton of both parties.
Send-Cord-Reject (scj) action scj action sends an encoding rejection packet. It indicates that a packet with an unrecognized code has been received.
Send-Echo-Reply (ser) action ser action sends a response reply packet. It indicates that it has received the response request packet.
4.6 Avoid circulation
The protocol effectively avoids loops when negotiating configuration options. However, the agreement does not guarantee that this cycle will no longer occur. When negotiating any options, both parties may have adopted mutually incompatible configuration strategies. But both parties may have adopted a compatible configuration strategy, but this may take a lot of time. The user should keep this in mind and should apply the cycle monitoring mechanism and a higher level timeout mechanism.
4.7 Counters and timers
The timeout timer automaton does not use a special timer. The timeout timer is used to monitor the configuration request packet and terminate the transmission of the request packet.
When the timer expires, a Timoeut event will be triggered, and the corresponding configuration request packet or termination request packet will be resent. The timeout timer must be configured, and the default value should be three seconds.
Application notes:
The timeout timer setting should be based on the speed of the connection. The default value is for low-speed connections (2400-9600bp
s), high-speed switching connection (typically such as a telephone line) is designed. Higher speed connections, or lower exchange speed connections should increase the number of retransmissions accordingly.
Instead of a fixed timeout value, the timeout timer should be initially set to a small value and then increased to reach the final configuration value. Each successful value that is less than the final value should be twice the previous value. The initial value should be sufficient to process a packet. It is usually set to twice the time of a round trip between transmissions at the connection speed plus 100 milliseconds to allow the other party to process the packet before responding.
The maximum number of terminations is a value required by the timeout counter for counting termination request packets. It indicates the maximum number of times a termination request packet is sent before it is assumed that the other party cannot answer and no termination confirmation packet is received. The maximum number of terminations must be configured, and the default value should be two retransmissions.
A similar amount of maximum configuration times is recommended for configuration request packets. It indicates the maximum number of times a configuration request packet is sent before it is assumed that the other party cannot answer and no configuration confirmation packet, configuration negative packet, or configuration rejection packet is received. The maximum configuration times must be configured, and the default value should be ten retransmissions.
Maximum number of failures
A similar amount is recommended for the configuration negative package. It indicates the maximum number of times a configuration negative packet is sent before it is assumed that a configuration confirmation packet is sent without agreement. Any options suggested by the other party's configuration negation package and then added to the configuration rejection package and locally desired options will not be added during the negotiation process. The maximum configuration times must be configured, and the default value should be five times.
5. The link control protocol data packet format has three types of link control protocol data packets:
1. Connection configuration packets are used to establish and configure connections. (Configuration request package, configuration confirmation package, configuration negative package and configuration rejection package).
2. The connection termination data packet is used to terminate the connection (termination request packet and termination confirmation packet).
3. The connection maintenance data packet is used to manage and debug the connection (coding rejection packet, protocol rejection packet, response request packet, response response packet, and discard request packet). For simplicity, there is no version number field in the data link control protocol packet format. All unrecognized protocols and codes can be responded to in a simple and recognizable link control protocol packet format. Therefore, a deterministic but inefficient operating mechanism is provided for other versions. Regardless of what configuration options are determined to be enabled, all connection configuration packets, connection termination packets, and encoding rejection packets (encoding numbers 1-7) assume that no configuration options are negotiated.
In fact, each configuration option is assigned a default value. Doing so allows data packets such as link control protocols to always be recognized, even when the connection has ended but is still mistakenly considered to be open.
The link control protocol data packet is encapsulated in the data field of PPPP frame format, and the value of the protocol field of PPPP frame is 0xc
021.
The link control protocol data packet format is summarized as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Coding | Logo | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Data. . .
+-+-+-+-+
Coding field The coding field occupies one octet. It identifies what type of link control protocol packet this is. When a data packet that is not recognizable in the coding domain is received, the coding rejection data packet is sent.
The latest code field values ​​are described in the recently published "Assembled Numbers" RFC document. The following values ​​are relevant to this document:
1 Configure request (Configure-Request)
2 Configuration confirmation (Configure-Ack)
3 Configuration negative (Configure-Nak)
4 Configure-Reject
5 Terminate-Request
6 Terminate-Ack
7 Code-Reject
8 Protocol-Reject
9 Echo-Request
10 Echo-Reply
11 Discard-Request
Identification field The identification field code occupies an octet, which helps match requests and answers. When the identification field in the received data packet is invalid, it will be silently discarded and does not affect the state of the automaton.
The length field identification field code occupies two octets, which identifies the length of the link control protocol data packet, including the coding field, identification field,
Data fields, etc. This length cannot exceed the maximum receive length of the connection.
The octets that exceed the length field are treated as padding bytes and are ignored when received. When a packet with an invalid length field is received,
It will be silently discarded and will not affect the state of the automaton.
Data field The data field has zero or more octets, as indicated in the length field. The format in the data field is determined by the value in the coding field.
5.1 Configuration request description When you want to open a connection, you must transfer a configuration request packet. The option field is filled with configuration options that are expected to change the connection default. Configuration options do not have to include configuration options that use default values.
When a configuration request packet is received, an appropriate data packet must be transmitted in response.
The format of the configuration request packet is summarized as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Coding | Logo | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Options. . .
+-+-+-+-+
coding
1 stands for configuration request.
Identification When the content in the option field changes or when an invalid response to the previous request is received, the identification field should be changed. When retransmitting,
The logo field should not be changed.
The options option field is variable in length and contains a list of zero or more configuration options that you wish to negotiate. All configuration options will be negotiated at the same time. The format of the option field will be discussed in detail in later chapters.
5.2 Configuration confirmation description If the configuration options in the configuration request packet sent by the other party are recognizable and acceptable, you can send a configuration confirmation packet. The order of the confirmed options and the options themselves cannot be modified in any way.
The identification field in the received configuration confirmation packet must match the identification field in the last configuration request packet sent. In addition, the options in the configuration confirmation package must be exactly the same as the options in the last configuration request package sent.
The format of the configuration request packet is summarized as follows. They are transmitted in order from left to right.
0 1 2 Used to notify the other party that it can receive a larger data packet, or ask the other party to send a smaller data packet.
Its default value is 1500 bytes. If a smaller packet is required, the application will still press 150 when the connection is out of sync
0 bytes receive information field.
Application notes:
This option illustrates the capabilities of the application. The other party did not ask for the maximum ability. For example, when the MRU is 204
8 bytes, and the other party is not required to send packets of 2048 bytes in size. At this time, the other party does not need to use the configuration negative packet to indicate that it only sends data packets smaller than 2048 bytes, because the application always requires support for data packets of at least 1500 bytes. The summary of the maximum receiving unit configuration option format is as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Type | Length | Maximum receiving unit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
Types of
1
length
4
Maximum receiving unit The maximum receiving unit field has two octets, which specifies the maximum number of bytes that the information field and padding field can accept. It does not include the frame protocol field, cyclic check code, and any bits or bytes required for transparent transmission.
6.2 Authentication protocol description When making certain connections, you may want to require the other party to authenticate itself before exchanging network layer data packets. This configuration option provides a method for negotiating authentication with a specified authentication protocol. By default, authentication is not required.
During application, multiple authentication protocol configuration options cannot be included in the configuration request packet. On the contrary, the authentication protocol that is most expected to be used should be configured first. If it is denied by the configuration negation package, the authentication protocol that is most expected to be used should be configured next in the next configuration request.
The application sends a configuration request packet to indicate that it wants the other party to authenticate itself. If the other party sends a configuration confirmation packet, it agrees to use the specified protocol for erkins, D., "Requirements for an Internet
Standard Point-to-Point Protocol ", RFC 1547, Carnegie Mellon University,
December 1993.
2. Padding field During transmission, the information field may be filled with any number of bytes to the maximum receiving unit length. Each protocol is responsible for distinguishing the information field and the padding field.
3. PPP connection operation 3.1 Overview In order to establish communication in a point-to-point connection, each end of the PPP connection must first send LCP packets to configure and test the data connection. After the connection is established, the peer entity may also need to be authenticated. Then, PPPP must send NC
P data packets to choose one or more network layer protocols to configure. Once the selected network layer protocol is configured, the network layer datagram can be transmitted on the link. The link will remain configurable until there are LCP packets and N
When the CP data packet terminates the connection, or when other external events occur (for example, the inactive clock is full or the network administrator interferes).
3.2 State diagram In the process of configuration maintenance and termination of point-to-point connections, PPP connections go through several different stages, which are illustrated by the following simplified state diagram:
+ ------ + + ----------- + + -------------- +
| | Connected | | Opened | | Success / None
| Death | -------> | Establishment | ----------> | Certification |-+
| | | | | | |
+ ------ + + ----------- + + -------------- + |
^ | | |
| Fail | Fail | |
+ <-------------- + + ---------- + |
| | |
| + ----------- + | + --------- + |
| Disconnect | | | Closing | | |
+ ------------ | Termination | <--- + <---------- | Network | <-+
| | | |
+ ----------- + + --------- +
3.3 Connection death phase (physical layer is not ready)
The beginning and end of a connection go through this stage. When an external event (such as carrier detection or network administrator configuration) indicates that the physical layer is ready and ready for use, PPP will enter the connection establishment phase. At this stage, LC
The P protocol automaton (to be mentioned later) is in the initial or starting state. U will be triggered when entering the connection establishment phase
The P event notifies the LCP protocol automaton.
Application notes:
Typically, a connection will automatically return to this stage after the modem connection is disconnected. In the case of connection using a telephone line, this stage will be quite short, so short that there is rarely enough time to detect its presence with the instrument.
3.4 Establish the connection phase Link Control Protocol (LCP) establishes a connection by exchanging configuration data packets. When the LCP protocol automaton enters the opened state, and the configuration confirmation packet is sent and received, the exchange process for establishing the connection is completed. All configuration options are assumed to be default values ​​unless changed during the configuration interaction. About LCP
See the following chapters for further discussion of configuration options.
It is very important that only options that are not related to a specific network layer protocol can be configured by the LCP. The configuration of a separate network layer protocol is configured by the corresponding network control protocol at the network layer protocol stage.
Any non-LCP data packets received at this stage will be silently discarded. Receiving the LCP configuration request data packet will cause the PPP connection to return from the network layer protocol phase or authentication phase to the connection establishment phase.
3.5 Authentication phase At certain connections, it is desirable to authenticate peer entities before allowing network layer protocol packet exchange. By default, authentication is not necessary. If the application wishes to use certain authentication protocols for authentication by peer entities, this requirement must be made during the connection establishment phase.
The authentication phase should be immediately after the connection establishment phase. However, there may be parallel decisions about the quality of the connection. In application, the connection quality is absolutely not allowed to determine the exchange of data packets, so that there is an uncertain delay in authentication. The network layer protocol phase after the authentication phase must wait for the authentication to end before it can begin. If the authentication fails, it will switch to the connection termination phase. Only data packets for connection control protocols, authentication protocols, and connection quality monitoring are allowed to appear at this stage. All other packets received during this phase will be silently discarded.
Application notes:
During application, it cannot be simply considered that authentication has failed because of timeout or lack of response. Retransmission should be allowed, and the connection termination phase should only be entered when the number of attempts to authenticate exceeds a certain limit.
If the other party refuses to authenticate, the other party has the right to enter the termination phase.
3.6 Network layer protocol stage Once PPP has completed the above stage, each network layer protocol (such as IP, IPX, AppleTalk)
k) Must be individually configured by the corresponding network control protocol (NCP). Each network control protocol can be turned on or off at any time.
Application notes:
Since the connection quality decision that takes a lot of time may be used from the beginning, a fixed timeout limit should be avoided when waiting for the other party to configure the network control protocol.
When a network control protocol automaton reaches the opened state, the corresponding network layer protocol data packet can be transmitted on the PPP connection. When any supported network layer protocol data packet is received, as long as the corresponding network control protocol state automaton does not enter the opened state, it will be silently discarded.
Application notes:
As long as the LCP protocol state automaton is turned on, any unsupported protocol data packets received will return a protocol rejection packet (to be mentioned later). Supported protocol packets will be silently discarded. At this stage, the connections include LCP packets, NCP packets and network layer protocol packets.
3.7 Terminating the connection phase
PPP connection can be terminated at any time. The cause may be carrier loss, authentication failure, connection quality failure, timeout counter overflow, or network administrator closing the connection.
LCP terminates the connection by exchanging connection termination packets. When the connection is being terminated, PPPP will notify the network layer so that it can take corresponding action.
After exchanging termination request packets, the physical layer will be notified to disconnect so that the connection is truly terminated, especially when the authentication fails. The party sending the connection termination request packet should wait for the connection termination confirmation packet or the timeout counter to expire before disconnecting. The party that receives the connection termination confirmation packet should wait for the other party to disconnect first, and never disconnect until at least one timeout timer overflows after sending the connection termination confirmation packet. Then PPPP should enter the connection death phase. At this stage, all non-LCP packets received will be silently discarded.
Application notes:
It is sufficient to use LCP when closing. It is not necessary for every NCP to send a connection termination packet. Conversely, an NCP protocol automaton does not close the entire PPP connection, even if the NCP protocol automaton is currently the only one that has been opened.
4. Option negotiation automata Finite state automata are defined by events, actions, and state transitions. Events include receiving external commands, such as opening, closing,
The timeout timer overflows and the data packet sent by the other party is received. Actions include turning on the timeout counter and sending packets to the other party. Some types of data packets, such as configuration negative packets and configuration rejection packets, or number rejection packets and protocol rejection packets,
Or the response request packet, response reply packet, and discard request packet are all indistinguishable in the description of the automaton. As will be mentioned later, although these different types of packets will cause the same state transition, they do play a different role.
Event action
Up = the lower layer is connected tlu = the layer is connected
Down = the lower layer is disconnected tld = the layer is disconnected
Open = Open connection tls = The layer has started connection
Close = close the connection tlf = the layer has closed the connection
TO + = timeout timer overflows and the timeout counter value is greater than zero irc = initialize the timeout counter
TO- = timeout timer overflows and timeout counter value is less than zero zrc = timeout counter is cleared
RCR + = received the correct configuration request packet scr = sent the configuration request packet
RCR- = Incorrect configuration request packet received
RCA = received configuration confirmation packet sca = sent configuration confirmation packet
RCN = received configuration negative / rejected packet scn = sent configuration negative / rejected packet
RTR = Termination request packet received str = Termination request packet sent
RTA = received termination confirmation packet sta = sent termination confirmation packet
RUC = received unknown encoding packet scj = sent encoding rejected packet
RXJ + = received code rejection packet (allowed)
Or rejected by agreement
RXJ- = received code rejection packet (bad)
Or rejected by agreement
RXR = response request packet received ser = response reply packet sent or response reply packet received or discard request packet received
4.1 State transition table The following is the complete state transition table. Status levels are listed. The lower floors are still not ready. The timeout timer is not running in this state.
When the lower layers become available, configuration request packets are sent.
Closed state In this state, the connection is valid, but there is no Open event. The timeout timer is not running in this state. After receiving the configuration request packet at this time, a termination request packet will be sent. After receiving the termination confirmation packet, it will be silently discarded to avoid loops.
Stopped state This state is migrated after the Open event occurs in the closed state. When the automaton is performing tlf
After the action or after sending the termination request packet and waiting for the Don event, it enters this state. The timeout timer is not running in this state. After receiving the configuration request packet, an appropriate response will be made. When other types of packets are received, a termination confirmation packet is sent. After receiving the termination confirmation packet, it will be silently discarded to avoid loops.
Fundamental:
The Stopped state is where the connection termination phase, connection configuration failure, and other automaton error modes intersect. There is also a competition between the Down event (triggered by tlf action) and the RCR event. When R or reject other users' requests. Since the connection is confirmed to be available, it can be simulated by a Dow event and a subsequent Open event to notify the LCP. It should be particularly noted that the Cross event cannot be triggered by other reasons. A Down event will be triggered at this time, followed immediately by an Up event. Doing so will cause the connection to start renegotiation in an orderly manner, and the automaton will transition from the Closing state to the Stopping state.
And tlf action will disconnect. The automaton will wait for the next connection in the Stopped or Started state.
Timeout (TO +, TO-) event The Timeout event indicates that the timeout timer has expired. After sending out the configuration request packet and terminating the request packet, the timeout timer starts counting. The TO + event indicates that the value of the timeout counter is still greater than zero. Every time the timeout counter decrements, it indicates that the configuration request packet or the termination request packet is retransmitted once. The TO-event indicates that the value of the timeout counter is less than zero, and no more packets need to be retransmitted.
Recive-Configure-Reqest (RCR +, RCR-) event The occurrence of an RCR event indicates that a configuration request packet sent from the other party has been received. The arrival of the configuration request packet indicates that the other party wishes to open the connection and specifies connection options. The configuration request packet will be described in more detail later.
The RCR + event indicates that the configuration request of the other party is acceptable, and the configuration confirmation packet will be transmitted.
The RCR-event indicates that the configuration request of the other party is unacceptable, and the corresponding configuration negative packet or configuration rejection packet will be transmitted.
Application notes:
These events can occur when the automaton is already in the Open state. You must be ready to renegotiate options immediately.
Recive-Configure-Ack (RCA) event The occurrence of the RCA event indicates that the other party's kappa recording has been received? é‘? å® ç¨¹? The result of this action is highly dependent on the application needs.
The This-Layer-Finished (tlf) action The tlf action indicates that the lower-level protocol automaton has entered the International state, the Crossed state, or the State
The state of "pepped", and the lower layer is no longer used for connection. When the lower layer terminates, the Down event should be used as an answer.
Typically, this action may be used by the LCP to enter the connection death phase early, or used by the NCP to notify the LCP
The connection may be terminated when no NCP is opened.
The result of this action is highly dependent on the needs of the application.
Initialize-Restort-Cont (irc) action irc action initializes the timeout counter to a suitable value (Max-Terminate or Max-Co
nfigure). Each time a data packet is transmitted, the counter is decremented by one and includes the first time.
Application notes:
In addition to setting the timeout counter, you must also set the length of the timeout event for the timeout timer.
The Zerro-Restort-Cont (Zrc) action Zrc action clears the timeout counter.
Application notes:
This action enables the finite automatic state machine to stop before entering the final desired state, allowing the other party to handle network traffic. In addition to setting the timeout counter, you must also set the length of the timeout event for the timeout timer.
Send-Configure-Reqest (scr) action The scr action will send a configuration request packet. This indicates that you expect to open the connection with the specified configuration options. When the configuration option packet is sent, the timeout timer starts to prevent it from being lost. Each time a configuration request packet is sent, the timeout counter is decremented by one.
Send-Configure-Ack (sc) action sca action sends configuration confirmation packet. It indicates that all configuration options in the received configuration request packet are confirmed.
Send-Configure-Nak (scn) action The scn action sends a configuration negative packet or a configuration rejection packet. It indicates that some configuration options in the received configuration request packet are denied. The configuration negative package is used to reject a certain configuration option value, and also suggests a new acceptable configuration option value. The configuration rejection package is used to reject all configuration options, typically because these options cannot be identified or used. How to use the configuration negative packet and the configuration rejection packet will be described in detail later in the chapter describing the link control protocol data packet format.
Send-Terminal-Reqest (str) action str action sends a termination request packet. It indicates that the connection is expected to be closed. When the termination request packet is sent, the timeout timer starts to prevent it from being lost. Each time a configuration request packet is sent, the timeout counter is decremented by one.
Send-Terminal-Ack (sta) action Sta action sends a termination confirmation packet. It indicates that the received termination request packet is confirmed or synchronized with the protocol automaton of both parties.
Send-Cord-Reject (scj) action scj action sends an encoding rejection packet. It indicates that a packet with an unrecognized code has been received.
Send-Echo-Reply (ser) action ser action sends a response reply packet. It indicates that it has received the response request packet.
4.6 Avoid circulation
The protocol effectively avoids loops when negotiating configuration options. However, the agreement does not guarantee that this cycle will no longer occur. When negotiating any options, both parties may have adopted mutually incompatible configuration strategies. But both parties may have adopted a compatible configuration strategy, but this may take a lot of time. The user should keep this in mind and should apply the cycle monitoring mechanism and a higher level timeout mechanism.
4.7 Counters and timers
The timeout timer automaton does not use a special timer. The timeout timer is used to monitor the configuration request packet and terminate the transmission of the request packet.
When the timer expires, a Timoeut event will be triggered, and the corresponding configuration request packet or termination request packet will be resent. The timeout timer must be configured, and the default value should be three seconds.
Application notes:
The timeout timer setting should be based on the speed of the connection. The default value is for low-speed connections (2400-9600bp
s), high-speed switching connection (typically such as a telephone line) is designed. Higher speed connections, or lower exchange speed connections should increase the number of retransmissions accordingly.
Instead of a fixed timeout value, the timeout timer should be initially set to a small value and then increased to reach the final configuration value. Each successful value that is less than the final value should be twice the previous value. The initial value should be sufficient to process a packet. It is usually set to twice the time of a round trip between transmissions at the connection speed plus 100 milliseconds to allow the other party to process the packet before responding.
The maximum number of terminations is a value required by the timeout counter for counting termination request packets. It indicates the maximum number of times a termination request packet is sent before it is assumed that the other party cannot answer and no termination confirmation packet is received. The maximum number of terminations must be configured, and the default value should be two retransmissions.
A similar amount of maximum configuration times is recommended for configuration request packets. It indicates the maximum number of times a configuration request packet is sent before it is assumed that the other party cannot answer and no configuration confirmation packet, configuration negative packet, or configuration rejection packet is received. The maximum configuration times must be configured, and the default value should be ten retransmissions.
Maximum number of failures
A similar amount is recommended for the configuration negative package. It indicates the maximum number of times a configuration negative packet is sent before it is assumed that a configuration confirmation packet is sent without agreement. Any options suggested by the other party's configuration negation package and then added to the configuration rejection package and locally desired options will not be added during the negotiation process. The maximum configuration times must be configured, and the default value should be five times.
5. The link control protocol data packet format has three types of link control protocol data packets:
1. Connection configuration packets are used to establish and configure connections. (Configuration request package, configuration confirmation package, configuration negative package and configuration rejection package).
2. The connection termination data packet is used to terminate the connection (termination request packet and termination confirmation packet).
3. The connection maintenance data packet is used to manage and debug the connection (coding rejection packet, protocol rejection packet, response request packet, response response packet, and discard request packet). For simplicity, there is no version number field in the data link control protocol packet format. All unrecognized protocols and codes can be responded to in a simple and recognizable link control protocol packet format. Therefore, a deterministic but inefficient operating mechanism is provided for other versions. Regardless of what configuration options are determined to be enabled, all connection configuration packets, connection termination packets, and encoding rejection packets (encoding numbers 1-7) assume that no configuration options are negotiated.
In fact, each configuration option is assigned a default value. Doing so allows data packets such as link control protocols to always be recognized, even when the connection has ended but is still mistakenly considered to be open.
The link control protocol data packet is encapsulated in the data field of PPPP frame format, and the value of the protocol field of PPPP frame is 0xc
021.
The link control protocol data packet format is summarized as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Coding | Logo | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Data. . .
+-+-+-+-+
Coding field The coding field occupies one octet. It identifies what type of link control protocol packet this is. When a data packet that is not recognizable in the coding domain is received, the coding rejection data packet is sent.
The latest code field values ​​are described in the recently published "Assembled Numbers" RFC document. The following values ​​are relevant to this document:
1 Configure request (Configure-Request)
2 Configuration confirmation (Configure-Ack)
3 Configuration negative (Configure-Nak)
4 Configure-Reject
5 Terminate-Request
6 Terminate-Ack
7 Code-Reject
8 Protocol-Reject
9 Echo-Request
10 Echo-Reply
11 Discard-Request
Identification field The identification field code occupies an octet, which helps match requests and answers. When the identification field in the received data packet is invalid, it will be silently discarded and does not affect the state of the automaton.
The length field identification field code occupies two octets, which identifies the length of the link control protocol data packet, including the coding field, identification field,
Data fields, etc. This length cannot exceed the maximum receive length of the connection.
The octets that exceed the length field are treated as padding bytes and are ignored when received. When a packet with an invalid length field is received,
It will be silently discarded and will not affect the state of the automaton.
Data field The data field has zero or more octets, as indicated in the length field. The format in the data field is determined by the value in the coding field.
5.1 Configuration request description When you want to open a connection, you must transfer a configuration request packet. The option field is filled with configuration options that are expected to change the connection default. Configuration options do not have to include configuration options that use default values.
When a configuration request packet is received, an appropriate data packet must be transmitted in response.
The format of the configuration request packet is summarized as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Coding | Logo | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Options. . .
+-+-+-+-+
coding
1 stands for configuration request.
Identification When the content in the option field changes or when an invalid response to the previous request is received, the identification field should be changed. When retransmitting,
The logo field should not be changed.
The options option field is variable in length and contains a list of zero or more configuration options that you wish to negotiate. All configuration options will be negotiated at the same time. The format of the option field will be discussed in detail in later chapters.
5.2 Configuration confirmation description If the configuration options in the configuration request packet sent by the other party are recognizable and acceptable, you can send a configuration confirmation packet. The order of the confirmed options and the options themselves cannot be modified in any way.
The identification field in the received configuration confirmation packet must match the identification field in the last configuration request packet sent. In addition, the options in the configuration confirmation package must be exactly the same as the options in the last configuration request package sent.
The format of the configuration request packet is summarized as follows. They are transmitted in order from left to right.
0 1 2 Used to notify the other party that it can receive a larger data packet, or ask the other party to send a smaller data packet.
Its default value is 1500 bytes. If a smaller packet is required, the application will still press 150 when the connection is out of sync
0 bytes receive information field.
Application notes:
This option illustrates the capabilities of the application. The other party did not ask for the maximum ability. For example, when the MRU is 204
8 bytes, and the other party is not required to send packets of 2048 bytes in size. At this time, the other party does not need to use the configuration negative packet to indicate that it only sends data packets smaller than 2048 bytes, because the application always requires support for data packets of at least 1500 bytes. The summary of the maximum receiving unit configuration option format is as follows. They are transmitted in order from left to right.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
| Type | Length | Maximum receiving unit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+
Types of
1
length
4
Maximum receiving unit The maximum receiving unit field has two octets, which specifies the maximum number of bytes that the information field and padding field can accept. It does not include the frame protocol field, cyclic check code, and any bits or bytes required for transparent transmission.
6.2 Authentication protocol description When making certain connections, you may want to require the other party to authenticate itself before exchanging network layer data packets. This configuration option provides a method for negotiating authentication with a specified authentication protocol. By default, authentication is not required.
During application, multiple authentication protocol configuration options cannot be included in the configuration request packet. On the contrary, the authentication protocol that is most expected to be used should be configured first. If it is denied by the configuration negation package, the authentication protocol that is most expected to be used should be configured next in the next configuration request.
The application sends a configuration request packet to indicate that it wants the other party to authenticate itself. If the other party sends a configuration confirmation packet, it agrees to use the specified protocol for erkins, D., "Requirements for an Internet
Standard Point-to-Point Protocol ", RFC 1547, Carnegie Mellon University,
December 1993.
Vacuum Cleaner Bldc Dry-Wet Motor
Vacuum Cleaner Bldc Dry-Wet Motor,Dry Vacuum Cleaner Bldc Motor,Electric Dc Vacuum Cleaner Motor,Vacuum Cleaner For With Brushless Motor
Zhoushan Chenguang Electric Appliance Co., Ltd. , https://www.vacuum-cleaner-motors.com