[FS#394] PPPoE/802.1Q issues on Linksys WRT1900ACS

LEDE Bugs lede-bugs at lists.infradead.org
Mon Jan 16 18:15:55 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Kevin Beranek (kberanek) 

Attached to Project - LEDE Project
Summary - PPPoE/802.1Q issues on Linksys WRT1900ACS
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - Device: Linksys WRT1900ACS
LEDE commit: b9a408c2b49ccfa0e906bda00ef77f4002e401fd

diffconfig:
CONFIG_TARGET_mvebu=y
CONFIG_TARGET_mvebu_DEVICE_linksys-wrt1900acs=y
CONFIG_TARGET_BOARD="mvebu"
CONFIG_LIBSODIUM_MINIMAL=y
CONFIG_PACKAGE_dnscrypt-proxy=y
CONFIG_PACKAGE_dnscrypt-proxy-resolvers=y
CONFIG_PACKAGE_libsodium=y

I have an ISP that requires PPPoE on vlan 201 with 802.1Q tags (CenturyLink fiber).  On OpenWRT 15.05.1 and on earlier versions of LEDE (not sure about an exact revision, but maybe October/November timeframe) I could simply define my wan interface in /etc/config/network like this and it just worked:

```
config interface 'wan'
    option ifname 'eth0.201'
    option proto 'pppoe'
    option username 'user at provider'
    option password 'password'
```

I can't find any way to make this work on recent versions of LEDE.  I've tried new builds at least every few weeks, but none have worked for the past few months.  I've tried configuring the switch_vlan section by adding a 't' after the appropriate switch port to enable tagging, I've tried defining a new interface and then using that as the wan ifname, and I've tried the command line `ip link` and `ppp` invocations that work on every other linux system I've tried, but I can't find anything that works on recent versions of LEDE.

On other linux systems I can do roughly the following and it works:

```
ip link add link eth0 name eth0.201 type vlan id 201
ip link set eth0.201 up
pppd call centurylink
```

where /etc/ppp/peers/centurylink and /etc/ppp/chap-secrets looks like this:
```
> cat /etc/ppp/peers/centurylink
plugin rp-pppoe.so

eth0.201
name "user at provider"
usepeerdns
persist
defaultroute
hide-password
noauth

> cat /etc/ppp/chap-secrets
#USERNAME  PROVIDER  PASSWORD  IPADDRESS
user at provider * password
```

I've tried using tcpdump to capture what's happening and on other systems (Ubuntu 16.10, Debian Jessie, pfsense) I see an 802.1Q tag, but I don't see that on LEDE.  That might be expected though because it seems totally possible that the switch itself is doing the 802.1Q stuff and tcpdump doesn't see the actual packets sent over the wire.  I have no idea if that's the case, though.  I guess I could also try this on OpenWRT as well, but I haven't taken the time to do that yet.

The only other difference I've seen is that by default LEDE doesn't send a Host-Uniq tag, but even if I set the host_uniq uci config it doesn't fix things.  Regardless of what I do I see logs that look like this:

```
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' is now down
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' is disabled
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' has link connectivity loss
Tue Jan 17 01:55:26 2017 kern.info kernel: [23415.581135] mvneta f1034000.ethernet eth0: configuring for fixed link mode
Tue Jan 17 01:55:26 2017 kern.info kernel: [23415.588150] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Tue Jan 17 01:55:26 2017 kern.info kernel: [23415.594095] mvneta f1034000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' is enabled
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Network device 'eth0' link is up
Tue Jan 17 01:55:26 2017 daemon.notice netifd: VLAN 'eth0.201' link is up
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' has link connectivity
Tue Jan 17 01:55:26 2017 daemon.notice netifd: Interface 'wan' is setting up now
Tue Jan 17 01:55:26 2017 kern.info kernel: [23415.602431] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Tue Jan 17 01:55:26 2017 daemon.info pppd[2263]: Plugin rp-pppoe.so loaded.
Tue Jan 17 01:55:26 2017 daemon.info pppd[2263]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Tue Jan 17 01:55:26 2017 daemon.notice pppd[2263]: pppd 2.4.7 started by root, uid 0
...
Tue Jan 17 01:55:41 2017 daemon.warn pppd[2263]: Timeout waiting for PADO packets
Tue Jan 17 01:55:41 2017 daemon.err pppd[2263]: Unable to complete PPPoE Discovery
Tue Jan 17 01:55:41 2017 daemon.info pppd[2263]: Exit.
```

A sample /etc/config/network looks like this:
```
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd25:2a59:2a7b::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.201'
    option proto 'pppoe'
    option username 'user at provider'
    option password 'password'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 6'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 5'

config interface 'guest'
        option _orig_ifname 'wlan1'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
```

Interestingly, OpenWRT has exactly the same version of ppp and rp-pppoe (2.4.7 and 3.8p, respectively) so it seems like there's something else in play and my guess is it's related to vlan tagging, but I don't seem to have the same issue as FS#227 which mentions both PPPoE and vlan config, but it is quite difficult to follow the discussion there so maybe I'm missing something.



More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=394



More information about the lede-bugs mailing list