Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#394 - PPPoE/802.1Q issues on Linksys WRT1900ACS #5425

Closed
openwrt-bot opened this issue Jan 17, 2017 · 12 comments
Closed

FS#394 - PPPoE/802.1Q issues on Linksys WRT1900ACS #5425

openwrt-bot opened this issue Jan 17, 2017 · 12 comments
Labels

Comments

@openwrt-bot
Copy link

kberanek:

Device: Linksys WRT1900ACS
LEDE commit: b9a408c

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@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@provider"
usepeerdns
persist
defaultroute
hide-password
noauth

> cat /etc/ppp/chap-secrets
#USERNAME  PROVIDER  PASSWORD  IPADDRESS
user@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@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.

@openwrt-bot
Copy link
Author

jow-:

Please try the following settings:

  • Leave wan ifname at eth0
  • Change "option vlan 2" to "option vlan 201"
  • Change "option ports '4 5' to "option ports '4t 5'"

Note that a recent change in LEDE (https://git.lede-project.org/9641cee) swapped eth0 and eth1 on the ACS so if you try newer builds you might reset your network config.

The basic idea remains the same though; make the external wan switch port tagged and change the untagged wan vlan 2 to an externally tagged vlan 201.

@openwrt-bot
Copy link
Author

kberanek:

I am actually running a more recent build (https://git.lede-project.org/?p=source.git;a=commitdiff;h=b9a408c2b49ccfa0e906bda00ef77f4002e401fd) than the build you mentioned.

I've tried exactly what you recommend a few times in the past, but it hasn't worked. Nevertheless, I gave it a shot by just modifying my existing config, but it didn't work.

I then tried resetting the router using /sbin/firstboot and rebooting. At that point I did see that lan and wan inferfaces switched and tried applying the same changes, but no luck. I see exactly the same timeout error. My /etc/config/network from that second attempt is below. This is the only file I changed after resetting the router.

root@lede:~# cat /etc/config/network

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 'fdac:ae37:47e0::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth1'
option proto 'pppoe'
option username 'user@provider'
option password 'password'

config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'

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 5'

config switch_vlan
option device 'switch0'
option vlan '201'
option ports '4t 6'

@openwrt-bot
Copy link
Author

jow-:

Ok. Please try this config instead:

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 'fdac:ae37:47e0::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth1.201'
option proto 'pppoe'
option username 'user@provider'
option password 'password'

config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'

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 5'

config switch_vlan
option device 'switch0'
option vlan '2'
option vid '201'
option ports '4 6t'

@openwrt-bot
Copy link
Author

jow-:

Also reboot after modifying the config to ensure that the switch settings are actually applied.

@openwrt-bot
Copy link
Author

kberanek:

Exactly the same timeouts. Even after rebooting. I also tried a few small variations on that config as well, but no luck. The 'vid' option isn't something I've seen before in a 'switch_vlan' section and I can't seem to find any documentation on it.

@openwrt-bot
Copy link
Author

kberanek:

I'm still seeing this behavior on an official 17.01.0 release image (17.01.0, r3205-59508e3 to be exact).

Is there anything else I can do to help debug or do you have any other suggestions? I'd really like to help fix this issue, but I've reached the limits of my ability to debug it and I'd really appreciate any suggestions.

@openwrt-bot
Copy link
Author

ewasscher:

I encountered exactly the same issue with a Ubiquiti Edgerouter X and KPN (using PPPoE over vlan 6 on the WAN port). Setting "option reset '0'" in the switch config seems to fix it for me, although I'm not sure why. I guess the switch config was reset while bringing up the PPPoE interface

@openwrt-bot
Copy link
Author

kberanek:

Thanks for the suggestion Ewald - the reset option didn't work for me, but your mention of the switch config being reset inspired me to take a closer look at the VLAN* output from swconfig (swconfig dev switch0 show in my case). What I realized is that VLAN2 kept disappearing regardless of whether I had PPPoE or DHCP configured and the value of the reset option didn't make a difference so I tried a few different switch_vlan configurations until I found one that didn't cause VLAN2 to disappear:

config switch_vlan option device 'switch0' option vlan '2' option vid '201' option ports '4t 6'

Once I had that figured out I tried different configurations for the WAN interface section and found that this works:

config interface 'wan' option ifname 'eth1' option proto 'pppoe' option username 'user@provider' option password 'password'

@openwrt-bot
Copy link
Author

tenderlove:

@kevin did you get this working? I'm in the same boat (CenturyLink fiber) but I can't seem to get LEDE to connect where OpenWRT would. Would you mind posting your full network config so I can use it? Thanks!

@openwrt-bot
Copy link
Author

kberanek:

Aaron: I did get it working. I'm not actually using the device any more, but I do happen to have a backup of the config that looks like it should work based on my last comments in this thread:

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 'fdac:ae37:47e0::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.0.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth1'
option proto 'pppoe'
option username 'user@provider'
option password 'password'

config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
option enabled '0'

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 5'

config switch_vlan
option device 'switch0'
option vlan '2'
option vid '201'
option ports '4t 6'

@openwrt-bot
Copy link
Author

tenderlove:

@kevin: wow, thank you so much! I really appreciate it!

@Djfe
Copy link
Contributor

Djfe commented Feb 20, 2023

OP found a working configuration in #5425 (comment)
This can be closed, I think @hauke

@hauke hauke closed this as completed Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants