Problems with DM200 and WRT1900ACv2

Hey,

I wanted to configure my DM200 to be a pure modem and establish a connection via PPPoE on the WRT1900AC. So I installed DM200 and switched it into Modem Mode with VLAN Passthrough and plugged it into the "Internet" port on my WRT1900AC. Oddly enough I can still use the admin interface via a static IP (which strikes me as odd, but ok) (page 69 of the docs: https://www.downloads.netgear.com/files/GDC/DM200/DM200_UM_EN.pdf)
I tried to use the configuration I found on this site for VDSL at my ISP Deutsche Telekom. I do this to avoid double NAT btw since I am struggling with this already as you will see.

This is the config I tried:

# 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 'fdd7:9921:c32e::/48'

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

config dsl 'dsl'
	option annex 'a'
	option tone 'av'
	option xfer_mode 'ptm'

config interface 'wan'
	option proto 'pppoe'
	option _orig_ifname 'ptm0'
	option _orig_bridge 'false'
	option ifname 'dsl0.7'
	option username 'longnumber@t-online.de'
	option password 'password'
	option ipv6 'auto'

config interface 'wan6'
	option proto 'pppoe'
	option ifname 'dsl0.7'
	option username 'longnumber@t-online.de'
	option password 'password'
	option ipv6 'auto'

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

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

I am very confused about where the dsl should be coming from so I tried to switch it for eth0 with no luck. It only adds to my confusion that the router docs(mind that I have v2) says lan should be on eth1, but it is on eth0. Also I think I need VLAN 7 to connect to my ISP...maybe I need to switch up the switch config?

# ip link sh |grep ^\\S
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
2: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 532
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 532
6: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
8: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
9: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000

I blindly used _orig_ifname, xfer_mode and ptm since I do not know what they mean. They might be unnecessary or wrong... _orig_ifname at least seems to have moved somewhere else...

To check if the modem even worked, I tried it directly and could easily establish a connection via PPPoE with the help of NetworkManager.

I am pretty confused right now and the mistake is probably something dumb and basic. But since I could not get it to work for two days now, I am seeking help here to clear that confusion.
Thanks so much in advance!

Router:
Linksys WRT1900ACv2
OpenWrt 18.06.2 r7676-cddd7b4c77 / LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d)

If you use PPPoE, you need to define an ethernet physical interface.
If your LAN is eth0.1, I'd say to try for WAN eth1.2. It could be a misunderstanding or some other confusion about the version of your router and the port mapping.
If you haven't configured much on the router, do a factory reset, then upon first boot go directly to the wan interface and switch from dhcp protocol to pppoe. Add username, pass and MTU 1492 (optionally auto for IPv6 and '10 30' for keepalives) and try to connect. This way it must work immediately.

Would you say I should disable the VLAN passthrough on the modem?

I am not sure what you mean. On the DM200 enable the modem mode, and that's all you can do.
On the 1900 you need something like this for the WAN:

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

config interface 'wan'
	option proto 'pppoe'
	option ifname 'eth1.7'
	option username 'longnumber@t-online.de'
	option password 'password'
	option ipv6 'auto'

So, first off, thank you for your help! I got it working (more or less).

So for documentation:
This is what I meant when I said I can passthough the VLAN on the modem (my ISP uses VLAN 7).

I think there are two configurations that can work:

  1. set the modem to no VLAN passthrough and "ignore" the VLANSs in openwrt (except for splitting the switch, see below). This is what worked with my laptop and NetworkManager very easily.
  2. Passthrough VLAN and use it. This is what I went for. I got this to work by setting the switch_vlan to tagged for both the interface as well as the "INTERNET" port. This also resulted in a weird new virtual interface "WAN_6" I don't understand yet.

After this I just had to assign a zone to the wan interfaces and enable Masquerading (NAT) in the firewall which is apparently not enabled by default.

What I learned from this:

  • WRT1900ACv2 docs seems to be wrong (can someone confirm that?) or I don't understand it...
  • How the switches work (I think): The interfaces have to be connected to the physical ports (even the WAN interface) via the switch and if you don't want WAN to leak into LAN you have to separate it through VLANs (duh).

My (working) config:

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 'fdd7:9921:c32e::/48'

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

config interface 'wan'
	option ifname 'eth1.7'
	option proto 'pppoe'
	option username 'longnumber@t-online.de'
	option password 'password'
	option ipv6 'auto'

config interface 'wan6'
	option ifname 'eth1.7'
	option username 'longnumber@t-online.de'
	option password 'password'
	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 5t'

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

If I did anything work or if anyone has to add something to this how to do this properly, please let me know!

It's for IPv6.

It actually is enabled by default, unless you erased the wan zone at some point.

Yes, but what about WAN6

Hm, maybe I saved the backup of /etc/config/network after I tried some things on the web..

You can erase that. Seems that the automatically configured WAN_6 has the necessary connectivity for IPv6.