# new guy to gentoo: kernel mode pppoe?

## TwistedKestrel

Yello. I'm a super noob as far as gentoo goes, and I have a question about the rp-pppoe package. It works fine and all, but when you do 'emerge rp-pppoe', it fails to install the init script for it, it fails to install the kernel mode pppoe plugin for pppd (although it makes a directory for it), and for some reason, it won't work when you enable synchronous ppp, even though while being emerged, and the configurator stuff flys past it says the n_hldc line discipline is there.

What's the best way to get the rp_pppoe.so or whatever that file was into gentoo?

What's the best way to get the init script into gentoo? (next question: how would you add it in?  :Razz: )

Why does synchronous ppp not work?

----------

## TwistedKestrel

Alright ... is there any way to emerge something, but stop it from deleting it's temporary files? As far I can tell, it builds rp_pppoe.so, but throws it away once it's done copying all the files to their places.

----------

## Chris W

You can manually step through the emerge process using the ebuild command.  Read the Gentoo Linux Developer's HowTo.  You should also read the ebuild for rp-pppoe to see what it does: it may be obviously missing something.

----------

## TwistedKestrel

Man this is a lot of work.

Okay, I appreciate your time Chris W. Unfortunately by the time I read the forums again, I had already discovered the ebuild command.   :Embarassed: 

Heres what I've found so far:

When rp-pppoe is doing it's ./configure thing, it can take an extra parameter, --enable-plugin=/path/to/pppd/tree/compiled/ . So I tried to guess what options ebuild runs ./configure with, and threw that in there. It almost worked, but it doesn't compile ... it stops somewhere complaining about undeclared functions. So we're talking different versions here.

Also, reading the ChangeLog for pppd's ebuild, I discovered that, in theory, it builds something like the plugin, but it unfortunately doesn't work. Curiously, although the version of pppd in there is patched specifically for kernel-mode pppoe, and builds it by default, it throws it away. I was wrong about rp-pppoe; it does not build that.

So far as I can tell, I need a mix of either an older rp-pppoe, or a newer pppd ... I think I'll give the older rp-pppoe a shot with the pppoe.so the pppd ebuild generates.

----------

## TwistedKestrel

 *Quote:*   

> Changes from Version 3.3 to 3.4:
> 
> - INCOMPATIBILITY WITH EARLIER VERSIONS:
> 
>   Kernel-mode plugin now is built against latest CVS ppp source rather than
> ...

 

From rp-pppoe's changelog, or 'doc/CHANGES'

----------

## WarMachine

I had a terrible time getting PPPoE to work way back when.  I did resolve the problem and get it going a while back.  I remember basically what I did was build nothing directly related to PPP, pppd, or PPPoE directly into the kernel.  If it needed to be added it had to be done as a module; search for my thread though I don't start that many so it shouldn't be too difficult.

----------

## WarMachine

I also remember much better things being said about rp-pppoe than the kernel's thing when I was on that project.

----------

## Forse

Install ppp from CVS and get rp-pppoe latest sources Can't ever go wrong with sources  :Cool: 

----------

## TwistedKestrel

WarMachine: rp-pppoe works great already. I'm just trying to fix what isn't broke on my machine.  :Razz:  Seriously, I'm just trying to kick down CPU usage on pppoe as much as possible.

Forse (or anybody else, for that matter): Alright, which leads me to another question ... what is the friendliest way possible to install ppp from CVS?

(And the n_hldc line discipline thing still has me pretty stumped too.)

----------

## Forse

Well. First 

```
emerge -C ppp rp-pppoe
```

 Just do this:

```
1) Check out the latest version of the PPP software from the CVS

repository at cvs.samba.org.  Here's how to do this:

        cvs -d :pserver:cvs@pserver.samba.org:/cvsroot login

        # When prompted for a password, type "cvs"

        # Change to the directory in which you want to store the PPP source

        # code.

        cd /path/to/checked/out/sources

        # Check out the source

        cvs -z5 -d :pserver:cvs@pserver.samba.org:/cvsroot co ppp

2) The source gets checked out into a subdirectory called ppp.  If

the source ends up in /path/to/checked/out/sources/ppp, then call

that path $PPPDIR.

Build and install the checked-out ppp code according to its instructions.

3) Unpack rp-pppoe.

3) In the rp-pppoe directory, change to src/ and type:

        ./configure --enable-plugin=$PPPDIR

where $PPPDIR, of course, refers to the checked-out "ppp" directory

from cvs.samba.org.

4) Type make; make install

5) Edit /etc/ppp/pppoe.conf to include this line:

        LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so

After that, adsl-start should use kernel-mode PPPoE.
```

BTW, kernel mode pppoe is best coz it will work with 64mb of ram (32 if you use NetBSD) and it will work even on pentium 90 (my router is p90   :Cool:   )

----------

## TwistedKestrel

Heh. I guess I should say that my Gentoo box, keeping in mind it's not a primary machine for anything, only has 32MB of RAM and runs normal user-space rp-pppoe. However .... it jackhammers on the swap file whenever I'm emerging something big  :Razz: . Hell, sometimes it swaps out when 'emerge' gets called.

In any case, it looks like I'm about to wrap this up. Will post one more time if it works, and if not ... well, you'll hear from me again.  :Razz: 

----------

## Forse

32MB ram with gentoo...Hmm I guess some people just enjoy pain   :Twisted Evil: 

----------

## bludger

Why do you guys all use user-mode rp-pppoe?  From what you tell me it seems to hog resources.  Kernel mode pppoe has been running stably for a long time now.  I have been using it for well over a year.  SuSE has also supported it for some time directly from Yast without any hacking necessary.  Oh well, it looks as though I will have to do some scripting to get it working under gentoo.  If I get it working cleanly, I will post my results, that is unless someone else can beat me to it (I couldn't see anything in the forum).

----------

## bludger

Ok I take it back.  I see that rp-pppoe supports kernel mode ppp.  The question now is why use this plugin (rp-pppoe.so) when pppd already includes pppoe.so?

----------

## firaX

i followed the kernel mode instructions posted above, and it seems to start fine but adsl-status tells me "link attached but ppp0 is down"

ps ax shows me the pppd process tho , so it does load but doesnt connect !? User mode works fine !

----------

## joneskoo

Same here. Doesn't work. I followed the instructions in rp-pppoe/doc/KERNEL-MODE-PPPOE whatever (which happen to be exactly the same Forse posted  :Wink: 

It looks to connect fine but it doesn't.

Sync mode is enabled (doesn't work it disabled tho) and self-compiled from the latest .tar.gz and CVS snapshot. pppd stays alive and actually is hard to kill (adsl-stop doesn't kill it, need to use killall -9 pppd).

the pppd version from CVS is 2.4.2b3. I had a working setup before, the pppd version was 2.4.2b1 I think, could have been 2.4.2b2 too though.

Usermode sync and async work great and I have N_HDLC in the kernel (it was hard to find in non-standard serial port support section). No module support here.

Perhaps we should ask the ppp developers if there has been any major changes between those beta versions.

----------

## firaX

sorry for not replying! You re right about the pppd version, 2.4.2b3 is actually a major change, which breaks rp pppoe kernel mode.

Get 2.4.2b2 , this one works fine for me! 

you can still get it at http://nibs.net.ua/src/pppd-2.4.2/

----------

## joneskoo

Wonder if they're going to fix that in rp-pppoe anytime soon?

firaX, no problem, I wasn't actively checking about this either. I hope not too many have had problems because this sure is quite important for quite a lot ADSL users (and not just ADSL, some WLAN and me not using ADSL but Cisco LRE, some propiertary stuff my ISP keeps calling VDSL tho it's not).

I'll try that later, wonder if it's available from any official source or something?

Oh and why do they keep changing the way it works every now and then?

There are atleast two, propably three or more implementations of Linux kernelmode PPPoE afaik, really weird not to implement it properly the first time

----------

## firaX

god knows but since 2.4.2 is cvs still and not officially released changes that break things can happen  :Smile: 

I ve researched what has changed and its actually the MTU check. if you run adsl-connect instead of adsl-start you get something like a debug output which gives you "CANT INCREASE MTU to 1500" 

That error is ignored in 2b2 but halts the connect in 2b3 due to more critical checks.

Obviously we dont want a MTU of 1500 for a pppoe connection since it needs 8 bytes for the header = 1492 as MTU value not 1500 so its kinda weird why it wants to have 1500....

----------

