# Interesting problem with rp-pppoe

## Oliazk

Ok I know this might not be very technical but hopefully I can get across what I want to say.

I have a gentoo firewall works great and everything. Recently I rebuilt it on another computer with everything updated mainly because of the time changes and other things I wanted on it but it didn't have. So when I went to deploy it I found out like normal I forgot to configure some things so fixed most of that. 

There is one thing that I am having a problem with its my dsl connection. I have an older Sprint(yes Sprint I know they are embarq now but has sprint on it) modem works great, and yet not the problem. 

The problem is when I connect using this :

```
config_ppp0=( "ppp" )

link_ppp0="eth0"

plugins_ppp0=( "pppoe" )

pppd_ppp0=(

         "defaultroute"

         "usepeerdns"

)

username_ppp0="...."

password_ppp0="...."

```

When I connect using the above I cannot connect to some websites or they do not stop loading. I am not sure why but I do not believe it has to do the mtu. 

When I am connected using the what is below everything works just fine.  Now I know that the adsl is become deprecated but it works for my connection.

```
config_eth0=( "adsl dhcp" )

adsl_user_eth0=( "...." )

dhcpcd_eth0="-N -R -h rofi -t 5"

```

What I would like to know is why the ppp would not work and why the adsl does, and if there is a way to get the ppp to work properly. I also have a bridge my net config file for my network and for my openvpn but my tap0 doesn't exist anymore for some reason.

----------

## didymos

 *Oliazk wrote:*   

> 
> 
> I am not sure why but I do not believe it has to do the mtu. 
> 
> 

 

Well, I have to ask: but why not the mtu?  Have you tried setting that and the mru to 1492 (or less)?

Oh, and the adsl config method?  Still uses rp-pppoe, and thus ppp.  I'll check, but I'm betting it sets the mtu/mru by default.

----------

## didymos

Well, I lose that bet.  This time, I'll merely speculate that /etc/ppp/pppoe.conf is setting the mtu, and the adsl script is getting it from there.

----------

## didymos

Alright. Found it.  It is set by default in a script, only a different script.  It's in the pppoe-connect script used by rp-pppoe.  Here's what it has:

```

PPP_STD_OPTIONS="$PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu 1492 mru 1492 noaccomp nodeflate no

pcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"

```

All the variables come from the settings in pppoe.conf.

----------

## Oliazk

I think its not the MTU because they end up being the same. I looked at the ppp0 device when I ran each of them. What I am trying to figure out is why the first set of code causes me to have connection problems while the second set of code does not. 

It Does not make sense that the first set of code causes me to have such problems. While the second does not.

edit:

By the way I am using he second set of code right now.

----------

## Oliazk

Ok not sure what I was thinking when I posted last. 

So here is another question for you if I were to set all those into the first set of code would it work correctly? Do you think they will take adsl out of rp-pppoe ? I am asking because I would like to have the first set of code work if that were to happen. 

Also thanks for looking that up I did not think of looking in those files for something like that.

----------

## toralf

But what's about https://bugs.gentoo.org/show_bug.cgi?id=159747#c16 ?

----------

## didymos

 *Oliazk wrote:*   

> So here is another question for you if I were to set all those into the first set of code would it work correctly?

 

I don't see why not.  All that rp-pppoe does, basically, is run pppd with options appropriate to pppoe connections.  The adsl module (just some bash functions, actually) of baselayout runs rp-pppoe which then runs pppd. The latest net-dialup/ppp uses a plugin for pppoe connections, rp-pppoe.so, which as you can see comes from the rp-pppoe client. That's why rp-pppoe as a separate package isn't necessary anymore for client connections to your ISP.  rp-pppoe will probably stay in portage since it allows you to get a pppoe server up fairly easily, though I'm pretty sure that even for that, it's not needed anymore.

 *Quote:*   

> Do you think they will take adsl out of rp-pppoe ? I am asking because I would like to have the first set of code work if that were to happen.

 

The adsl part of baselayout will go away.  I don't know when. The situation with the adsl module is that you have the net.lo initscript, which then runs functions from the adsl.sh rcscript.  One of those then runs /etc/ppp/pppoe-start which runs /etc/ppp/pppoe-connect which finally runs pppd.  Throughout all that other files are opened for config data, and there's a bunch of redundancy all around.  Stopping the connection is a similarly layered process.  Then you have the all extra stuff rp-pppoe does, like setting up basic firewalls, and the link-status script.  All that crap is easily handled by the Gentoo initscripts. So, using the new baselayout way of doing things, you've got this:  net.lo is called with the name net.ppp0, so it then runs the pppd_start function from the pppd.sh rcscript, the ppp config data is read from /etc/conf.d/net, error checking is done and the type of connection is determined, and it runs pppd.   I'm glossing over a bunch of stuff that the baselayout system does and can do (like your own custom functions defined in /etc/conf.d/net, the modules system for config tools, dependency checking), but that's essentially what happens.  It's much more direct and consistent when you do things the new way, and the configuration is more centralized.

----------

## mrness

It is a MTU problem, just not that kind of problem which can be solved with pppd options.

You need to use iptables to clamp MSS (see this topic)

----------

