Does not establish pppoe connection

Hello all together,

I have the problem to get pppoe to run.

My environment looks like I used a PC Engines APU.4D2/4D4 as hardware, but I have also tested it in a vm. Currently opnsense is installed and I would like to switch to vyos.
Now I have the problem that pppoe does not work. In opnsense it works fine. The internetprovider is ewetel, which is an internet provider in northern germany. As modem I use a DrayTek Vigor130, which passes the pppoe. The pppoe connection itself is available via vlan 7.

config vyos

These are the parameters in vyos:

set interfaces ethernet eth0 vif 7 description 'VDSL'
#set interfaces pppoe pppoe0 default-route 'auto'
set interfaces pppoe pppoe0 default-route 'force'
set interfaces pppoe pppoe0 mtu 1492
set interfaces pppoe pppoe0 authentication user 'n00123456#100@ab-c.de'
set interfaces pppoe pppoe0 authentication password 'testtest'
set interfaces pppoe pppoe0 source-interface 'eth0.7'
set interfaces pppoe pppoe0 service-name '1'

Username and password is anominized

I tested with vyos version 1.3 from 202205161705 and 202212201603 and copy the username and password directly from opnsense.

Config opnsense

This is the config in opnsense:

Debug

I used tcpdump to capture the network traffic on the wan port. I can’t upload cap/pcapng, so i exported it as txt via wireshark. I have anomized this and replaced the mac-address, ip-addresses, host-uniq, ac-name, ac-cockie as well as the value value in the ppp chap challengeresponse.

This is the traffic:
opnsense: pppoe-opnsense.txt (4.9 KB)
vyos: pppoe-vyos.txt (4.2 KB)

If you need more info, please just let me know.

Hi @caskote,

this sounds very odd as it’s a frequent use-case. I am not an ewete customer but use Deutsche Telekom FTTH and also VDSL2 with the Vigor Modem.

This is my configuration:

set firewall options interface pppoe0 adjust-mss '1452'
set interfaces pppoe pppoe0 authentication password xxxxxx
set interfaces pppoe pppoe0 authentication user xxxxxx
set interfaces pppoe pppoe0 default-route 'auto'
set interfaces pppoe pppoe0 no-peer-dns
set interfaces pppoe pppoe0 source-interface 'eth3.7'
set nat source rule 100 outbound-interface 'pppoe0'
set nat source rule 100 source address '172.16.32.0/21'
set nat source rule 100 translation address 'masquerade'

Can you tell us what exactly is not working? Please have a live-view of the system log using: monitor log | match ppp

I had some issues getting PPPoE getting up and running myself, but in the end the only thing missing was:

set interfaces pppoe pppoe0 ip adjust-mss '1452'

This is for vyos 1.4, so syntax might be different for your configuration.

Hi @c-po,

I also find this very strange, I use this config myself for telekom.

So the problem is that vyos can not connect to the internet and therefore does not create a pppoe interface.

Logs

Here are the logs for my config and yours:

config:

set interfaces ethernet eth0 vif 7 description 'VDSL'
#set interfaces pppoe pppoe0 default-route 'auto'
set interfaces pppoe pppoe0 default-route 'force'
set interfaces pppoe pppoe0 mtu 1492
set interfaces pppoe pppoe0 authentication user 'n00123456#100@ab-c.de'
set interfaces pppoe pppoe0 authentication password 'testtest'
set interfaces pppoe pppoe0 source-interface 'eth0.7'
set interfaces pppoe pppoe0 service-name '1'

log:

Jan  2 08:46:22 vyos pppd[1355]: Timeout waiting for PADO packets
Jan  2 08:46:22 vyos pppd[1355]: Unable to complete PPPoE Discovery
Jan  2 08:46:52 vyos kernel: [   86.293653] pppoe0: renamed from ppp0
Jan  2 08:46:52 vyos pppd[1355]: PPP session is 116
Jan  2 08:46:52 vyos pppd[1355]: Connected to 30:b6:4f:e3:a3:d1 via interface eth0.7
Jan  2 08:46:52 vyos pppd[1355]: Renamed interface ppp0 to pppoe0
Jan  2 08:46:52 vyos pppd[1355]: Using interface pppoe0
Jan  2 08:46:52 vyos pppd[1355]: Connect: pppoe0 <--> eth0.7
Jan  2 08:46:52 vyos bgpd[888]: [EC 100663301] INTERFACE_STATE: Cannot find IF ppp0 in VRF 0
Jan  2 08:46:52 vyos systemd-udevd[1756]: link_config: could not get ethtool features for ppp0
Jan  2 08:46:52 vyos systemd-udevd[1756]: Could not set offload features of ppp0: No such device
Jan  2 08:46:53 vyos pppd[1355]: CHAP authentication failed: User check attributes mismatch
Jan  2 08:46:53 vyos pppd[1355]: CHAP authentication failed
Jan  2 08:46:53 vyos pppd[1355]: Modem hangup
Jan  2 08:46:53 vyos pppd[1355]: Connection terminated.
Jan  2 08:46:53 vyos bgpd[888]: [EC 100663301] INTERFACE_STATE: Cannot find IF pppoe0 in VRF 0
Jan  2 08:46:53 vyos pppd[1355]: Sent PADT

config:

set firewall options interface pppoe0 adjust-mss '1452'
set interfaces pppoe pppoe0 authentication user 'n00123456#100@ab-c.de'
set interfaces pppoe pppoe0 authentication password 'testtest'
set interfaces pppoe pppoe0 default-route 'auto'
set interfaces pppoe pppoe0 no-peer-dns
set interfaces pppoe pppoe0 source-interface 'eth0.7'

log:

Jan  2 08:50:40 vyos pppd[2158]: Plugin rp-pppoe.so loaded.
Jan  2 08:50:40 vyos pppd[2158]: Plugin rp-pppoe.so loaded.
Jan  2 08:50:40 vyos pppd[2158]: pppd 2.4.7 started by root, uid 0
Jan  2 08:50:40 vyos vyos-configd[604]: Received message: {"type": "node", "data": "VYOS_TAGNODE_VALUE=pppoe0/usr/libexec/vyos/conf_mode/firewall_options.py"}
Jan  2 08:50:55 vyos kernel: [   71.350021] pppoe0: renamed from ppp0
Jan  2 08:50:55 vyos pppd[2158]: PPP session is 25
Jan  2 08:50:55 vyos pppd[2158]: Connected to 30:b6:4f:e3:a3:d1 via interface eth0.7
Jan  2 08:50:55 vyos pppd[2158]: Renamed interface ppp0 to pppoe0
Jan  2 08:50:55 vyos pppd[2158]: Using interface pppoe0
Jan  2 08:50:55 vyos pppd[2158]: Connect: pppoe0 <--> eth0.7
Jan  2 08:50:55 vyos bgpd[882]: [EC 100663301] INTERFACE_STATE: Cannot find IF ppp0 in VRF 0
Jan  2 08:50:55 vyos systemd-udevd[2249]: link_config: could not get ethtool features for ppp0
Jan  2 08:50:55 vyos systemd-udevd[2249]: Could not set offload features of ppp0: No such device
Jan  2 08:50:56 vyos pppd[2158]: CHAP authentication failed: User check attributes mismatch
Jan  2 08:50:56 vyos pppd[2158]: CHAP authentication failed
Jan  2 08:50:56 vyos pppd[2158]: Modem hangup
Jan  2 08:50:56 vyos pppd[2158]: Connection terminated.
Jan  2 08:50:56 vyos bgpd[882]: [EC 100663301] INTERFACE_STATE: Cannot find IF pppoe0 in VRF 0
Jan  2 08:50:56 vyos pppd[2158]: Sent PADT

@rasmuoy , this config not exist in the version 1.4, the alternative is the config from @c-po:

set firewall options interface pppoe0 adjust-mss '1452'

But this does not solve the problem, thanks for this.

@caskote looks like an authentication issue (CHAP). Can you paste the connection file from /etc/ppp/peers/ of your opnsense installation?

@c-po the folder “/etc/ppp/peers” does not exist in the system, only the folder “/etc/ppp”. In this folder the file “ppp.conf” exist:

#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD$
#################################################################

default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION

 # Ensure that "device" references the correct serial port
 # for your modem. (cuau0 = COM1, cuau1 = COM2)
 #
 set device /dev/cuau1

 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 set timeout 180			# 3 minute idle timer (the default)
 enable dns				# request DNS info (for resolv.conf)

papchap:
 #
 # edit the next three lines and replace the items in caps with
 # the values which have been assigned by your ISP.
 #

 set phone PHONE_NUM
 set authname USERNAME
 set authkey PASSWORD

 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR			# Add a (sticky) default route

u3g:
 set device /dev/cuaU0.0
 set phone *99\#
 set timeout 0
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR			# Add a (sticky) default route

Does anyone else have an idea what the problem could be?

Just spitballing here, but could it be that your username or password has a character in it that VYOS doesn’t want…?
For example, for the username:

User names may contain only alphanumerical characters, hyphens, and underscores

Hi @TonyArr, thanks for this idee but i don’t think this is the problem.

The username contains alphanumerical characters, #, @, - and . This are the same characters as by my telekom dsl username, there it works.

For the password exist no check: vyos-pppoe-server/templates-cfg/service/pppoe-server/authentication/local-users at current · vyos/vyos-pppoe-server · GitHub, so i think i don’t have any problem. I have nevertheless compared the passwords and the only difference is that the ewetel password contains a = which the telekom paassword does not contain.

I mean, that seems to be exactly it. Vyos is filtering out the #, @ and . when you save the username, so it is trying to log in to your ISP with your username missing those characters, so your ISP would be responding with “I don’t know that user”.

@c-po, does that seem right?

service/pppoe-server/authentication/local-users/username/node.def

${vyos_libexec_dir}/validate-value.py --regex \'^[a-zA-Z0-9\-_]+\'

Glad You posted this thread, I’ve been planning to replace my ISP’s antiquated modem/router with a Draytek modem like yours (though Vigor130s aren’t available down under, sadly) and bridge it over to Vyos for use as a firewall, and they use an email address as the username as well, so I’d definitely get stung by the same error.

I’d say it is worth making this a formal bug report, symbols like @ and . seem obvious to allow for use in usernames. # might have special functionality in their configuration files so it might take extra work to include it without unexpected results…

I’d write a patch to try out, but any code I write becomes property of my employer so best left for someone less encumbered by contracts :sweat_smile:

You are trying to find issue for pppoe-client in outdated pppoe-server repo :slight_smile:
There is a regex for pppoe-client username vyos-1x/generic-username.xml.i at c820be57b6c77cdb0a5055d0c3a77dc8d550e2d7 · vyos/vyos-1x · GitHub

Ahhhhh ok totally scratch that then :sweat_smile:

I had searched the GitHub org for “pppoe” and that was where I had ended up. Still got a long way to go to properly learn the layout of it all. Sorry to be a time sink!