Bluehost.com Web Hosting $6.95

bsd_comp and/or ppp_deflate

This is a discussion on bsd_comp and/or ppp_deflate within the Linux Networking forums, part of the Linux Forums category; Previously, I have both bsd_comp and ppp_defalte built as modules in the kernel, and have the following in /etc/modules....


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-23-2003
noone
 
Posts: n/a
Default bsd_comp and/or ppp_deflate


Previously, I have both bsd_comp and ppp_defalte built as modules in the
kernel, and have the following in /etc/modules.conf:

alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate

Now after upgrading to the latest RH 7.2 kernel, RH's kernel did not
have the bsd_comp built in either the kernel or as a module. As a
result, when I dial-up to my ISP, I get:

Oct 23 18:57:46 localhost pppd[1542]: pppd 2.4.2b3 started by root, uid0
Oct 23 18:57:46 localhost pppd[1542]: Using interface ppp0
Oct 23 18:57:46 localhost pppd[1542]: Connect: ppp0 <--> /dev/ttyS0
Oct 23 18:57:50 localhost modprobe: modprobe: Can't locate module
ppp-compress-21
Oct 23 18:57:51 localhost kernel: PPP Deflate Compression module registered
Oct 23 18:57:51 localhost modprobe: modprobe: Can't locate module
ppp-compress-21


Now after reading the "Help" for these two options when running make
menuconfig, it turns out that what will really happen is you will use
one but not both in a single PPP connection, as long as the ISP supports
that compression method.

Question now is:

1) How do I find out what compression method my ISP uses ?

2) Does the fact that I get "Can't locate module ppp-compress-21"
indicate that either:

2a) The ppp code detected that the PPP connection can supports bsd_comp ?

or:
2b) The kernel tried to load bsd_comp module simply because it is in
/etc/modules.conf ?




Reply With Quote
  #2 (permalink)  
Old 10-23-2003
Clifford Kite
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

noone <noone@noone.org> wrote:

> Previously, I have both bsd_comp and ppp_defalte built as modules in the
> kernel, and have the following in /etc/modules.conf:

....

> Question now is:


> 1) How do I find out what compression method my ISP uses ?


Add debug to the pppd options and look at the LCP negotiations that
are logged to see what kind of CCP options the ISP requests.

> 2) Does the fact that I get "Can't locate module ppp-compress-21"
> indicate that either:


> 2a) The ppp code detected that the PPP connection can supports bsd_comp ?


> or:
> 2b) The kernel tried to load bsd_comp module simply because it is in
> /etc/modules.conf ?


2a) - assuming that I've correctly parsed it.

If the bsd_comp.o module exists then the kernel would load it as needed
regardless of whether it's in modules.conf. Running `modprobe -c|grep
bsd_compress' should show that modprobe (and so the kernel) already
knows that the module bsd_comp.o is associated with ppp-compress-21.

--
Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* Slogan appropriate for a certain well-known software company:
FAILURE IS NOT AN OPTION - it is built into the operating system
and comes bundled with the software. */
Reply With Quote
  #3 (permalink)  
Old 10-23-2003
Clifford Kite
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

Clifford Kite <kite@see.signature.id> wrote:
> Running `modprobe -c|grep
> bsd_compress' should show that modprobe (and so the kernel) already

^^^^^^^^^^^^ This should be bsd_comp.
> knows that the module bsd_comp.o is associated with ppp-compress-21.


--
Clifford Kite
Reply With Quote
  #4 (permalink)  
Old 10-23-2003
noone
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

Clifford Kite wrote:
> Clifford Kite <kite@see.signature.id> wrote:
>
>>Running `modprobe -c|grep
>>bsd_compress' should show that modprobe (and so the kernel) already

>
> ^^^^^^^^^^^^ This should be bsd_comp.
>
>>knows that the module bsd_comp.o is associated with ppp-compress-21.

>
>


If the PPP connection and the ISP supports __both__ ppp_deflate and
bsd_comp .... how does pppd decide which one to use?

Reply With Quote
  #5 (permalink)  
Old 10-23-2003
Clifford Kite
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

noone <noone@noone.org> wrote:
> Clifford Kite wrote:


> If the PPP connection and the ISP supports __both__ ppp_deflate and
> bsd_comp .... how does pppd decide which one to use?


They will both be offered (aka requested) and the first offered will
be accepted. The first one is considered the preferred one.

--
Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* Emacs vs vi:
Sort of like a Swiss Army knife versus a rapier. */
Reply With Quote
  #6 (permalink)  
Old 10-23-2003
Jem Berkes
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

> If the PPP connection and the ISP supports __both__ ppp_deflate and
> bsd_comp .... how does pppd decide which one to use?


I recall that there is an option for pppd (goes in the options file) that
can disable BSD compression. I had to disable this feature because there
was some quirk with my ISP that made data transfers stall when using the
feature.

--
Jem Berkes
http://www.sysdesign.ca/
Reply With Quote
  #7 (permalink)  
Old 10-25-2003
noone
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

Clifford Kite wrote:
> noone <noone@noone.org> wrote:
>
>
>>Previously, I have both bsd_comp and ppp_defalte built as modules in the
>>kernel, and have the following in /etc/modules.conf:

>
> ...
>
>
>>Question now is:

>
>
>>1) How do I find out what compression method my ISP uses ?

>
>
> Add debug to the pppd options and look at the LCP negotiations that
> are logged to see what kind of CCP options the ISP requests.
>
>


Enabled the debug option on pppd now, and modified /etc/syslog.conf so
that it logs to /var/log/messages. Here is what it shows:

Where can I find out more information about these LCP / CCP / IPCP
output that pppd outputs ? I can find information about this on Cisco's
site,
http://www.cisco.com/warp/public/471...html#lcpauthen

but the output is quite different from the output below ... so much as
to confuse me further.


Oct 25 10:39:56 localhost pppd[2255]: Using interface ppp0
Oct 25 10:39:56 localhost pppd[2255]: Connect: ppp0 <--> /dev/ttyS0
Oct 25 10:39:56 localhost pppd[2255]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0x44513da5> <pcomp> <accomp>]
Oct 25 10:39:57 localhost pppd[2255]: rcvd [LCP ConfReq id=0x1 <mru
1524> <asyncmap 0x0> <pcomp> <accomp>
<endpoint [MAC:00:c0:7b:8b:60:77]>]
Oct 25 10:39:57 localhost pppd[2255]: sent [LCP ConfAck id=0x1 <mru
1524> <asyncmap 0x0> <pcomp> <accomp>
<endpoint [MAC:00:c0:7b:8b:60:77]>]
Oct 25 10:39:59 localhost pppd[2255]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0x44513da5> <pcomp> <accomp>]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [LCP ConfAck id=0x1 <asyncmap
0x0> <magic 0x44513da5> <pcomp> <accomp>]
Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
ppp-compress-21
Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
ppp-compress-21
Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x1 <deflate
15> <deflate(old#) 15>]
Oct 25 10:39:59 localhost pppd[2255]: sent [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 203.56.8.99>]
Oct 25 10:39:59 localhost pppd[2255]: sent [IPCP ConfAck id=0x1
<compress VJ 0f 01> <addr 203.56.8.99>]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfReq id=0x1 < 11 06
00 01 01 03>]
Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfRej id=0x1 < 11 06
00 01 01 03>]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x1 <deflate
15> <deflate(old#) 15>]
Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x2]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [IPCP ConfNak id=0x1 <addr
203.173.129.126> <ms-dns1 203.109.250.50> <ms-dns3 203.109.250.61>]
Oct 25 10:39:59 localhost pppd[2255]: sent [IPCP ConfReq id=0x2
<compress VJ 0f 01> <addr 203.173.129.126> <ms-dns1 203.109.250.50>
<ms-dns3 203.109.250.61>]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x2]
Oct 25 10:39:59 localhost pppd[2255]: rcvd [IPCP ConfAck id=0x2
<compress VJ 0f 01> <addr 203.173.129.126> <ms-dns1 203.109.250.50>
<ms-dns3 203.109.250.61>]

Reply With Quote
  #8 (permalink)  
Old 10-25-2003
noone
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate


Is my understanding of the pppd debug output correct in that:

> Oct 25 10:39:59 localhost pppd[2255]: sent [LCP ConfReq id=0x1 <asyncmap
> 0x0> <magic 0x44513da5> <pcomp> <accomp>]
> Oct 25 10:39:59 localhost pppd[2255]: rcvd [LCP ConfAck id=0x1 <asyncmap
> 0x0> <magic 0x44513da5> <pcomp> <accomp>]
> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
> ppp-compress-21
> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
> ppp-compress-21


Because I did not have bsd_comp built-in either in the kernel or as a
module, my PPP connection did not even ask my ISP for BSD compression ?


> Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x1 <deflate
> 15> <deflate(old#) 15>]


My PPP connection requested deflate compression ...


> Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x1 <deflate
> 15> <deflate(old#) 15>]



.... but my ISP rejected( ConfRej -- configuration rejected ? ) deflate
compression ?

Reply With Quote
  #9 (permalink)  
Old 10-25-2003
noone
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

noone wrote:
>
> Is my understanding of the pppd debug output correct in that:
>
>> Oct 25 10:39:59 localhost pppd[2255]: sent [LCP ConfReq id=0x1
>> <asyncmap 0x0> <magic 0x44513da5> <pcomp> <accomp>]
>> Oct 25 10:39:59 localhost pppd[2255]: rcvd [LCP ConfAck id=0x1
>> <asyncmap 0x0> <magic 0x44513da5> <pcomp> <accomp>]
>> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
>> ppp-compress-21
>> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
>> ppp-compress-21

>
>
> Because I did not have bsd_comp built-in either in the kernel or as a
> module, my PPP connection did not even ask my ISP for BSD compression ?
>
>
>> Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x1
>> <deflate 15> <deflate(old#) 15>]

>
>
> My PPP connection requested deflate compression ...
>
>
>> Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x1
>> <deflate 15> <deflate(old#) 15>]

>
>
>
> ... but my ISP rejected( ConfRej -- configuration rejected ? ) deflate
> compression ?
>


I have added bsd_comp as a module now and this is what I get with pppd
debug:

Oct 25 21:38:20 localhost pppd[1533]: Using interface ppp0
Oct 25 21:38:20 localhost pppd[1533]: Connect: ppp0 <--> /dev/ttyS0
Oct 25 21:38:20 localhost pppd[1533]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0xe0ca5480> <pcomp> <accomp>]
Oct 25 21:38:22 localhost su(pam_unix)[1532]: session opened for user
root by john(uid=500)
Oct 25 21:38:23 localhost pppd[1533]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0xe0ca5480> <pcomp> <accomp>]
Oct 25 21:38:23 localhost pppd[1533]: rcvd [LCP ConfReq id=0x1 <mru
1524> <asyncmap 0x0> <pcomp> <accomp>
<endpoint [MAC:00:c0:7b:8b:87:ae]>]
Oct 25 21:38:23 localhost pppd[1533]: sent [LCP ConfAck id=0x1 <mru
1524> <asyncmap 0x0> <pcomp> <accomp>
<endpoint [MAC:00:c0:7b:8b:87:ae]>]
Oct 25 21:38:23 localhost pppd[1533]: rcvd [LCP ConfAck id=0x1 <asyncmap
0x0> <magic 0xe0ca5480> <pcomp> <accomp>]
Oct 25 21:38:23 localhost kernel: PPP BSD Compression module registered
Oct 25 21:38:23 localhost kernel: PPP Deflate Compression module registered
Oct 25 21:38:23 localhost pppd[1533]: sent [CCP ConfReq id=0x1 <deflate
15> <deflate(old#) 15> <bsd v1 15>]

So I assume this is the part where my PPP connection sent a request to
my ISP that it can support 3 types of compression ( deflate, deflate old
[ whatever that is ], and bsd ).

But I cannot see anywhere below the CCP response !



Oct 25 21:38:23 localhost pppd[1533]: sent [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Oct 25 21:38:24 localhost pppd[1533]: rcvd [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 203.109.251.116>]
Oct 25 21:38:24 localhost pppd[1533]: sent [IPCP ConfAck id=0x1
<compress VJ 0f 01> <addr 203.109.251.116>]
Oct 25 21:38:24 localhost pppd[1533]: rcvd [LCP ProtRej id=0x2 80 fd 01
01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Oct 25 21:38:24 localhost pppd[1533]: rcvd [IPCP ConfRej id=0x1
<compress VJ 0f 01>]
Oct 25 21:38:24 localhost pppd[1533]: sent [IPCP ConfReq id=0x2 <addr
0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3
0.0.0.0>]
Oct 25 21:38:24 localhost pppd[1533]: rcvd [IPCP ConfNak id=0x2 <addr
203.173.146.224> <ms-dns1 203.109.250.50> <ms-dns3 203.109.250.61>]
Oct 25 21:38:24 localhost pppd[1533]: sent [IPCP ConfReq id=0x3 <addr
203.173.146.224> <ms-dns1 203.109.250.50> <ms-dns3 203.109.250.61>]
Oct 25 21:38:24 localhost pppd[1533]: rcvd [IPCP ConfAck id=0x3 <addr
203.173.146.224> <ms-dns1 203.109.250.50> <ms-dns3 203.109.250.61>]



Reply With Quote
  #10 (permalink)  
Old 10-25-2003
Clifford Kite
 
Posts: n/a
Default Re: bsd_comp and/or ppp_deflate

noone <noone@noone.org> wrote:

> Where can I find out more information about these LCP / CCP / IPCP
> output that pppd outputs ?


The pppd source code? Or the book "PPP Implementation, Design, and
Debugging" by James Carlson. It has some examples of pppd negotiations.
Most of what I know about PPP came from this book and participation
in comp.protocols.ppp.

> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
> ppp-compress-21
> Oct 25 10:39:59 localhost modprobe: modprobe: Can't locate module
> ppp-compress-21


The bsd_comp module probably doesn't exist. Check
/lib/modules/2.4.22/kernel/drivers/net/ to see. (I think that's the
right place but am not sure. No CCP is compiled for the kernel
here since the ISP and pppd have no common CCP algorithm, which,
unfortunately, is almost universal).

> Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x1 <deflate
> 15> <deflate(old#) 15>]


Pppd requests deflate compression and also "old" deflate compression.

> Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfReq id=0x1 < 11 06
> 00 01 01 03>]


The ISP requests STAC compression. Patent problems prevent the open
source pppd from supporting STAC.

> Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfRej id=0x1 < 11 06
> 00 01 01 03>]


So pppd rejects it.

> Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x1 <deflate
> 15> <deflate(old#) 15>]


The ISP doesn't support any deflate and rejects both.

> Oct 25 10:39:59 localhost pppd[2255]: sent [CCP ConfReq id=0x2]


Pppd requests CCP with no compression codes offered. If the ISP
accepts that then negotiations should proceed to completion but
but no CCP is used.

> Oct 25 10:39:59 localhost pppd[2255]: rcvd [CCP ConfRej id=0x2]


The ISP requests termination of CCP negotiation. This is an alternative
to negotiating CCP without any compression algorithm.

The bottom line is that pppd and the ISP don't have any common CCP
algorithm implemented and so no software compression can be negotiated.
It's really not a big thing these days since it usually doesn't help
much when modem compression is used - almost always the case.

--
Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:41 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0