I have a Unifi Security Gateway that I am trying to set up as a replacement for the router issued by my ISP, KPN. They provide these instructions (in Dutch, page 6). As far as I understand it, it all boils down to running PPPoE with any username and password on VLAN 6.
I tried setting this up through Luci, and was able to get a connection... sort of. Here is the relevant part of /etc/config/network
:
config device
option type '8021q'
option ifname 'eth0'
option vid '6'
option name 'eth0.6'
config interface 'wan'
option device 'eth0.6'
option proto 'pppoe'
option username 'internet'
option password 'internet'
option ipv6 '1'
option mtu '1500'
config interface 'wan6'
option device 'pppoe-wan'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
When I ran a ping test, I saw a lot of packets being lost:
root@OpenWrt:~# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=60 time=3.030 ms
64 bytes from 1.1.1.1: seq=1 ttl=60 time=1.972 ms
64 bytes from 1.1.1.1: seq=2 ttl=60 time=3.100 ms
64 bytes from 1.1.1.1: seq=3 ttl=60 time=2.549 ms
64 bytes from 1.1.1.1: seq=5 ttl=60 time=2.485 ms
64 bytes from 1.1.1.1: seq=6 ttl=60 time=17.950 ms
64 bytes from 1.1.1.1: seq=8 ttl=60 time=3.640 ms
64 bytes from 1.1.1.1: seq=10 ttl=60 time=2.108 ms
^C
--- 1.1.1.1 ping statistics ---
11 packets transmitted, 8 packets received, 27% packet loss
round-trip min/avg/max = 1.972/4.604/17.950 ms
Shortly after that, the PPPoE connection dropped.
I found the following output from pppd
in the logs:
Mon Jan 15 20:39:34 2024 daemon.notice netifd: Interface 'wan' is setting up now
Mon Jan 15 20:39:34 2024 daemon.info pppd[3318]: Plugin pppoe.so loaded.
Mon Jan 15 20:39:34 2024 daemon.info pppd[3318]: PPPoE plugin from pppd 2.4.9
Mon Jan 15 20:39:34 2024 daemon.notice pppd[3318]: pppd 2.4.9 started by root, uid 0
Mon Jan 15 20:39:34 2024 daemon.info pppd[3318]: PPP session is 19894
Mon Jan 15 20:39:34 2024 daemon.warn pppd[3318]: Connected to [redacted MAC 1] via interface eth0.6
Mon Jan 15 20:39:34 2024 daemon.info pppd[3318]: Using interface pppoe-wan
Mon Jan 15 20:39:34 2024 daemon.notice pppd[3318]: Connect: pppoe-wan <--> eth0.6
Mon Jan 15 20:39:35 2024 daemon.info pppd[3318]: Remote message: Authentication success,Welcome!
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: PAP authentication succeeded
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: peer from calling number [redacted MAC 1] authorized
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: local LL address [redacted IPv6 1]
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: remote LL address [redacted IPv6 1]
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: local IP address [redacted IPv4 1]
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: remote IP address [redacted IPv4 2]
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: primary DNS address 195.121.1.34
Mon Jan 15 20:39:35 2024 daemon.notice pppd[3318]: secondary DNS address 195.121.1.66
Mon Jan 15 20:39:35 2024 daemon.notice netifd: Network device 'pppoe-wan' link is up
Mon Jan 15 20:39:35 2024 daemon.notice netifd: Interface 'wan' is now up
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using nameserver 195.121.1.34#53
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using nameserver 195.121.1.66#53
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Mon Jan 15 20:39:35 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Mon Jan 15 20:39:35 2024 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)
Mon Jan 15 20:39:37 2024 user.notice firewall: Reloading firewall due to ifupdate of wan (pppoe-wan)
Mon Jan 15 20:39:41 2024 daemon.info pppd[3318]: No response to 5 echo-requests
Mon Jan 15 20:39:41 2024 daemon.notice pppd[3318]: Serial link appears to be disconnected.
Mon Jan 15 20:39:41 2024 daemon.info pppd[3318]: Connect time 0.2 minutes.
Mon Jan 15 20:39:41 2024 daemon.info pppd[3318]: Sent 228 bytes, received 0 bytes.
Mon Jan 15 20:39:42 2024 daemon.notice netifd: Network device 'pppoe-wan' link is down
Mon Jan 15 20:39:42 2024 daemon.notice netifd: Interface 'wan' has lost the connection
After this pppd
was restarted, and it either ran into the same issue with echo-requests, or gave the following output:
Mon Jan 15 20:42:45 2024 daemon.notice netifd: Interface 'wan' is setting up now
Mon Jan 15 20:42:45 2024 daemon.info pppd[5221]: Plugin pppoe.so loaded.
Mon Jan 15 20:42:45 2024 daemon.info pppd[5221]: PPPoE plugin from pppd 2.4.9
Mon Jan 15 20:42:45 2024 daemon.notice pppd[5221]: pppd 2.4.9 started by root, uid 0
Mon Jan 15 20:43:00 2024 daemon.warn pppd[5221]: Timeout waiting for PADO packets
Mon Jan 15 20:43:00 2024 daemon.err pppd[5221]: Unable to complete PPPoE Discovery
Mon Jan 15 20:43:00 2024 daemon.info pppd[5221]: Exit.
Mon Jan 15 20:43:00 2024 daemon.notice netifd: Interface 'wan' is now down
At this point, I reverted to the vendor firmware and entered the same configuration: PPPoE over VLAN 6. This worked immediately.
I then went back to OpenWRT and tried setting up the connection manually, i.e., by removing the configuration in /etc/config/network
, rebooting, and running
ip link add link eth0 name eth0.6 type vlan id 6
ip link set dev eth0 up
ip link set dev eth0.6 up
pppd logfd 1 debug noauth nodetach ifname pppoe-wan user internet password internet mtu 1500 mru 1500 plugin pppoe.so lcp-echo-interval 1 lcp-echo-failure 5 lcp-echo-adaptive +ipv6 nic-eth0.6
This still gave the same results: either the connection drops after five missed failed echoes, or the discovery phase fails. Here are the different kind of outputs I got from pppd
with debug
enabled
Missed echo requests
Plugin pppoe.so loaded.
PPPoE plugin from pppd 2.4.9
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
dst ff:ff:ff:ff:ff:ff src [redacted MAC 1]
[service-name] [host-uniq 00 00 06 d6]
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
dst ff:ff:ff:ff:ff:ff src [redacted MAC 1]
[service-name] [host-uniq 00 00 06 d6]
Recv PPPOE Discovery V1T1 PADO session 0x0 length 34
dst [redacted MAC 1] src [redacted MAC 2]
[service-name] [host-uniq 00 00 06 d6] [AC-name <redacted IPv4 1>] [end-of-list]
Send PPPOE Discovery V1T1 PADR session 0x0 length 12
dst [redacted MAC 2] src [redacted MAC 1]
[service-name] [host-uniq 00 00 06 d6]
Recv PPPOE Discovery V1T1 PADS session 0xfa24 length 16
dst [redacted MAC 1] src [redacted MAC 2]
[service-name] [host-uniq 00 00 06 d6] [end-of-list]
PADS: Service-Name: ''
PPP session is 64036
Connected to [redacted MAC 2] via interface eth0.6
using channel 3
Using interface pppoe-wan
Connect: pppoe-wan <--> eth0.6
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x3075e4a6>]
rcvd [LCP ConfReq id=0x2 <mru 1500> <auth pap> <magic 0x9cd5b684>]
sent [LCP ConfAck id=0x2 <mru 1500> <auth pap> <magic 0x9cd5b684>]
rcvd [LCP ConfAck id=0x1 <mru 1492> <magic 0x3075e4a6>]
sent [LCP EchoReq id=0x0 magic=0x3075e4a6]
sent [PAP AuthReq id=0x1 user="internet" password=<hidden>]
rcvd [LCP EchoRep id=0x0 magic=0x9cd5b684]
rcvd [PAP AuthAck id=0x1 "Authentication success,Welcome!"]
Remote message: Authentication success,Welcome!
PAP authentication succeeded
peer from calling number [redacted MAC 2] authorized
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 <addr [redacted IPv6 1]>]
rcvd [IPV6CP ConfReq id=0x1 <addr [redacted IPv6 2]>]
sent [IPV6CP ConfAck id=0x1 <addr [redacted IPv6 2]>]
rcvd [IPCP ConfReq id=0x1 <addr [redacted IPv4 1]>]
sent [IPCP ConfAck id=0x1 <addr [redacted IPv4 1]>]
rcvd [IPCP ConfNak id=0x1 <addr [redacted IPv4 2]>]
sent [IPCP ConfReq id=0x2 <addr [redacted IPv4 2]>]
rcvd [IPV6CP ConfAck id=0x1 <addr [redacted IPv6 1]>]
local LL address [redacted IPv6 1]
remote LL address [redacted IPv6 2]
rcvd [IPCP ConfAck id=0x2 <addr [redacted IPv4 2]>]
local IP address [redacted IPv4 2]
remote IP address [redacted IPv4 1]
No response to 5 echo-requests
Serial link appears to be disconnected.
Connect time 0.2 minutes.
Sent 228 bytes, received 0 bytes.
sent [LCP TermReq id=0x2 "Peer not responding"]
sent [LCP TermReq id=0x3 "Peer not responding"]
Connection terminated.
Connect time 0.2 minutes.
Sent 228 bytes, received 0 bytes.
Modem hangup
Failed discovery
Plugin pppoe.so loaded.
PPPoE plugin from pppd 2.4.9
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
dst ff:ff:ff:ff:ff:ff src [redacted MAC]
[service-name] [host-uniq 00 00 06 d3]
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
dst ff:ff:ff:ff:ff:ff src [redacted MAC]
[service-name] [host-uniq 00 00 06 d3]
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
dst ff:ff:ff:ff:ff:ff src [redacted MAC]
[service-name] [host-uniq 00 00 06 d3]
Timeout waiting for PADO packets
Unable to complete PPPoE Discovery
I also checked if there was a duplex mismatch of some sort, but that does not seem to be the case:
Output from ethtool
root@OpenWrt:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseX/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Full
100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 7
Transceiver: external
Auto-negotiation: on
Link detected: yes
Reproducing this same configuration my laptop (with the same commands) gives me a fully working connection.
The issue also pops up whether I run OpenWRT snapshot or 23.05.2.
I also found this thread from a year ago that describes very similar symptoms. The configuration there is almost the same, and does not make a difference for me either. Sadly, the OP there seems to have given up. It is not clear whether they got it working with OpenWRT on another device.
I have run out of things to try. Does anyone have an idea?