PPPoE with OpenWrt

Hi!

I run OpenWrt 19.07.6 with LuCI on a Netgear Nighthawk X4S R7800, and I recently moved to Thailand and got fiber internet from the provider AIS.

As they installed the fiber I had them set their modem/router in bridge mode so that I would be able to keep using my Nighthawk.

Unfortunately, AIS uses PPPoE for some reason, so I had to make a few changes in my OpenWrt settings with the help of the support staff at AIS, but we had some language issues, so I’m not 100% sure that I understood everything they said correctly…

The changes I made are as follows:

  1. On Network -> Interfaces I changed both WAN and WAN6 from DHCP to PPPoE. I also added the appropriate PAP/CHAP username and password to both WAN and WAN6.

  2. On Network -> Switch I turned OFF ”Enable VLAN functionality”.

Do these changes seem reasonable to people who know more about this stuff than I do? I am especially concerned about turning off the VLAN functionality, but I’m pretty sure that that is what the guy from AIS told me to do.

Also, are there any other changes I should make to get optimal performance with PPPoE?

I've been trying to google the answers to these questions without much success, and I've seen people note that "AIS uses VLAN-tagging on the internet connection, the VLANID is 10" - but I'm not really sure if that information is relevant to me.

Everything seems to be working OK right now, I just wanted to make sure I haven’t missed something here, or caused some sort of security issue.

Any help/information would be much appreciated!

If it works it means you configured them properly.
Regarding the wan6 interface, you should leave it DHCP6 client, and on wan interface the IPv6 option should be manual or 1

2 Likes

IPv4/IPv6 Connectivity/Speed Test

1 Like

If it works, then you are using the right (no) VLAN, otherwise, it would fail to initialize the connection completely.

Normally, you only define a PPPoE connection on the WAN interface, not the WAN6.

2 Likes

Thanks for the advice!

I've now changed the WAN6 interface to DHCPv6 client. But the IPv6-test shows that IPv6 is not working for me (I have tried the "obtain IPv6-address" setting under the WAN interface as both manual, disabled and automatic, to no avail).

Is this something I should be worried about?

Turning off VLAN functionality makes the switch unmanaged and the lan and wan may mix. Proper configuration to get a VLAN tag on packets going to the ONT is to define that VLAN in the switch and propagate it through from the CPU (CPU and external port both tagged with the VLAN).

Confirm that the ISP offers IPv6 because many don't.

1 Like

Yeah, I kind of suspected I wasn't supposed to just turn off VLAN functionality completely. So, in practice, I guess I should add a VLAN with ID 10 (which is what my ISP uses, apparently).

But then what? This is a little bit beyond me, I'm afraid. Attaching a screenshot of my current (stock) VLAN settings.

Check the Enable VLAN functionality box. Change the ID number on the second line from 2 to 10. Change the WAN port from untagged in that VLAN to tagged.

The physical setting of the pppoe wan network needs to be eth0.10, but you probably already have that.

Is the device on lan2 something really old that only runs at 10baseT? Failure to link at the highest supported rate could mean you have a bad cable. It is normal for laptop and desktop computers to drop down to 10 while they are asleep.

2 Likes

OK, I tried that but I got ”Unknown error (user_request)” followed by ”Connection attempt failed”. But all I had to do to get it working again is change the WAN port on VLAN10 back to untagged. The other changes don't seem to be a problem..

(Oh, and yes, the device on lan2 is my desktop computer that is currently asleep, so that's probably why it's 10baseT)

I had AIS fibre in Bangkok for years. Here's the relevant sections which I pulled from a backup of my config at the time (which at the time was 15.05). No VLANs needed.

/etc/config/network

config interface 'lan'
        option ifname 'eth3'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'
        option broadcast '255.255.255.255'
        option ip6assign '64'

config interface 'wan'
        option proto 'pppoe'
        option ifname 'eth0'
        option username '<USERID>'
        option password '<PASSWORD>'
        option ipv6 'auto'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

/etc/config/dhcp

config dhcp 'lan'
        option interface 'lan'
        option ra 'server'
        option dhcpv6 'server'
        option ra_management '1'
        option leasetime '12h'

AIS delegates a /64. And everything worked perfectly. IPv6 is actually quite a bit faster than IPv4 in Thailand.

3 Likes

So did that config work for you?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.