LEDE device as ADSL bridged modem

Here goes:

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 'fdbe:4494:9fdf::/48'

config atm-bridge 'atm'
        option payload 'bridged'
        option nameprefix 'dsl'
        option vci '8'
        option vpi '48'
        option encaps 'vc'

config dsl 'dsl'
        option ds_snr_offset '0'
        option annex 'b'
        option xfer_mode 'ptm'
        option line_mode 'vdsl'

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 device 'lan_dev'
        option name 'eth0'
        option macaddr '8c:3b:ad:14:a4:7a'

config interface 'wan'
        option ifname 'dsl0'
        option proto 'pppoe'
        option ipv6 '1'
        option username 'SecretUser'
        option password 'SecretPassword'

config device 'wan_dev'
        option name 'dsl0'
        option macaddr '8c:3b:ad:14:a4:7b'

As you can see I have temporarily put in PPPoE just to make sure the modem not only synced but provided internet connectivity as well.
Regarding the sync speed, thats a bummer.
Indeed I have a broadcom (some chinese brand called T&W provided by my ISP).
I guess I will have a few words with my telco and try to see whether I can improve the line conditions a bit.
My package is 40/4 so it kind of sucks to lose even a megabit.

One more thing I was wondering about (not related directly to networking).
I noticed in dmesg, that the device outputs cpu temperature during bootup, so I was wondering whether I could have lm-sensors and also have it displayed in LuCi somehow?

Nice to know everyone's still trying to have a crack at this... I'm FINALLY getting NBN installed and just found out I'll be receiving a modem/router combo and NOT separate standalone units as previously thought, with apparently no option to request a standalone VDSL2 modem. Basically this means I've got the weekend to either get the DM200 up and running or buy another modem on Monday morning at the latest as I want something working IN HAND by the time my connection is upgraded.

I saw the article on integrating the DSL driver from the Netgear firmware. I've got it extracted... noob question, how do I actually access the filesystem on the modem so I can copy the driver?
(Told y'all I prefer DD-WRT... sorry!)

I wouldn't want the "FTTC Connection Device" anyway... the NetComm Wireless NDD-0300-02 requires AC power input, meaning I'd have to crack open the casing and bypass the internal power supply to run directly on DC power, which even then is... 60V?!?! Who designed that damn thing?!?!

Ultimately I want my equipment running straight on DC power (an off-grid solar setup in a caravan, to be precise.) This means I already have the best device for this purpose.

Too bad... the NetComm unit has a Gigabit port as opposed to 100 Mbps on the Netgear...

@BigAIY2K, I am not sure what you mean by "everyone trying".
If I understand correctly this actually works fine for some peope (dazzsser and another user from whirlpool forum link he posted earlier).
Regarding firmware upload, if you go to networking/interfaces you have an option there to specify the path for DSL firmware path.
So just put the file anywhere you want on the filesystem (I would make it world readable to be on the safe side) and specify the path.

My newly aquired modem works just fine, I just need to see a proper example of /etc/network with the right vlan setup so I can have access to the modem while having DSL interface brdiged.
Should be fairly easy on the other side of the connection with Pfsense.

According to the data sheet these are designed to supply " 0. Reverse Power to the DPUThe NDD-0300 provides power to the DPU (Distribution Point Unit) equally between up to 4 individual units. This reduces the cost of deployment since the DPU does not have to be connected to the power grid."
The 60 Volts maybe (I am really just guessing here) just 12 Volts for the device itself as well as the traditional 48 Volts to potentially supply to the DPU.

How is off-grid going to be compatible with NBN, whih as far as I can tell means copper wires? :wink:

The idea being if I'm parked long-term I can use ANY type of connection (I have wiring for phone, Ethernet, and coax set up) and power off-grid or at the very least through ONE plug to a 50A battery charger that one way or the other feeds everything low voltage (anything not 12V and/or voltage sensitive behind voltage regulators.)

This is all, for lack of a better way of putting it, down the road, as the caravan still needs some work done. That said, I try to avoid AC powered devices whenever possible. And I have no intention of disassembling anything to bypass AC power... unfortunately I'm no good with a soldering iron (believe me, I WISH.)

The DM200 it is. And I found another one locally for $50. I might pick it up tomorrow just to be on the safe side. Never hurts to have spare networking gear.

If there's a way to specify the DSL firmware path in Network/Interfaces, then I'm not looking hard enough...

Luci->Network->Interfaces
Firmaware%20File

Obviously you won't be using ADSL settings on NBN :slight_smile:

Okay... got that. I still need to copy it over to the DM200 in the first place.

The shown luci field will add this to /etc/config/network:

config dsl 'dsl'
        option xfer_mode 'ptm'
        option annex 'b'
        option tone 'bv'
        option line_mode 'vdsl'
        option firmware '/etc/config/dsl_vr9_firmware_xdsl-05.08.01.05.00.07_05.08.00.09.00.01.bin'

I opted to place the firmware file into /etc/config, so it is effortlessly preserved when using sysupgrade (without having to add it to the list of additional things to preserve) but that has some side-effects, so I do not want to recommend that.

1 Like

use scp or WinSCP to copy the file onto the router/modem

Got it! Thanks! I'll keep tinkering and let you know how I go!

After going over OneArmedMan's am I right to assume, that the only real change that I need to make is the port number for vlan?
After going over the dmesg, it looks like port 4 reports link up and down.
Am I right to assume, that if I simply copy OneArmedMan's config and only change the ports for VLANs to port 4 everywhere?
That and apply my own DSL settings and subnets of course.

If you have a managed switch then I would say it would work, otherwise if you just directly connect the land of the DM200 to the WAN of your router, you wont be able to get access to LUCI interface, and that's from my personal experience

What I did was upload it on my server and wget it from there

No need for managed switch, my pfsense box allows me to create vlans on the nic itself and tag them.
It even allows for running router on a stick.
So to sum it up I need to tag port 4 (instead of whatever it is in the original config), and create virtual nics on my pfsense with vlan tag matching it.
The last thing I kind of don't understand is how the vlans are going to work anyway since swconfig doesn't seem to recognize there is a switch at all.
Am I missing some package that needs to be installed on openwrt because I am able to put the vlans in place?
After just having added the switch0 definition, Luci interface reports that it can't recognize the switch topology (makes sense since swconfig doesn't recognize it either).

Aaand, it works :slight_smile:
As expected tagging all vlans on port 4 did the trick.
I am connected to the internet and also have access to LuCI

Here is my /etc/config/network for those who might find it useful:

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 'fdbe:4494:9fdf::/48'

config atm-bridge 'atm'
        option payload 'bridged'
        option nameprefix 'dsl'
        option vci '8'
        option vpi '48'
        option encaps 'vc'

config dsl 'dsl'
        option ds_snr_offset '0'
        option annex 'b'
        option xfer_mode 'ptm'
        option line_mode 'vdsl'

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 device 'wan_dev'
        option name 'dsl0'
        option macaddr '8c:3b:ad:14:a4:7b'

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

config switch_vlan
                option device 'switch0'
                option vlan '1'
                option vid '1'
                option ports '4t'

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

config device 'lan_dev'
        option name 'eth0'
        option macaddr '8c:3b:ad:14:a4:7a'

config interface 'ETHWAN'
                option proto 'none'
                option ifname 'eth0.2'

config switch_vlan
                option device 'switch0'
                option vlan '3'
                option vid '3'
                option ports '4t'

config interface 'WAN_BRIDGE'
                option type 'bridge'
                option proto 'none'
                option ifname 'eth0.3 dsl0'
                option auto '1'
                option delegate '0'

A few comments:

I have a hunch that the eth0.2 in this config is not really necessary.
Not sure what is its functionality in the original config too.
So two vlans shoud probably be enough (don't have the time to test that theory at this time, but might check that in the future).

Device doesn't have internet connectivity when used like that.
It reports not having any upstream connectivity.
I think this is actually a good thing as it ensures better security (not having to deal with fw rules, updates etc and only taking care of the actual fw appliance).
It should be possible to have internet back, by adding appropriate rules on the fw device for its vlan tagged interface (allowing incoming from ip of the fw), and specifying the ip of the fw as the gateway in openwrt's management interface config.

That setup (obviously) works only if you have managed switch or a firewall appliance which allows vlan configuration (such as Pfsense) and a network card that supports vlan on the firewall side (a plain gigabit realtek worked for me).

For those using Pfsense VM (like I do), I am not sure it would work with having a virtual interface bridged to a real one (vtnet for instance), in my case I am using a pcie network card that is using pci passthrough to a VM providing direct access to hardware for the virtual appliance.

I fell asleep waiting for my mate to stop using the Internet, otherwise I would have gotten to this sooner. Anyway...

I DO get physical line sync with "Annex A+L+M (all)" and "auto" settings on everything else. I am still on ADSL2+ for now but will be transitioned to VDSL2 (hopefully) sometime this week. The Annex setting will likely have to be changed (Annex B (all) doesn't currently work) so any hopes for a seamless automatic detection of an ADSL2+ or VDSL2 line are all but dashed pending firmware improvements. I plan on keeping my old combo unit as a backup anyway and probably will also hold onto a cheap standalone ADSL2+ modem so I can use it in conjunction with the Linksys router if/when necessary. The DM200 will therefore be dedicated for VDSL2 type connections.

PPPoE login is NOT working, therefore the Internet is NOT working. This may not be a big deal IF I can get the unit properly bridged. Of course that's another story altogether...

I found another used DM200 locally for $50. I may have to snag it as a backup and NOT TOUCH the stock firmware...

You are correct. fwiw, I recently reviewed the bridge mode setup for HH5A which was also based on triple VLAN configuration by JSamuel for the BT Openreach ECI modem (VG3503J)

This new two VLAN config for HH5A is inspired by posts I've seen appearing on OpenWRT forum in past 12 months, and seems to work fine when I tested it last week.

I've tested VDSL Bridge mode with LEDE 17.01.6.
External HH5A router was wired to LAN1 port of HH5A bridge modem.
LAN2 port of bridge modem wired to spare LAN port on external router for LuCI/SSH access.

/etc/config/network

config dsl 'dsl'
	option xfer_mode 'ptm'
	option annex 'b'
	option tone 'a'
	option line_mode 'vdsl'
	option ds_snr_offset '0'

config interface 'lan' # for LAN2 to LAN4. eg. LuCI/SSH
	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'
	option gateway '192.168.1.254' # Point this to your main router
	option dns '8.8.8.8'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '02:xx:xx:xx:xx:xx'

config interface 'wan'
	option proto 'none'
	option delegate '0'
	option type 'bridge'
	option ifname 'eth0.2 ptm0.101'   # LEDE 17, VLAN tag 101 for use in UK.
	# option ifname 'eth0.2 dsl0.101'    # OpenWRT 18, VLAN tag 101
	
config device 'wan_dev'
	option name 'ptm0'
	# option name 'dsl0' # OpenWRT 18
	option macaddr '02:yy:yy:yy:yy:yy'

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 6t' # LAN2-4. eg. LuCI/SSH
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t' # LAN1 to external router’s WAN port
	# option ports '5 6t' # red WAN 
	option vid '2'

/etc/config/firewall

config zone
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	option network 'lan'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network ' '   # remove wan, wan6 interfaces

# config forwarding   # Removed
#	option src 'lan'
#	option dest 'wan'

above reproduced from:

https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=163#p3117