# ppp/rp-pppoe configuration for new udev-215 without ethx

## Snaketails

Now my system is upgraded to udev-215 how do I get pppoe working to talk to my isp? 

I used to have /dev/eth4 (the port the adsl is connected on)

Now that port is named enp4s0,  ok I can handle that, but how does pppd see it as a pppoe session?

 But now when I boot my system,  it doesn't recognize the new port assignment,  I'm assuming that it is looking for enp4s0 in /dev but it is no longer there, it is in /sys

Hate forum posting from a mobile...

----------

## Snaketails

this is a real PITA...

it seems the line - link_ppp0="enp4s0" within /etc/conf.d/net is the device that pppd will use to connect to the ethernet port

ifconfig -a      finds a non-config'd enp4s0  so the interface is available

there is no /dev/enp* devices, so I'm guessing there is no longer a file in /dev for ethernet ports?

looking in man pppd...

Frequently used options

ttyname

     If ttyname does not begin with a slash (/), the string "/dev/" is prepended to ttyname to form the name of thedevice to open

So, therefore, pppd is trying to open /dev/enp4s0 which  I have already said doesn't exist within the /dev directory

So... where is this #$%# device located now ???

/sys/class/net/enp4s0      this is a subdirectory, so I am sure its not a devce

/sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/0000:04:00/net/enp4s0     this is also a subdirectory, I assume that the above line "class" is a sym link to this line

how do I get pppd working, this will be costing me mobile internet trying to get my ADSL running again  :Sad: 

----------

## Snaketails

Ok, update time..

AS no one has any ideas or anything about whats happening, I have had to play with the system and debug this critter....   thank so much for the help..

Ok, with Ethernet ports now running "Predictable Network Interface Names"

Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme ("eth0", "eth1", "wlan0", ...), but should fix real problems. 

http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Now, there is a issue with this, and the latest where

```

You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)

```

Thats fine, until v215 which I installed, and it wouldn't accept that line, and thus, no /dev/eth0 or even a /dev/enp4s1  this is a problem with the ppp configs to use pppoe

why is that??

Because the ppp module for ethernet requires the path /dev/<device>

```

ttyname

              Use the serial port called ttyname to communicate with the peer.  If ttyname does not begin with a slash (/), the string "/dev/" is  prepended  to  ttyname  to

              form  the  name of the device to open.  If no device name is given, or if the name of the terminal connected to the standard input is given, pppd will use that

              terminal, and will not fork to put itself in the background.  A value for this option from a privileged source cannot be overridden by a non-privileged user.

```

Now, in the /etc/conf.d/net file ( the part that is called from /etc/init.d/net.ppp0 that is the ADSL configs

```

#-----------------------------------------------------------------------------

# PPP

# For PPP support, emerge net-dialup/ppp

# PPP is used for most dialup connections, including ADSL.

# The older ADSL module is documented below, but you are encouraged to try

# this module first.

#

# You need to create the PPP net script yourself. Make it like so

#ln -s net.lo /etc/init.d/net.ppp0

# We have to instruct ppp0 to actually use ppp

config_ppp0="ppp"

#

# Each PPP interface requires an interface to use as a "Link"

#link_ppp0="/dev/ttyS0"                 # Most PPP links will use a serial port

link_ppp0="enp4s1"      # PPPoE requires an ethernet interface

#link_ppp0="eth4"       # PPPoE requires an ethernet interface

#link_ppp0="[itf.]vpi.vci"              # PPPoA requires the ATM VC's address

#link_ppp0="/dev/null"                  # ISDN links should have this

#link_ppp0="pty 'your_link_command'"    # PPP links over ssh, rsh, etc

# Here you should specify what pppd plugins you want to use

#Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,

#                        radattr, radrealms and winbind

plugins_ppp0=   "pppoe"                 # Required plugin for PPPoE

```

As stated in the pppd man page, if you leave out a preceding /dev/ the pppd script will prepended it for you, but as the /dev/<device> doesn't exist, this is futile, and it barfs with a error that the device doesn't exist.

Ok, I found a link to Arch Linux that has a config for rp-pppoe, AND it actually talked about Predictable Network Interface Names

https://wiki.archlinux.org/index.php/router

```

Conventions

Conventions in this guide will be to use non-realistic interface names, to avoid confusion about which interface is which.

    intern0: the network card connected to the LAN. On an actual computer it will probably have the name enp2s0, enp1s1, etc.

    extern1: the network card connected to the external network (or WAN). It will probably have the name enp2s0, enp1s1, etc.

Persistent naming and Interface renaming

Systemd automatically chooses unique interface names for all your interfaces. These are persistent and will not change when you reboot.

```

Now, this is what I have been looking for.

I already had rp-pppoe installed, so, I went thru "pppoe-setup"

```

#***********************************************************************

#

# pppoe.conf

#

# Configuration file for rp-pppoe.  Edit as appropriate and install in

# /etc/ppp/pppoe.conf

#

# NOTE: This file is used by the pppoe-start, pppoe-stop, pppoe-connect and

#       pppoe-status shell scripts.  It is *not* used in any way by the

#       "pppoe" executable.

#

# Copyright (C) 2000 Roaring Penguin Software Inc.

#

# This file may be distributed under the terms of the GNU General

# Public License.

#

# LIC: GPL

# $Id: pppoe.conf,v 1.11 2005/08/09 02:49:12 dfs Exp $

#***********************************************************************

# When you configure a variable, DO NOT leave spaces around the "=" sign.

# Ethernet card connected to DSL modem

#

# NB: Gentoo overrides ETH when pppoe-start is called from the

# networking scripts.  This setting has no effect in that case.

ETH='enp4s1'

# PPPoE user name.  You may have to supply "@provider.com"  Sympatico

# users in Canada do need to include "@sympatico.ca"

# Sympatico uses PAP authentication.  Make sure /etc/ppp/pap-secrets

# contains the right username/password combination.

# For Magma, use xxyyzz@magma.ca

USER='snaketails@myisp'

# Bring link up on demand?  Default is to leave link up all the time.

# If you want the link to come up on demand, set DEMAND to a number indicating

# the idle time after which the link is brought down.

DEMAND=no

#DEMAND=300

# DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;

# NOCHANGE=do not adjust.

DNSTYPE=NOCHANGE

# Obtain DNS server addresses from the peer (recent versions of pppd only)

# In old config files, this used to be called USEPEERDNS.  Changed to

# PEERDNS for better Red Hat compatibility

PEERDNS=no

DNS1=

DNS2=

# Make the PPPoE connection your default route.  Set to

# DEFAULTROUTE=no if you don't want this.

DEFAULTROUTE=yes

### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT

# How long pppoe-start waits for a new PPP interface to appear before

# concluding something went wrong.  If you use 0, then pppoe-start

# exits immediately with a successful status and does not wait for the

# link to come up.  Time is in seconds.

#

# WARNING WARNING WARNING:

#

# If you are using rp-pppoe on a physically-inaccessible host, set

# CONNECT_TIMEOUT to 0.  This makes SURE that the machine keeps trying

# to connect forever after pppoe-start is called.  Otherwise, it will

# give out after CONNECT_TIMEOUT seconds and will not attempt to

# connect again, making it impossible to reach.

CONNECT_TIMEOUT=30

# How often in seconds pppoe-start polls to check if link is up

CONNECT_POLL=2

# Specific desired AC Name

ACNAME=

# Specific desired service name

SERVICENAME=

# Character to echo at each poll.  Use PING="" if you don't want

# anything echoed

PING="."

# File where the pppoe-connect script writes its process-ID.

# Three files are actually used:

#   $PIDFILE       contains PID of pppoe-connect script

#   $PIDFILE.pppoe contains PID of pppoe process

#   $PIDFILE.pppd  contains PID of pppd process

#

# NB: Gentoo overrides PIDFILE when pppoe-start is run from the

# networking scripts.  This setting has no effect in that case.

PIDFILE="/var/run/$CF_BASE-pppoe.pid"

# Do you want to use synchronous PPP?  "yes" or "no".  "yes" is much

# easier on CPU usage, but may not work for you.  It is safer to use

# "no", but you may want to experiment with "yes".  "yes" is generally

# safe on Linux machines with the n_hdlc line discipline; unsafe on others.

SYNCHRONOUS=no

# Do you want to clamp the MSS?  Here's how to decide:

# - If you have only a SINGLE computer connected to the DSL modem, choose

#   "no".

# - If you have a computer acting as a gateway for a LAN, choose "1412".

#   The setting of 1412 is safe for either setup, but uses slightly more

#   CPU power.

CLAMPMSS=1412

#CLAMPMSS=no

# LCP echo interval and failure count.

LCP_INTERVAL=20

LCP_FAILURE=3

# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL

PPPOE_TIMEOUT=80

# Firewalling: One of NONE, STANDALONE or MASQUERADE

FIREWALL=NONE

# Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode

# plugin, use LINUX_PLUGIN=rp-pppoe.so

LINUX_PLUGIN=

# Any extra arguments to pass to pppoe.  Normally, use a blank string

# like this:

PPPOE_EXTRA=""

# Rumour has it that "Citizen's Communications" with a 3Com

# HomeConnect DSL Modem DualLink requires these extra options:

# PPPOE_EXTRA="-f 3c12:3c13 -S ISP"

# Any extra arguments to pass to pppd.  Normally, use a blank string

# like this:

PPPD_EXTRA=""

########## DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING

# If you wish to COMPLETELY overrride the pppd invocation:

# Example:

# OVERRIDE_PPPD_COMMAND="pppd call dsl"

# If you want pppoe-connect to exit when connection drops:

# RETRY_ON_FAILURE=no

```

This line -> ETH='enp4s1'

Ok, now using this, rp-pppoe creates a new device itself to bind to the non-existant ethernet port devie in /dev, this new port is called /dev/pts/x (the x is a number that is created by rp-pppoe) the one thats currently connected is /dev/pts/5

```

ls -la /dev/pts/5

crw--w----  1 root tty  136, 4 Oct  6 20:49 5

```

Now I have ADSL running thru the DSL modem in bridge configuration.

```

Oct  6 17:29:10 jumpgate pppd[21810]: pppd 2.4.7 started by root, uid 0

Oct  6 17:29:10 jumpgate pppd[21810]: Using interface ppp0

Oct  6 17:29:10 jumpgate pppd[21810]: Connect: ppp0 <--> /dev/pts/5

Oct  6 17:29:12 jumpgate pppd[21810]: CHAP authentication succeeded

Oct  6 17:29:12 jumpgate pppd[21810]: CHAP authentication succeeded

Oct  6 17:29:12 jumpgate pppd[21810]: local  IP address <my static IP>

Oct  6 17:29:12 jumpgate pppd[21810]: remote IP address <ISP gateway>

```

Ok, this is where I am currently, now I have to work out how to get this going with the connect scripts, doing a search on the Gentoo wiki really doesn't look promising  :Sad: 

http://www.gentoo-wiki.info/PPPoE

```

Warning: If you are setting PPPoE up for the first time, this method is not encouraged or recommended. It is also not recommended even if you already have an rp-pppoe-based setup. For one thing, the adsl module will eventually be removed, and all PPPoE configuration will be done with the ppp module. For another, look at it like this: with rp-pppoe by way of the adsl module, the situation 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 by rp-pppoe 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: setting up (very) basic firewalls, and things like its link-status script. Using the ppp module is much more direct: 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 determined, and it runs pppd. When it's done, the only process running is pppd itself. Using rp-pppoe, other processes will hang out in the background doing stuff you don't need. Now that the rp-pppoe plugin is a standard part of net-dialup/ppp, an extra userspace package and its associated scripts and config files is simply unecessary. Granted, it's got a nice "Just answer a few simple questions" script for configuration, but that's about its only advantage.

```

The worrying part is "the adsl module will eventually be removed"   Oh, so this may not be the approach I'm after...

ALL the configs on that page relate to the device that the pppoe link is opened on is a /dev/eth0 port, but that no longer exists as a useable device.

So, after all this new information, can I please get some help now???

----------

