Separate modem and router, can't pppoE

I've got a "modem" - actually a BT HH5 running OpenWRT 19.07.3 in pure bridge mode.
I' ve bridged the connection following the instructions in the PDF guide linked at https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=163&p=1321#p1321 , basically creating an untagged VLAN on one of the modem's switch ports (I used the WAN port) and bridging that VLAN with the WAN (which has unmanaged as its protocol and "bring up on boot" unticked).

The modem appears to connect fine as soon as the phone cable is plugged:

 OpenWrt 19.07.3, r11063-85e04e9f46
 -----------------------------------------------------
root@Modem:~# /etc/init.d/dsl_control status
ATU-C Vendor ID:                          FF,B5,47,53,50,4E,00,10
ATU-C System Vendor ID:                   00,00,30,30,30,30,00,00
Chipset:                                  Lantiq-VRX200
Firmware Version:                         5.8.0.11.1.1
API Version:                              4.17.18.6
XTSE Capabilities:                        0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0
Annex:                                    A
Line Mode:                                G.992.5 (ADSL2+)
Profile:
Line State:                               UP [0x801: showtime_tc_sync]
Forward Error Correction Seconds (FECS):  Near: 0 / Far: 0
Errored seconds (ES):                     Near: 1 / Far: 0
Severely Errored Seconds (SES):           Near: 0 / Far: 0
Loss of Signal Seconds (LOSS):            Near: 0 / Far: 0
Unavailable Seconds (UAS):                Near: 51523169 / Far: 51523169
Header Error Code Errors (HEC):           Near: 0 / Far: 0
Non Pre-emtive CRC errors (CRC_P):        Near: 0 / Far: 0
Pre-emtive CRC errors (CRCP_P):           Near: 0 / Far: 0
Power Management Mode:                    L0 - Synchronized
Latency [Interleave Delay]:               8.0 ms [Interleave]   8.0 ms [Interleave]
Data Rate:                                Down: 7.519 Mb/s / Up: 821 Kb/s
Line Attenuation (LATN):                  Down: 26.3 dB / Up: 10.3 dB
Signal Attenuation (SATN):                Down: 24.8 dB / Up: 0.0 dB
Noise Margin (SNR):                       Down: 12.4 dB / Up: 14.9 dB
Aggregate Transmit Power (ACTATP):        Down: 20.4 dB / Up: 12.4 dB
Max. Attainable Data Rate (ATTNDR):       Down: 7.516 Mb/s / Up: 920 Kb/s
Line Uptime Seconds:                      19
Line Uptime:                              19s

However, I am unable to pppoE through it from an external router, which is my ultimate goal. On the router, I created a WAN interface with protocol pppoE on a specific switch port, on the same VLAN number as the modem's (also untagged). When I press Restart on WAN interface (LuCI), I get ``Error: Connection attempt failed'', and here's what the command line interface tells me.

root@router:~# ifconfig
(snip)

eth0.200  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet6 addr: fe80::7ad2:94ff:fea1:ff5a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2922 (2.8 KiB)

There must be something escaping me. Can you help?

Could you post your /etc/config (actually /etc/config/network, as @Hegabo noted), please? Make sure to x-out/redact usernames and password.
Your ISP might actually require a VLAN tag on the DSL interface.

1 Like

/etc/config/network

1 Like

Here's the modem.

root@Modem:/etc/config# cat 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 'fdb5:8faa:d7c3::/48'

config dsl 'dsl'
        option ds_snr_offset '0'
        option xfer_mode 'atm'
        option line_mode 'adsl'
        option annex 'a'

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

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr 'xx:xx:xx:xx:xx:xx'

config interface 'wan'
        option delegate '0'
        option auto '0'
        option proto 'none'
        option type 'bridge'
        option ifname 'dsl0 eth0.200'

config device 'wan_dsl0_dev'
        option name 'dsl0'
        option macaddr 'xx:xx:xx:xx:xx:xx'

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 4 6t'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'
        option vid '200'

config atm-bridge
        option atmdev '0'
        option encaps 'llc'
        option vci '35'
        option payload 'bridged'
        option vpi '8'
        option unit '0'

And here's the router.

root@newrouter:~# 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 'fd88:b370:6863::/48'

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

config interface 'wan'
        option ifname 'eth0.200'
        option proto 'pppoe'
        option ipv6 'auto'
        option username 'XX'
        option password 'XX'

config interface 'wan6'
        option proto 'dhcpv6'
        option ifname 'eth0.200'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 5'
        option vid '200'

EDIT the error shown on the router LuCI page is "unknown error (USER_REQUEST)"

For reference, here's part of /etc/config/network on the old integrated device, which is working fine.

root@old-modem-router:~# cat /etc/config/network

(snip)

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.254'
        option _orig_ifname 'eth0.1 wlan0 radio0.network2 radio0.network4'
        option _orig_bridge 'true'
        option ifname 'eth0.1'
        option delegate '0'

config atm-bridge 'atm'
        option encaps 'llc'
        option vpi '8'
        option vci '35'
        option payload 'bridged'
        option nameprefix 'dsl'

config interface 'wan'
        option _orig_ifname 'nas0'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option username 'XX'
        option password 'XX'
        option peerdns '0'
        option ipv6 'auto'
        option macaddr 'xx.xx.xx.xx.xx.xx'
        option ifname 'dsl0'
        option mtu '1492'

Mmmh, nothing obvious, but just for reference here is my modem config (BT HH5A, VDSL2@PTM):

root@BTHH5A:~# 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 'fdd9:e73d:3c4a::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option xfer_mode 'ptm'
	option annex 'b'
	option tone 'bv'
	option line_mode 'vdsl'
	option ds_snr_offset '0'
	option firmware '/etc/config/vr9-B-dsl.fb7490-labor-75736.bin'

config device 'ptm_dev'
	option type '8021q'
	option mtu '1500'
	option mac 'C8:91:F9:30:88:89'
	option vid '7'
	option ifname 'dsl0'
	option name 'dsl0.7'

config interface 'modem'
	option type 'bridge'
	option proto 'none'
	option delegate '0'
	option _orig_ifname 'eth0.2 dsl0.7'
	option _orig_bridge 'true'
	option ifname 'eth0.7 dsl0.7'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.100.1'
	option _orig_ifname 'eth0.1 wlan0 wlan1'
	option _orig_bridge 'true'
	option ifname 'eth0.1 eth0.2'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr 'c8:91:f9:30:88:88'

config interface 'wan'
	option proto 'pppoe'
	option ipv6 '1'
	option pppd_options 'debug'
	option _orig_ifname 'ptm0.101'
	option _orig_bridge 'false'
	option username 'XXX'
	option password 'XXX'
	option ifname 'dsl0.7'

config device 'wan_dev'
	option macaddr 'c8:91:f9:30:88:89'
	option name 'dsl0'

config interface 'wan6'
	option ifname '@wan'
	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 vid '1'
	option ports '0 1 2 4 6t'

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

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '3'
	option ports '5t 6t'

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

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '5'
	option ports '5t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '6'
	option ports '5t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option vid '7'
	option ports '5t 6t'

You can ignore the wan section, as wan is disabled on the modem, when I did this initially OpenWrt always used the VLAN order number as vid, so I added 3-6 just so that I could get VLAN7 for the PPPoE traffic.

root@wndr3700v2:~# 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 'fd28:aa3b:8583::/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 device 'lan_dev'
	option name 'eth0'
	option macaddr 'a2:21:b7:b9:5c:22'

config interface 'wan'
	option proto 'pppoe'
	option ifname 'eth1.7'
	option username 'XXX'
	option password 'YYY'
	option ipv6 'auto'
	option keepalive '12 5'

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

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

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

config switch_port
	option device 'switch0'
	option port '1'
	option led '6'

config switch_port
	option device 'switch0'
	option port '2'
	option led '9'

config switch_port
	option device 'switch0'
	option port '5'
	option led '2'

config interface 'WAN4BTHH5A'
	option proto 'static'
	option ipaddr '192.168.100.2'
	option netmask '255.255.255.0'
	option ifname 'eth1.2'

Here the WAN section is actually in use, note that I use two VLANs over the same physical port, VLAN7 which is bridged on the modem to dsl0.7 for WAN traffic and VLAN2 which is bridged to the LAN on the modem to allow me access to the commandline and GUI on the modem. WAN4BTHH5A is the interface used for that purpose (which I added to the WAN firewall zone).

My gut-feeling is, that since the modem actually synchronises that it might be related to the VLAN magic....

It's my experience that bridge mode problems like this frequently result from either (a) an ISP MAC address restriction on allowed clients or (b) an existing DHCP lease associated with the MAC address of the interface on your modem and an unwillingness by the DHCP server to hand out a new one to a different MAC (the wan interface on your router).

In both cases, the solution is the same: clone the old MAC address used by the modem onto the wan interface of your router.

In the modem you are using plain eth0 as well as eth0 with a tag that is not good and usually does not work. Tag all VLANs to the CPU then have all networks reference eth0.N for its network.

Also there is no need to use VLAN 200 it is just for internal use so keep the numbers small this helps with some hardware that is limited in the number of VLANs. It does appear properly set up to workaround (vlan 2 and vid 200) but that's just unnecessary extra stuff.

Look at the log in the router see how far the pppoe connection gets (if at all) before it fails. If the ISP is rejecting you (often as @dl12345 said, because of the MAC) you will see that. If it is "Timeout waiting for PADO packets" that means there isn't a link at all.

1 Like

It's a timeout.

root@newrouter:~# ifup wan
Sat May 16 21:21:50 2020 daemon.notice netifd: Interface 'wan' is setting up now
Sat May 16 21:21:50 2020 daemon.err insmod: module is already loaded - ppp_generic
Sat May 16 21:21:50 2020 daemon.err insmod: module is already loaded - pppox
Sat May 16 21:21:50 2020 daemon.err insmod: module is already loaded - pppoe
Sat May 16 21:21:50 2020 daemon.info pppd[1071]: Plugin rp-pppoe.so loaded.
Sat May 16 21:21:50 2020 daemon.info pppd[1071]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Sat May 16 21:21:50 2020 daemon.notice pppd[1071]: pppd 2.4.7 started by root, uid 0
Sat May 16 21:22:05 2020 daemon.warn pppd[1071]: Timeout waiting for PADO packets
Sat May 16 21:22:05 2020 daemon.err pppd[1071]: Unable to complete PPPoE Discovery
Sat May 16 21:22:05 2020 daemon.info pppd[1071]: Exit.

I thought the modem successfully synchronizing would imply discovery etc is ok, but I'm not knowledgeable at all about DSL protocols.

This info negates the need to clone the MAC address. Is that right?

Yes. The MAC isn't a consideration (yet) because there is no communication at all with the ISP.

I have added more details to my post above.

Actually on my one ISP I get exactly those symptoms based on a MAC address reject by the ISP: timeout waiting for PADO.

I suggest cloning the MAC anyway. It won't hurt and will eliminate one potential problem at least

1 Like

I respectfully disagree. Trying to clone the MAC is a good idea, and I concurr that is a decent idea. But, if this does not help, I would undo the clone and go back to the device's original MAC, otherwise you have two devices with identical MAC which is conceptually a bad idea, even though it is hard to generate clashes due to the interfaces being DSL interfaces.

Note that the PADO timeout is super unspecific, all it means is your pppoe client sent a request and got no reply....

Thanks everybody for the help!

I changed the vid from 200 to 5 on both modem and router (I actually use vids 1, 2, and 3 for guest segregation and emergency service network.) That didn't seem to help.

On the modem, I tried changing the bridged devices from {eth0.5, dsl0} to {eth0.5, nas0}. Just a Hail Mary. Didn't help either. Reverted to {eth0.5, dsl0}

@mk24 - I don't understand what you mean by "you are using plain eth0 as well as eth0 with a tag". The LAN uses eth0.1, and that's where I log on the web UI to change the settings, or ssh etc. The bridge uses eth0.5. I don't think I'm ever using eth0 without a VLAN qualifier in my config, but I might be overlooking something.

@dl12345 How do I find out the modem MAC address I have to clone? Where do I set the cloning on the router? I haven't found that option in LuCi.

Usually on the modem gui interface you should be able to look at a diagnostics or statistics page and it will show you the MAC. It varies from modem to modem.

To change the MAC on your interface, either use luci and go to Network-->Interfaces-->Wan-->Advanced Settings and put the cloned MAC address in the box "Override MAC address" or in /etc/config/network add a line under the interface as follows

config interface 'wan'
    option macaddr 'AA:AA:AA:AA:AA:AA'

Finding out the MAC addr to clone: The modem is OpenWRT too. However, the way the dsl/eth bridge is configured, the WAN interface is actually not started on boot and doesn't show up in ifconfig. I think it's the client router that establishes the connection trying to log to the ISP via PPPoE. So I issued ifup wan on the modem, and ifconfig to get the MAC addr. Then I shut the interface down again with ifdown wan.

Cloning the MAC addr on the router: strangely enough, the advanced options for the WAN interface on the router do not include " Override MAC address". (OpenWrt 19.07.3 r11063-85e04e9f46). I edited /etc/config/network as per your suggestion.

There's no apparent difference in the results, but now the failed WAN interface does show a few packets in and out. It only shows packets out without the cloning.

A bridge with proto none has no MAC address. It works like an unmanaged Ethernet switch, which passes packets through without adding or removing any MACs.

Right @mk24, that's one thing I was overlooking! L2/L3 mixup :blush:

I've made a few experiments, including cloning the MAC address from the old modem-router I'm using at the moment to connect. It's the only device I have that provides a working connection as of now. I took the MAC address from its ifb4pppoe-wan interface. No joy.

@moeller0 suggested there might be some VLAN magic required by the ISP, but the /etc/config/network file of my old (and working) modem-router doesn't show any sign of it.
What kind of magic might that be?

At this point I'd suggest to reset the BTHub5 to defaults and set it up as modem+router for testing, that way you can confirm that your ideas about the necessary VLAN tagging is correct (the modem-router configuration is a bit easier than modem-only), before switching it back to modem-only operations.

1 Like

Indeed, @slh. I rebuilt the config from scratch on memory, starting from simple working routing. I've still got some cleanup left, but bridging does work It's now feeding a router which initiates the PPPoE session.

About cleanup:

  1. What about MTU? Would 1492 on the modem, and same on the router be sane? I get warnings on the modem, maybe because it's bridged with eth0.5. Please advise who can.

  2. One thing that doesn't seem to work yet is @moeller0's trunking of VLANS into the modem's WAN ethernet port. To reach the modem from the router's main VLAN 1, I need a physical ethernet cable plugged into one of the modem's LAN ports. I also much like your nerdy LED assignments. I have a similar arrangement on my trusty old Buffalo :+1:

EDIT: I set the dsl0/eth0.5 bridge interface (named MODEM on the modem) to be brought up on boot, which differs from the instructions in the PDF guide linked at https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=163&p=1321#p1321 . I find this works for me, and allows the router to dial a new PPPoE session automatically if the modem is rebooted.

Okay, so I need to elaborate a bit, I also have the 5GHz radio of the BYHH5 up and occasionally sh-ing into the HH5 does not work, in those cases I change to the BTHH5A's SSID log into the GUI, and typically from that point on I can SSH into the Modem, after reboots of the modem or the router I occasionally loose the connection and need to redo that dance. This is less than optimal, but so far was not painful enough for me to spend time figuring out the details.