[Solved] [TP-LINK TD-W8970] bring up adsl

OK - trying to work out what I'm doing wrong. I've the latest openwrt installed on a TP-LINK TD-W8970. I can't get ADSL to come up. My /etc/config/network is:

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 'fd84:032c:ad2f::/48'

config atm-bridge 'atm'                                                        
	option payload 'bridged'                                               
	option nameprefix 'dsl'                                                
	option vci '38'                                                        
	option vpi '0'                                                         
	option encaps 'vc'                                                     

config dsl 'dsl'
	option tone 'av'
	option xfer_mode 'atm'
	option firmware '/lib/firmware/lantiq-vrx200-a.bin'
	option annex 'a2p'
	option ds_snr_offset '0'

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

config interface 'wan'
	option proto 'pppoa'
	option username 'xxx@plusdsl.net'
	option password 'xxx'
	option vpi '0'
	option vci '38'
	option encaps 'vc'

config device 'wan_dev'
	option macaddr 'e8:de:27:9c:c8:bb'
	option name 'dsl0'

config interface 'wan6'
	option proto '6in4'

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

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

The original firmware used:

    <WANDevice instance=1 >
      <WANConnectionNumberOfEntries val=2 />
      <WANCommonInterfaceConfig>
        <EnabledForInternet val=1 />
        <WANAccessType val=DSL />
      </WANCommonInterfaceConfig>
      <WANDSLInterfaceConfig>
        <Enable val=1 />
        <Status val=Initializing />
        <X_TPLINK_AdslModulationCfg val=ADSL_2plus />
        <X_TPLINK_AnnexType val="Annex A" />
      </WANDSLInterfaceConfig>
      <WANConnectionDevice instance=5 >
        <WANIPConnectionNumberOfEntries val=1 />
        <WANDSLLinkConfig>
          <Enable val=1 />
          <LinkStatus val=Up />
          <LinkType val=EoA />
          <DestinationAddress val=PVC:8/35 />
          <X_TPLINK_IfName val=nas0 />
          <X_TPLINK_MacAddress val=E4:66:B3:98:45:67 />
        </WANDSLLinkConfig>
        <WANIPConnection instance=1 >
          <Enable val=1 />
          <ConnectionStatus val=Connected />
          <ConnectionType val=IP_Bridged />
          <Name val=br_8_35_2 />
          <X_TPLINK_ConnectionId val=2 />
          <MACAddress val=64:66:B3:98:45:67 />
          <X_TPLINK_IfName val=nas0_1 />
          <X_TPLINK_IGMPProxyEnabled val=0 />
        </WANIPConnection>
        <WANIPConnection nextInstance=2 />
      </WANConnectionDevice>
      <WANConnectionDevice instance=7 >
        <WANPPPConnectionNumberOfEntries val=1 />
        <WANDSLLinkConfig>
          <Enable val=1 />
          <LinkType val=PPPoA />
          <DestinationAddress val=PVC:0/38 />
          <ATMEncapsulation val=VCMUX />
          <X_TPLINK_IfName val=nas1 />
        </WANDSLLinkConfig>
        <WANPPPConnection instance=1 >
          <Enable val=1 />
          <DefaultGateway val=195.166.128.231 />
          <Name val=pppoa_0_38_0_d />
          <Uptime val=3640065 />
          <Username val=xxx@plusdsl.net />
          <Password val=xxx />
          <X_TPLINK_IfName val=ppp0 />
          <X_TPLINK_L2IfName val=nas1_1 />
          <X_TPLINK_ConnectionId val=0 />
          <ExternalIPAddress val=146.198.218.14 />
          <RemoteIPAddress val=195.166.128.231 />
          <DNSServers val=212.159.6.9,212.159.6.10 />
          <TransportType val=PPPoA />
          <PortMappingNumberOfEntries val=1 />
          <PortMapping instance=1 >
            <PortMappingEnabled val=1 />
            <ExternalPort val=12345 />
            <X_TPLINK_ExternalPortEnd val=12345 />
            <InternalPort val=22 />
            <X_TPLINK_InternalPortEnd val=22 />
            <PortMappingProtocol val="TCP or UDP" />
            <InternalClient val=192.168.2.111 />
          </PortMapping>
          <PortMapping nextInstance=2 />
        </WANPPPConnection>
        <WANPPPConnection nextInstance=2 />
      </WANConnectionDevice>
      <WANConnectionDevice nextInstance=8 />
    </WANDevice>

Now pppd when it comes up says something about address 0.38 already in use. So what have I done wrong.

I'm a bit suspicious that both 'atm' and 'wan' have vpi/vci entries. Any ideas?

not sure if it's it but i think under wan you need to say what interface to use from the pppoa session
try adding "ifname 'dsl0'" under wan

config interface 'wan'
option ifname 'dsl0'

Alas no cookie.

At boot I get message like

Thu Aug 16 11:33:37 2018 local2.notice br2684ctl[2053]: Interface "dsl0" created sucessfully
Thu Aug 16 11:33:37 2018 local2.notice br2684ctl[2053]: Communicating over ATM 0.0.38, encapsulation: VC mux
Thu Aug 16 11:33:37 2018 local2.info br2684ctl[2053]: Interface configured
Thu Aug 16 11:33:37 2018 local2.info br2684ctl[2053]: RFC 1483/2684 bridge daemon started

But it soon settles into

Thu Aug 16 11:35:44 2018 daemon.notice netifd: Interface 'wan' is setting up now
Thu Aug 16 11:35:44 2018 daemon.err insmod: module is already loaded - slhc
Thu Aug 16 11:35:44 2018 daemon.err insmod: module is already loaded - ppp_generic
Thu Aug 16 11:35:44 2018 daemon.err insmod: module is already loaded - pppox
Thu Aug 16 11:35:44 2018 daemon.err insmod: module is already loaded - pppoatm
Thu Aug 16 11:35:44 2018 daemon.info pppd[8025]: Plugin pppoatm.so loaded.
Thu Aug 16 11:35:44 2018 daemon.info pppd[8025]: PPPoATM plugin_init
Thu Aug 16 11:35:44 2018 daemon.info pppd[8025]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
Thu Aug 16 11:35:44 2018 daemon.notice pppd[8025]: pppd 2.4.7 started by root, uid 0
Thu Aug 16 11:35:44 2018 daemon.err pppd[8025]: connect(0.38): Address in use
Thu Aug 16 11:35:44 2018 daemon.info pppd[8025]: Exit.
Thu Aug 16 11:35:44 2018 daemon.notice netifd: Interface 'wan' is now down

if it helps my interfaces are

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN qlen 1000
    link/ether e8:de:27:9c:c8:ba brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether e8:de:27:9c:c8:ba brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd84:32c:ad2f::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::eade:27ff:fe9c:c8ba/64 scope link 
       valid_lft forever preferred_lft forever
5: eth0.1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether e8:de:27:9c:c8:ba brd ff:ff:ff:ff:ff:ff
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether e8:de:27:9c:c8:bc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::eade:27ff:fe9c:c8bc/64 scope link 
       valid_lft forever preferred_lft forever
7: dsl0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:00:01:00:00:00 brd ff:ff:ff:ff:ff:ff

The ppp command seems to be

/bin/sh ./ppp.sh pppoa teardown wan {"ifname":"dsl0","proto":"pppoa","username":"xxx@plusdsl.net","password":"xxx","vpi":0,"vci":38,"encaps":"vc"}

it's very different to my setup but here is my working config for tpg Australia on a td-w8980

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 'fd0b:xxxx:xxxx::/48'

config dsl 'dsl'
	option tone 'av'
	option line_mode 'adsl'
	option annex 'a2p'
	option xfer_mode 'atm'
	option ds_snr_offset '-10'

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

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

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

config interface 'wan'
	option ifname 'dsl0'
	option proto 'pppoe'
	option ipv6 '1'
	option password 'xxxxxxxxxxxx'
	option username 'xxxxxxxx@L2TP.tpg.com.au'
	option delegate '0'
	option peerdns '0'
	option dns '8.8.8.8'

config interface 'wan6'
	option ifname '@wan'
	option proto '6in4'
	option username 'xxxxxxx'
	option password 'xxxxx'
	option peeraddr 'x.x.x.x'
	option ip6addr '2001:x:x:x::x/64'
	option ip6prefix '2001:x:x:x::/64'
	option tunnelid 'xxxx'

config interface 'iptv'
	option proto 'static'
	option ipaddr '10.150.13.1'
	option netmask '255.255.255.0'
	option ifname 'dsl1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 2 4 5 6t'
1 Like

OK - still haven't managed to get it to come up. These are the bits of network config that are important:

config atm-bridge 'atm'                                                        
	option payload 'bridged'                                               
	option nameprefix 'dsl'                                                
	option vci '38'                                                        
	option vpi '0'                                                         
	option encaps 'vc'                                                     

config dsl 'dsl'
	option tone 'av'
	option xfer_mode 'atm'
	option firmware '/lib/firmware/lantiq-vrx200-a.bin'
	option annex 'a2p'
	option ds_snr_offset '0'

config interface 'wan'
	option ifname 'dsl0'
	option proto 'pppoa'
	option username 'xxxx@plusdsl.net'
	option password 'xxxx'
	option vci '38'
	option vpi '0'

config device 'wan_dev'
	option macaddr 'e8:de:27:9c:c8:bb'
	option name 'dsl0'

With these the boot sequence does:

Thu Aug 16 14:00:18 2018 kern.info kernel: [    0.697235] phy-xrx200 gphy-xrx200: requesting lantiq/xrx200_phy11g_a22.bin
Thu Aug 16 14:00:18 2018 kern.info kernel: [    0.704974] phy-xrx200 gphy-xrx200: booting GPHY0 firmware at 3A40000
Thu Aug 16 14:00:18 2018 kern.info kernel: [    0.711329] phy-xrx200 gphy-xrx200: booting GPHY1 firmware at 3A40000
Thu Aug 16 14:00:18 2018 kern.info kernel: [    1.866491] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.4 0:00: attached PHY driver [Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.4] (mii_bus:phy_addr=0:00, irq=-1)
Thu Aug 16 14:00:18 2018 kern.info kernel: [    1.950468] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.4 0:05: attached PHY driver [Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.4] (mii_bus:phy_addr=0:05, irq=-1)
Thu Aug 16 14:00:18 2018 kern.info kernel: [    2.034452] Intel XWAY PHY11G (xRX v1.2 integrated) 0:11: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:11, irq=-1)
Thu Aug 16 14:00:18 2018 kern.info kernel: [    2.118451] Intel XWAY PHY11G (xRX v1.2 integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:13, irq=-1)
Thu Aug 16 14:00:27 2018 daemon.notice netifd: Interface 'wan' is setting up now
Thu Aug 16 14:00:28 2018 daemon.info pppd[1231]: Plugin pppoatm.so loaded.
Thu Aug 16 14:00:28 2018 daemon.info pppd[1231]: PPPoATM plugin_init
Thu Aug 16 14:00:28 2018 daemon.info pppd[1231]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
Thu Aug 16 14:00:28 2018 daemon.notice pppd[1231]: pppd 2.4.7 started by root, uid 0
Thu Aug 16 14:00:29 2018 daemon.err pppd[1231]: connect(0.38): No such device
Thu Aug 16 14:00:29 2018 daemon.info pppd[1231]: Exit.
Thu Aug 16 14:00:29 2018 daemon.notice netifd: Interface 'wan' is now down
Thu Aug 16 14:00:29 2018 daemon.notice netifd: Interface 'wan' is setting up now
Thu Aug 16 14:00:31 2018 daemon.notice netifd: Interface 'wan' is setting up now
Thu Aug 16 14:00:31 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Thu Aug 16 14:00:31 2018 kern.info kernel: [   27.826392] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Thu Aug 16 14:00:31 2018 kern.info kernel: [   27.880973] br-lan: port 2(wlan0) entered blocking state
Thu Aug 16 14:00:31 2018 kern.info kernel: [   27.884971] br-lan: port 2(wlan0) entered disabled state
Thu Aug 16 14:00:31 2018 kern.info kernel: [   27.891231] device wlan0 entered promiscuous mode
Thu Aug 16 14:00:31 2018 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Aug 16 14:00:31 2018 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Thu Aug 16 14:00:33 2018 daemon.info pppd[1555]: Plugin pppoatm.so loaded.
Thu Aug 16 14:00:33 2018 daemon.info pppd[1555]: PPPoATM plugin_init
Thu Aug 16 14:00:33 2018 daemon.info pppd[1555]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
Thu Aug 16 14:00:33 2018 daemon.notice pppd[1555]: pppd 2.4.7 started by root, uid 0
Thu Aug 16 14:00:33 2018 daemon.err pppd[1555]: connect(0.38): No such device
Thu Aug 16 14:00:33 2018 daemon.info pppd[1555]: Exit.
Thu Aug 16 14:00:38 2018 daemon.info hostapd: wlan0: STA e0:xx:a5:xx:f6:xx IEEE 802.11: authenticated
Thu Aug 16 14:00:38 2018 daemon.info hostapd: wlan0: STA e0:xx:a5:xx:f6:xx IEEE 802.11: associated (aid 1)
Thu Aug 16 14:00:38 2018 daemon.notice hostapd: wlan0: AP-STA-CONNECTED e0:xx:a5:xx:f6:xx
Thu Aug 16 14:00:38 2018 daemon.info hostapd: wlan0: STA e0:xx:a5:xx:f6:xx WPA: pairwise key handshake completed (RSN)
Thu Aug 16 14:00:45 2018 kern.info kernel: [   41.357991] ATM1.0.26    ATM (A1) firmware version 0.24
Thu Aug 16 14:00:45 2018 kern.warn kernel: [   41.361942] ifxmips_atm: ATM init succeed
Thu Aug 16 14:00:48 2018 local2.notice br2684ctl[2060]: Interface "dsl0" created sucessfully
Thu Aug 16 14:00:48 2018 local2.notice br2684ctl[2060]: Communicating over ATM 0.0.38, encapsulation: VC mux
Thu Aug 16 14:00:48 2018 local2.info br2684ctl[2060]: Interface configured
Thu Aug 16 14:00:48 2018 local2.info br2684ctl[2060]: RFC 1483/2684 bridge daemon started
Thu Aug 16 14:01:27 2018 daemon.info pppd[2634]: PPPoATM plugin_init
Thu Aug 16 14:01:27 2018 daemon.info pppd[2634]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
Thu Aug 16 14:01:27 2018 daemon.notice pppd[2634]: pppd 2.4.7 started by root, uid 0
Thu Aug 16 14:01:27 2018 daemon.err pppd[2634]: connect(0.38): Address in use
Thu Aug 16 14:01:27 2018 daemon.info pppd[2634]: Exit.
Thu Aug 16 14:01:27 2018 daemon.notice netifd: Interface 'wan' is now down

And the last errors continue - so looks like something is grabbing the interface first - but I can't see what it is ....

If you are using Lantiq based TD-W8970 v1.x and trying to use PPPoA, you must delete the 'ATM Bridge' section, otherwise you will likely encounter problems.

Suggest reading section 9.4 of the following guide for HH5A to see if it will help.
https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=266

(If you are using a TD-W8970 v3, I don't believe DSL is supported on Broadcom chipsets)

Bingo. Trick was to remove atm-bridge.

I also added option line_mode 'adsl' to dsl.

And this meant it came up!

Thanks for the help.

Now I have the weekend to see if I can do an nftables firewall ...

:wink:

Hopefully this will put a smile on your face as it did mine. I read the title of the thread as

[My router] bring up ads!

and was wondering just how that could be happening that it was inserting advertisements!

1 Like

If your problem is solved, please consider marking the topic as [Solved] (Click the pencil behind the topic...).