4

I'm using Debian Linux on an embedded system, we use ppp to connect to the WAN via a CDMA modem. I want to find out if compression is being used by ppp.

In my /var/log/messages I see the line:

kernel: [   54.740000] PPP Deflate Compression module registered

but in /var/log/debug I see this:

pppd[2433]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received

The output of pppstats -z is:

IN:  COMPRESSED  INCOMPRESSIBLE   COMP | OUT: COMPRESSED  INCOMPRESSIBLE   COMP
    BYTE   PACK     BYTE   PACK  RATIO |     BYTE   PACK     BYTE   PACK  RATIO
       0      0        0      0   0.00 |        0      0        0      0   0.00

So does the above mean compression is enabled, or not?

2

You can use the command pppstats -z to display compression statistics. If it displays all zeros then compression is not enabled.

excerpt from man page

   -z     Instead of the standard display, show statistics indicating the 
          performance of the packet compression algorithm in use.

   When the -z option is specified, instead displays the following fields,
   relating to the packet compression algorithm currently in use.   If
   packet compression is not in use, these fields will all display zeroes.  
   The fields displayed on the input side are:

   COMPRESSED BYTE
          The number of bytes of compressed packets received.

   COMPRESSED PACK
          The number of compressed packets received.

   INCOMPRESSIBLE BYTE
          The number of bytes of incompressible packets (that is, those 
          which were transmitted in uncompressed form) received.

   INCOMPRESSIBLE PACK
          The number of incompressible packets received.

   COMP RATIO
          The  recent  compression ratio for incoming packets, defined as 
          the uncompressed size divided by the compressed size (including 
          both compressible and incompressible packets).

   The fields displayed on the output side are:

   COMPRESSED BYTE
          The number of bytes of compressed packets transmitted.

   COMPRESSED PACK
          The number of compressed packets transmitted.

   INCOMPRESSIBLE BYTE
          The number of bytes of incompressible packets transmitted (that 
          is, those which were transmitted in uncompressed form).

   INCOMPRESSIBLE PACK
          The number of incompressible packets transmitted.

   COMP RATIO
          The recent compression ratio for outgoing packets.
  • Great answer thank you, I was not aware of pppstats. I ran it with the -z option and it returned all zeros for the fields, which I assume means there is no compression in effect? This would also correlate with the protocol reject message I saw in the logs. – fred basset Feb 28 '14 at 16:17
  • @fredbasset - correct, no compression. – slm Feb 28 '14 at 22:23
2

Check /etc/ppp/options.

DO NOT Edit this file, rather copy it to some location and make edit.

check this:

# Disable Address/Control compression negotiation (use default, i.e.
# address/control field disabled).
#-ac

More info you can find here in the PPP-HOWTO.

  • it seems you already have compression enabled. – OmPS Feb 27 '14 at 3:36
  • This is Address/Control Field Compression, which is not what is usually meant by compression on a PPP link. – aecolley Feb 28 '14 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.