RFC 1333
PPP Link Quality Monitoring
RFC 1333: PPP Link Quality Monitoring ๐
Okay bestie, this is RFC 1333, and it's all about PPP Link Quality Monitoring ๐ฆ. It was written by W. Simpson from Daydreamer and published in May 1992. It's an IAB standards track protocol, so it's a real official spec, not just an opinion piece. The title block doesn't list anything it obsoletes or updates, so there's no drama with older versions ๐ .
Status of this Memo โจ
This RFC specifies an IAB standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements ๐ซถ. If you want to know where this protocol stands in standardization, check the current edition of the "IAB Official Protocol Standards". Distribution of this memo is unlimited, so share it with everyone ๐.
Abstract ๐ธ
Okay so PPP, the Point-to-Point Protocol [1], is the standard way to wrap up Network Layer protocol info and send it over point-to-point links ๐ฆ. It also has an extensible Link Control Protocol, which lets the two ends negotiate a Quality Protocol. That Quality Protocol keeps checking whether the link is still viable, nonstop ๐.
This document is where the protocol for generating Link-Quality-Reports lives ๐.
This RFC is a product of the Point-to-Point Protocol Working Group of the Internet Engineering Task Force (IETF). If you have comments, send them to the ietf-ppp@ucdavis.edu mailing list ๐.
Table of Contents ๐ง
1. Introduction .......................................... 1
2. Link Quality Monitoring ............................... 2
2.1 Design Motivation ............................... 2
2.2 Counters ........................................ 2
2.3 Counting Packets and Octets ..................... 4
2.4 Processes ....................................... 4
2.5 Configuration Option Format ..................... 6
2.6 Packet Format ................................... 8
2.7 Transmission of Reports ......................... 12
2.8 Calculations .................................... 12
2.9 Failure Detection ............................... 13
2.10 Policy Suggestions .............................. 14
SECURITY CONSIDERATIONS ...................................... 14
REFERENCES ................................................... 14
ACKNOWLEDGEMENTS ............................................. 14
CHAIR'S ADDRESS .............................................. 15
AUTHOR'S ADDRESS ............................................. 15
1. Introduction ๐
Here's the deal: PPP has three main components ๐ :
- A method for encapsulating datagrams over serial links.
- A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
- A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols.
So to get a point-to-point link talking, each end first has to send LCP packets to configure the data link during the Establishment phase ๐ค. During the Authentication and Network-Layer Protocol phases, the link may get tested to see if its quality is good enough to use. Testing is completely optional, so no pressure ๐.
If an implementation wants its peer to use a specific link quality monitoring protocol, then it MUST negotiate that protocol using the Quality-Protocol Configuration Option during the Link Establishment phase. No skipping this step, it's a big deal ๐.
The negotiation is independent in each direction, so each side handles its own choices ๐. But if the peer agrees to send Quality-Protocol packets, it MUST correctly process those packets when they arrive, even if it didn't ask for them or doesn't run a monitoring policy of its own. Respect the packets, always ๐ซถ.
2. Link Quality Monitoring ๐ฅ
Real talk: data links are rarely perfect ๐ญ. Packets can get dropped or corrupted for all kinds of reasons, like line noise, equipment failure, buffer overruns, and so on. Sometimes you need to figure out when and how often the link is dropping data. Routers, for example, might want to temporarily let another route take precedence ๐ฃ๏ธ. An implementation can also choose to disconnect and switch to an alternate link. The process of figuring out data loss is called "Link Quality Monitoring" โจ.
2.1. Design Motivation ๐
There are tons of ways to measure link quality, and even more ways to react to what you find ๐คฏ. So instead of forcing one scheme on everyone, Link Quality Monitoring is split into a "mechanism" and a "policy". PPP fully specifies the "mechanism" by defining the Link-Quality-Report (LQR) packet and describing how to use it ๐ ๏ธ. PPP does NOT specify a Link Quality Monitoring "policy", meaning how to judge link quality or what to do when it's bad. That's left up to each implementation, and each end of the link can make its own call ๐. Implementations are allowed, and even encouraged, to experiment with different link quality policies ๐งช. The mechanism spec makes sure that two implementations with different policies can still talk to each other and interoperate ๐ค.
To leave room for flexible policies, the PPP Link Quality Monitoring mechanism measures data loss in units of packets, octets, and Link-Quality-Reports ๐. Each measurement is made separately for each half of the link, inbound and outbound. All the measurements get shared with both ends, so each end can run its own link quality policy for both its outbound and inbound links ๐ฆ.
Last but not least, the Link Quality Monitoring protocol is meant to be implementable on lots of different kinds of systems ๐. It's common to run PPP (especially Link Quality Monitoring) as a single software process, but multi-process implementations with hardware support are also expected ๐ง. The mechanism makes this work by carefully defining the Link-Quality-Report packet format and by naming reference points for all the data transmission and reception measurements ๐.
2.2. Counters ๐
Each Link Quality Monitoring implementation keeps counts of the packets and octets it transmits and successfully receives, and it periodically sends that info to its peer in a Link-Quality-Report packet ๐ฌ.
These counters work a lot like sequence numbers. They keep going up, which gives a "relative" sense of how many packets and octets have crossed the outbound link ๐. An LQR receiver compares the values from successive Link-Quality-Reports to work out the "delta" of packets and octets that got through. Looking at these absolute numbers then tells you how good the link is ๐. Relative numbers get sent instead of absolute ones because they make link synchronization way simpler ๐.
The Link-Quality-Report uses the Interface counters from SNMP MIB-II [2]. These counters are not set to any particular value when the LCP enters the Establishment phase ๐ฏ.
On top of that, the Link-Quality-Report needs the implementation of three unsigned, monotonically increasing counters. They have to match the type and size requirements for SNMP MIB Counters [3] ๐ข.
OutLQRs ๐ค
OutLQRs is a 32-bit counter that goes up by one for each transmitted Link-Quality-Report packet. This counter MUST be set to zero when the LCP enters the Establishment phase, and it MUST NOT be reset until the LCP leaves the Termination phase. The counter is incremented before it gets inserted into the LQR packet ๐ .
InLQRs ๐ฅ
InLQRs is a 32-bit counter that goes up by one for each received Link-Quality-Report packet. This counter MUST be set to zero when the LCP enters the Establishment phase, and it MUST NOT be reset until the LCP leaves the Termination phase. The counter is incremented before it gets inserted into the LQR packet, in an implementation dependent fashion ๐งฉ.
InGoodOctets โ
InGoodOctets is a 32-bit counter that goes up by the number of octets in each successfully received Data Link Layer packet. Unlike the MIB ifInOctets, octets for frames that are counted in ifInDiscards and ifInErrors MUST NOT be counted. This counter MAY be set to any initial value when the LCP enters the Establishment phase, but it MUST NOT be reset until the LCP leaves the Termination phase ๐.
2.3. Counting Packets and Octets ๐งฎ
The point of these counters is to show how much information is moving over the link ๐. They are not supposed to be an exact measurement of total bandwidth used. This spec is designed to give the same count in different situations, like when a separate device handles framing and escaping invisibly to the implementation, or when a synchronous-to-asynchronous converter in the link switches between mechanisms ๐.
All octets included in the FCS calculation MUST be counted, including the packet header, the information field, and any padding. The FCS octets MUST also be counted, and one flag octet per frame MUST be counted. All other octets, such as extra flag sequences and escape bits or octets, MUST NOT be counted ๐ซ.
When you insert the packet and octet counts into the LQR, the counts MUST include the expected values for the LQR itself ๐ฆ.
2.4. Processes โ๏ธ
The PPP Link Quality Monitoring mechanism is described with a "logical process" model. There are five logical processes at each end of the duplex link, shown below ๐ง .
+---------+ +-------+ +----+ Outbound
| |-->| Mux |-->| Tx |=========>
| Link- | +-------+ +----+
| Manager |
| | +-------+ +----+ Inbound
| |<--| Demux |<--| Rx |<=========
+---------+ +-------+ +----+
Link-Manager ๐๏ธ
The Link-Manager process sends and receives Link-Quality-Reports, and it carries out the link quality policy the implementation wants. LQR packets go out at a constant rate, which gets negotiated through the LCP Quality-Protocol Configuration Option ๐ฐ๏ธ.
Mux ๐
The Mux process combines packets from the various protocols (for example LCP, IP, XNS, and so on) into one sequential, prioritized stream of packets. Link-Quality-Report packets MUST be given the highest possible priority so that link quality info gets communicated in a timely way ๐.
Tx ๐ค
The Tx process maintains the MIB counters ifOutUniPackets and ifOutOctets, plus the internal counter OutLQRs. These are used to measure how much data gets transmitted on the outbound link. When Tx processes a Link-Quality-Report packet, it inserts the values of these counters into the matching PeerOut... fields of the packet ๐. The Tx process MUST follow the Mux process so that packets get counted in the order they're sent to the link ๐งพ.
Rx ๐ฅ
The Rx process maintains the MIB counters ifInUniPackets, ifInDiscards, ifInErrors and IfInOctets, plus the internal counters InLQRs and InGoodOctets. These measure how much data comes in over the inbound link ๐ก. When Rx processes a Link-Quality-Report packet, it inserts the values of these counters into the matching SaveIn... fields of the packet, in an implementation dependent manner ๐ช.
Demux ๐งฉ
The Demux process demultiplexes packets for the various protocols, which is basically sorting them back out to where they belong ๐๏ธ. The Demux process MUST follow the Rx process so that packets get counted in the order they came in from the link ๐.
2.5. Configuration Option Format
Description
okay so implementations MUST be prepared to receive the Quality-Protocol Configuration Option for the Link-Quality-Report ๐ but negotiating it isn't required โจ you only really need to negotiate when you want to make sure the peer sends Link-Quality-Reports and not some other Quality-Protocol, or when you want to stop the peer from running its own timer, or when you want to set a maximum time between LQR transmissions ๐ฆ
the format for negotiating the Link-Quality-Report looks like this, and the fields go 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 | Quality-Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reporting-Period |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type
it's 4 ๐ธ
Length
it's 8 ๐ธ
Quality-Protocol
it's c025 (hex) for the Link-Quality-Report, so that's the one to use ๐
Reporting-Period
okay this one is four octets and it tells you the maximum time, in hundredths of seconds, between transmission of packets โฑ๏ธ the peer MAY transmit packets faster than what was negotiated, so it's not capped at that number ๐ฆ
a value of zero means the peer doesn't need to maintain a timer ๐ instead it generates an LQR immediately upon receiving an LQR. but a zero value MUST be Nak'd by the peer with an appropriate non-zero value when that peer has sent or will send a Configure-Request packet containing the Quality-Protocol Configuration Option for the Link-Quality-Report with a zero Reporting-Period ๐ซ
2.6. Packet Format
so every Link-Quality-Report packet gets encapsulated in the Information field of a PPP Data Link Layer frame, and exactly one LQR per frame ๐ the protocol field is set to type hex c025 (Link-Quality-Report) to say "hey, this is an LQR" โจ the field names are from the packet receiver's point of view, because the receiver is the one who asked for the packet in the Configuration Option ๐ fields go left to right again
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Magic-Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LastOutLQRs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LastOutPackets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LastOutOctets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerInLQRs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerInPackets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerInDiscards |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerInErrors |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerInOctets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerOutLQRs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerOutPackets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PeerOutOctets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
okay plot twist ๐ the next fields are NOT actually sent over the inbound link. they get logically tacked onto the packet by the implementation's Rx process, and how that's done is up to the implementation ๐ง
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SaveInLQRs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SaveInPackets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SaveInDiscards |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SaveInErrors |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SaveInOctets |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Magic-Number
this one is four octets and it helps detect links that are looped back ๐ unless a Configuration Option changes it, the Magic-Number MUST be transmitted as zero and MUST be ignored on reception ๐ซถ if Magic-Numbers have been negotiated, incoming LQR packets SHOULD be checked to make sure the local end isn't seeing its own Magic-Number, which would mean it's a looped-back link ๐ check the Magic-Number Configuration Option for more deets
LastOutLQRs
four octets, copied from the most recently received PeerOutLQRs on transmission ๐ฆ
LastOutPackets
four octets, copied from the most recently received PeerOutPackets on transmission ๐ฆ
LastOutOctets
four octets, copied from the most recently received PeerOutOctets on transmission ๐ฆ
PeerInLQRs
four octets, copied from the most recently received SaveInLQRs on transmission ๐
whenever PeerInLQRs is discovered to be zero, the LastOut... fields are indeterminate and the PeerIn... fields hold the initial values for the peer ๐ฑ
PeerInPackets
four octets, copied from the most recently received SaveInPackets on transmission ๐
PeerInDiscards
four octets, copied from the most recently received SaveInDiscards on transmission ๐
PeerInErrors
four octets, copied from the most recently received SaveInErrors on transmission ๐
PeerInOctets
four octets, copied from the most recently received SaveInOctets on transmission ๐
PeerOutLQRs
four octets, copied from OutLQRs on transmission. this number MUST include this LQR ๐ซถ
PeerOutPackets
four octets, copied from the current MIB ifOutUniPackets and ifOutNUniPackets on transmission. this number MUST include this LQR ๐ซถ
PeerOutOctets
four octets, copied from the current MIB ifOutOctets on transmission. this number MUST include this LQR ๐ซถ
SaveInLQRs
four octets, copied from InLQRs on reception. this number MUST include this LQR ๐ซถ
SaveInPackets
four octets, copied from the current MIB ifInUniPackets and ifInNUniPackets on reception. this number MUST include this LQR ๐ซถ
SaveInDiscards
four octets, copied from the current MIB ifInDiscards on reception. this number MUST include this LQR ๐ซถ
SaveInErrors
four octets, copied from the current MIB ifInErrors on reception. this number MUST include this LQR ๐ซถ
SaveInOctets
four octets, copied from the current InGoodOctets on reception. this number MUST include this LQR ๐ซถ
โ ๏ธ bestie, don't mix these two up: InGoodOctets is NOT the same as the MIB ifInOctets counter, because InGoodOctets leaves out octets for packets that are discards or errors ๐ โโ๏ธ
2.7. Transmission of Reports
so once the PPP Link Control Protocol hits the Opened state, the Link Quality Monitoring process MAY start sending Link-Quality-Reports ๐ but if a Protocol-Reject comes in that specifies an LQR packet, the LQM process MUST cease sending LQRs ๐
usually the LQR gets transmitted when the LQR timer for the link expires โฐ if there's no LQR timer, an LQR gets generated the moment an incoming LQR is received. the negotiation process makes sure at least one side of the link is running an LQR timer โจ
on top of that, an LQR is also generated whenever two successive LQRs come in with the same PeerInLQRs value ๐ that could mean an LQR got lost, or that the implementation is sending way slower than its peer, or that the peer sped up LQR generation so it can better measure errors on the link ๐
whenever an LQR is sent, the LQR timer MUST be restarted ๐
2.8. Calculations
every time a Link-Quality-Report packet comes in from the inbound link, the Link-Manager can compare the related fields ๐งฎ you can subtract the fields of the previous LQR from the current LQR values to get an absolute "delta", and that lets you compare how each end of the link saw the changes ๐
if the received PeerInLQRs is zero, the LastOut... fields are indeterminate and the PeerIn... fields hold the initial values for the peer. you can't do any calculations with these fields at that point ๐
๐ Implementation Note: the following counters wrap to zero when they hit their maximum value ๐ make sure your "delta" calculations are done correctly when that happens!
here's what you can work out:
- LastOutLQRs can be compared directly with PeerInLQRs to figure out how many outbound LQRs got lost ๐
- LastOutLQRs can be compared directly with the OutLQRs counter to figure out how many outbound LQRs are still in the pipeline ๐ฐ
- the change in PeerInPackets can be compared with the change in LastOutPackets to get the number of lost packets over the outgoing link ๐ฆ
- the change in PeerInOctets can be compared with the change in LastOutOctets to get the number of lost octets over the outgoing link ๐ง
- the change in SaveInPackets can be compared with the change in PeerOutPackets to get the number of lost packets over the incoming link ๐ฌ
- the change in SaveInOctets can be compared with the change in PeerOutOctets to get the number of lost octets over the incoming link ๐ญ
and lastly ๐ฆ the change in PeerInDiscards and PeerInErrors can be used to tell whether packet loss is because of congestion in the peer, rather than a physical link failure ๐
ใฆใฉ, let's go! ๐ Part 3 picks up right where the Link Quality Reports start getting real. Here we go, bestie. ๐
2.9. Failure Detection โจ
okay so, when the link is working well in both directions, the LQR is literally superfluous ๐ like, you don't need it! The maximum time interval for sending LQRs SHOULD be picked so it barely gets in the way of the active traffic. main character energy for your data ๐ฆ
When there's a measurable loss of data in either direction, the MUST-level vibe is about checking the overall throughput. If the throughput is still adequate, the conditions aren't severe enough to drop the link, so it's not time to panic ๐ Sending LQRs faster gains nothing, except maybe catching peaks in the loss rate. The time interval MUST be long enough to smooth out the data, but short enough that a complete failure gets caught fast enough. Balance is everything, periodt ๐
When the link is good incoming but very bad outgoing, the incoming LQRs are telling you there's high loss on the outgoing side ๐ญ Sending LQRs faster won't help here, because they're probably getting lost on the way to the peer. Sad, but true. ๐
When the link is good outgoing but very bad incoming, the incoming LRQs will be frequently lost ๐ธ In this case, LQRs SHOULD be sent at a faster rate. This mostly depends on the peer to make an informed policy decision. The peer will also send LQRs back (because of the duplicate PeerInLQRs field โจ), and some of those might actually make it through ๐ง
When an LQR doesn't show up in the expected time, or the LQR that did arrive says the links are truly bad, at least one additional LQR SHOULD be sent. An algorithmic decision needs at least 2 round trip intervals โญ The loss rate could just be temporary, because of a heavily loaded link, or a lost outgoing LQR. Not every blip is a crisis, bestie ๐ซถ
2.10. Policy Suggestions ๐
Link-Quality-Report packets give you a way to figure out the link quality, but it's up to each implementation to decide when the link is usable ๐ It is recommended that the policy use some amount of hysteresis so the link doesn't bounce up and down ๐ฆ One policy is a K out of N algorithm. In that algorithm, there MUST be K successes out of the last N periods for the link to count as good quality. Lowkey iconic. ๐
Procedures for recovering from poor quality links are unspecified and can vary from implementation to implementation ๐ A suggested approach is to immediately close all the other Network-Layer protocols (so, cause IPCP to transmit a Terminate-Request), but keep transmitting Link-Quality-Reports ๐ Once the link quality gets back to an acceptable level, the Network-Layer protocols can be reconfigured. Glow up arc complete โจ
Security Considerations ๐
Security issues are not discussed in this memo. ๐ (Yeah, that's a whole vibe, but it's what the document says, so we're keeping it real ๐ฅ)
References ๐
[1] Simpson, W., "The Point-to-Point Protocol", RFC 1331, May 1992.
[2] McCloghrie, K., and M. Rose, "Management Information Base for Network Management of TCP/IP-based internets: MIB-II", RFC 1213, March 1991.
[3] Rose, M., and K. McCloghrie, "Structure and Identification of Management Information for TCP/IP-based Internets", RFC 1155, May 1990.
Acknowledgments ๐ซถ
Some of the text in this document is taken from RFC 1172, by Drew Perkins of Carnegie Mellon University, and by Russ Hobby of the University of California at Davis. ๐ธ
Special thanks to Craig Fox (Network Systems), and Karl Fox (Morning Star Technologies), for design suggestions based on implementation experience. ๐
Chair's Address ๐
The working group can be contacted via the current chair:
Brian Lloyd
Lloyd & Associates
3420 Sudbury Road
Cameron Park, California 95682
Phone: (916) 676-1147
EMail: brian@ray.lloyd.com
Author's Address ๐ฆ
Questions about this memo can also be directed to:
William Allen Simpson
Daydreamer
Computer Systems Consulting Services
P O Box 6205
East Lansing, MI 48826-6025
EMail: bsimpson@ray.lloyd.com
๐ฆ where this page comes from
- ietf: rfc1333 1992-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms