TD-W8970 v1 crash with no visible errors in logs

Hello. I am opening this thread for mainly 2 reasons:

  • If I open another separate thread for every issue that I encounter, admins will probably ban me... and they will be right to do it.... so I created this thread with every single problem I have now. Again I'm sorry that I created so many threads in the past.
  • I want to find out if it is my TD-W8970 v1 (1.2) is broken or if it is my configuration that makes it crash. I think, but I might be completely wrong, that no-one is checking the working status of this router model on every configurations (which makes sense, its impossible to check everything), and since I have a quite unusual configuration (PPPoA connection, no VLAN, etc... etc...) maybe I get crashes.

WARNING: I wrote a lot.


More reasons on why this thread exists.
  • I love this router. It was cheap when I bought it. Gigabit switch, ADSL2+ (even VDSL), CPU with sort of SMP, 500 MHz, three wifi antennas.
  • I have started custom building by own OpenWRT with 15.05, some builds more stable than others, of course, but once I found a stable one it worked with almost 0-problems (at least had 24h of uptime with no crash).
  • Currently does not matter if I choose a pre-compiled image or build my own version from any active branch I select (lede-17.01, openwrt-18.06, master) the router will have major problems (switch dead, random reboots, frezzes, ...) in few hours from boot, I want to find out why instead of simply complaining.
  • I want to build an ultra fast minimal image of OpenWRT
  • I want to learn
  • I am currently stuck using this garbage. I can hear it sobbing because it can not handle so much work.
  • Check some photos in the "QUESTION YOU MIGHT HAVE" section.

BUILD ENV
Main OS is Windows, so I set up a Debian VM (minimal, no-gui, I ssh into it) with every packet I need to compile my own version of OpenWRT.


RETRIVE SOURCES
cd /home/vento
# First delete old build folder, called "buildop"
rm -rf buildop
# update current local version of openwrt
# previously obtained with
#         git clone https://www.github.com/openwrt/openwrt
#         mv openwrt openwrt_backup
#
cd openwrt_backup
git pull
cd ..
# create a new "buildop" directory
cp -R openwrt_backup buildop
# update feeds and install only necessary packages 
cd buildop
./scripts/feeds update -a
./scripts/feeds install libpam libgnutls libopenldap libidn2 libssh2 liblzma libnetsnmp jansson

BUILD CONFIG

Let's download my last configuration used, file name: master_diff_031 (as you see not a real minimal build configuration, lots of debug stuffs are still there but its to find out why it does not work).

# apply diff file
cd buildop
cat /home/username/master_diff_031 > .config
# expand config file
make defconfig

Now let me explain the major changes you see inside that diff file (created with /scripts/diffconfig.sh > master_diff_031).

I do not want to use a thing with no RTC as NTP server

# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set

No IPV6

# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6 is not set
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_IPV6 is not set
# CONFIG_PACKAGE_libip6tc is not set
# CONFIG_PACKAGE_kmod-nf-ipt6 is not set

No need of OPKG

CONFIG_CLEAN_IPKG=y
# CONFIG_PACKAGE_openwrt-keyring is not set
# CONFIG_PACKAGE_opkg is not set
# CONFIG_PACKAGE_libuclient is not set
# CONFIG_PACKAGE_uclient-fetch is not set
# CONFIG_PACKAGE_usign is not set
# CONFIG_SIGNED_PACKAGES is not set
# CONFIG_PER_FEED_REPO is not set

No need of security

CONFIG_PKG_CC_STACKPROTECTOR_NONE=y
# CONFIG_PKG_CHECK_FORMAT_SECURITY is not set
# CONFIG_PKG_FORTIFY_SOURCE_1 is not set
CONFIG_PKG_FORTIFY_SOURCE_NONE=y
# CONFIG_PKG_RELRO_FULL is not set
CONFIG_PKG_RELRO_NONE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_KERNEL_CC_STACKPROTECTOR_NONE=y
# CONFIG_KERNEL_CC_STACKPROTECTOR_REGULAR is not set
# CONFIG_KERNEL_STACKPROTECTOR is not set

I do not need any of these

# CONFIG_FSTOOLS_UBIFS_EXTROOT is not set
CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG=y
# CONFIG_OPENLDAP_DEBUG is not set
# CONFIG_PACKAGE_MAC80211_MESH is not set

I'll manually download the lantiq DSL firmware

# CONFIG_PACKAGE_bspatch is not set
# CONFIG_PACKAGE_dsl-vrx200-firmware-xdsl-a is not set
# CONFIG_PACKAGE_dsl-vrx200-firmware-xdsl-b-patch is not set
# CONFIG_PACKAGE_libbz2 is not set
# CONFIG_PACKAGE_ltq-vdsl-vr9-vectoring-fw-installer is not set

This router does not have that much ram

# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y

I'd like to make the router work before testing offload

# CONFIG_PACKAGE_kmod-ipt-offload is not set
# CONFIG_PACKAGE_kmod-nf-flow is not set

Wanted to try uboot-envtools

CONFIG_PACKAGE_uboot-envtools=y

MAKE IMAGE

Run these before make download (download a file manually). The whole process will take much less time (there is a bug).

mkdir -p /home/vento/buildop/dl
cd  /home/vento/buildop/dl
wget ftp://ftp.denx.de/pub/u-boot/u-boot-2018.03.tar.bz2
cd /home/vento/buildop

Use the command make download, not to enable parallel make, but to later get a build log easier to read. Save a debug log of the make download step by running it like this: make download V=s -j1 2>&1 | tee download.log.

Other things related to `uboot-envtools`. Skip if you want.

Since I'm trying to use uboot-envtools, make mtd0 writable by running nano target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW89X0.dtsi, and removing the line "read-only;" from partitions definition:

...
partitions {
    compatible = "fixed-partitions";
    #address-cells = <1>;
    #size-cells = <1>;

    partition@0 {
        reg = <0x0 0x20000>;
        label = "u-boot";
        read-only;  /* <------------------ REMOVE THIS LINE */
    };
...

Now we are ready to compile the whole thing, run make V=s -j1 2>&1 | tee build.log.
Download logs should be saved under /home/vento/buildop/download.log, build log under /home/vento/buildop/build.log.
The built image can is found at /home/vento/buildop/bin/targets/lantiq/xrx200/openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin.


FLASHING PROCESS

Since sysupgrade failed me sometimes (long story) I went a bit "crazy" with the installation process. To be fair I've never got a no-boot/dead-router after I've started doing this.

  • I setup my Rasberry PI like this. Actual photo. I run flashrom like this sudo flashrom -V -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -c "W25Q64.V" (careful flash chip might be different), and append -r, -w and -v to save, write and verify (duh!).
  • Special step. Done this only one time. Now I have every file I need.
    • Starting from a clean original firmware.
    • Reset settings
    • Update to last "available" firmware, released 19/06/2015. Released by TP-Link support not available on their site. Last firmware available from official site was released 13/06/2014.
    • Reset settings
    • Dump with Raspberry PI, I saved it as original.bin.
    • Shutdown Raspberry PI. Remove clip. Reconnect clip. Start Raspberry again. Check if chip has been dumped correctly: sudo flashrom -V -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -c "W25Q64.V" -v original.bin.
    • Make a copy of original.bin, called empty.bin.
    • Open empty.bin with an hex editor (I used HxD).
      • Write 0xFF from address 0x20000 to address 0x7A0000.
    • Make a backup of both original.bin and empty.bin. Send them to myself with email.
  • Get the update file (update.bin) ready
    • Make a copy of empty.bin, called update.bin.
    • Open with an hex editor, update.bin and the sysupgrade file got from the build process.
    • Copy every byte of the sysupgrade file
    • Starting from address 0x20000, overwrite every byte of update.bin
  • Copy update.bin in the raspberry
  • Flash update.bin it with sudo flashrom -V -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -c "W25Q64.V" -w update.bin
  • Shutdown Raspberry PI. Remove clip. Reconnect clip. Start Raspberry again. Check if chip has been written correctly: sudo flashrom -V -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -c "W25Q64.V" -v update.bin.

POST FLASHING CONFIGURATIONS

Yes I know that all following changes can be integrated in the build process, since removing/changing files actually take more space on the flash chip... I'll do it one day, once the router do not crash. Make sure to not mess up file permissions.

  • Remove banners just for fun.
    rm /etc/banner.failsafe
    touch /etc/banner.failsafe
    rm /etc/banner
    touch /etc/banner
    
  • Remove stuffs (see next bullet points)
    rm /etc/firewall.user
    rm /lib/netifd/ppp6-up
    
  • Apply custom configs (files in /etc/config/)
    • As you see I have a pppoa connection.
    • I've removed the default VLAN (eth0.1) and disabled VLAN features.
    • Since remote logging fails to capture crashlogs I've simply disabled it.
  • Write kernel.randomize_va_space=0 inside /etc/sysctl.conf. Disable security stuffs.
  • From /etc/sysctl.d/10-default.conf change net.ipv4.tcp_syncookies to 0 and remove ipv6 related strings, now useless.
  • Use this modified /lib/netifd/proto/ppp.sh. Function ppp_generic_setup has been modified to ditch completely any IPv6 reference (except for the string noipv6 passed as parameter to ppp), and to forcefully NOT request DNS ips from the ISP. Remember to not mess up file permissions, ppp.sh must be executable!
  • Download the publicly available lantiq dsl firmware. The file is called xcpe_581816_580B11.bin, rename it to lantiq-vrx200-a.bin and place it here /lib/firmware/.

SO? WHAT IS THE PROBLEM?
  • Router crash within 10 hours, 5 or less if its under heavy load.
  • Or drop pppoa-wan connection just to bring it back 20 seconds later.
  • Yes after a crash is see Crashlog allocated RAM at address 0x3f00000. But no crashlog file is generated under /sys/kernel/debug.
  • I have tried to setup my raspberry as log server, it worked but no crashlogs are saved.
  • I am currently unable to detect why this router crash.

OTHER QUESTIONS THAT I HAVE
  • How can I read crashlogs from ram? In the logread is see Crashlog allocated RAM at address 0x3f00000. I FOUND OUT HOW! POST 22 & 23. COMPILE YOUR IMAGE WITH /dev/mem ENABLED AND USE THE COMMAND dd.
  • Are there other why to troubleshot this? To know why this router crash?
  • After feeds update, I install only the minimum needed packages (see "RETRIVE SOURCES" section) to not get errors while running make menuconfig, make defconfig, ... etc ... Is this ok? Should I simply run ./scripts/feeds install -a?
  • I see this with logread at every boot: cacheinfo: Failed to find cpu0 device node followed by cacheinfo: Unable to detect cache hierarchy for CPU 0. This was happening time ago also on 18.06 but was later fixed... regression in master? Should I simply forget about it?
  • This is more a statement than a question. I used to compile this build adding -march=34kc -mtune=34kc -mmt -mdsp to target optimization (somewhere inside make menuconfig). -march=34kc should automatically enable -mmt -mdsp, but I write them anyway. Every-time that I brought this up I get tons of "34kc is like 24kc for GCC, it does not makes any difference!", but it does! I get less ram usage, and MT ASE and DSP ASE have been introduced with 34kc, 24kc do not have them. Also MT ASE are related to multithreading, useful since 18.06 introduced support to SMP on this cpu! Am I missing something big?
  • Does kernel.randomize_va_space=0 actually makes a difference?
  • Why Compile with support for patented functionality (under make menuconfig > Global build settings) is selected by default in LEDE but not on 18.06 and later?

QUESTION THAT YOU MIGHT HAVE
  • No GUI/LUCI? Yep. Less ram usage.
  • Is the router overheating? I think not. Max temp were 75 °C, now is 36 °C!
    • Wait... now it needs more power! Yep I bought a 30 W power-supply and router+fan should need 27 W max.
    • Dust? Nope. Custom air filter, easily removable thanks to its quality cardboard frame + black duct tape.
    • Isn't all of that an overkill?. Yes absolutely.
    • Is it loud?. Nah, PC is louder, event outside noise sometimes.
  • Did you test different configurations? I "think"... it can also be that I'm doing the same thing wrong over and over (probably this).
  • Why master and not lede or last 18.06?. LEDE feels faster but it crash more, also have less features that I'd like to use once everything works. 18.06 is completely unstable for me it can last 2 hours without a crash.
  • Do you know that OpenWRT does not have 100% uptime. Yes, yes I know that why I used to schedule an automatic reboot every morning at 7 (and/or shutdown it down completely at night and manually turn it on in the morning).
  • uboot-envtools is not configured! Yes I know, I wrote it only because it was inside the master_diff_031 file. Left it not configured do no harm. I'll play with uboot-envtools once everything works.
  • Hey lots of other stuffs can be removed! This is not a real minimal build. Yes I know. I want to remove more things I do not use, and I did in past configurations/test... First I'd like to achieve a stable build and properly identify where the problem is, to gradually later remove more and more things.

Support status: https://openwrt.org/toh/start?dataflt[Model*~]=8970

Since it is still supported, you should change the topic to reflect your actual problems.

1 Like

Yes I know that Its possible to get the last released openwrt version on this router. I literally wrote that xD

EDIT: titlle and initial section changed.

1 Like

My uptime for OpenWrt on my Qualcomm-based routers is typically limited only by power outages or intentional re-flashes or reboots to quickly clear out "experiments" that I've done to try to support users here or my own development / configuration efforts. I would imagine that your unit should be trouble-free for months at a time.

As RAM exhaustion is often a problem with all-in-one routers, that would be the first thing I'd check. The "easy" approach is to open an ssh session to the device and run logread -f & and something like

while true ; do uptime ; free ; sleep 10 ; done

and see what's there next time the device fails.

You could also mount something like a USB stick and redirect that output to files on that device so that it is preserved over a reboot.

1 Like

Will do. Thanks! I'll update this thread with my results.

I probably do everything tomorrow since now I need internet and I would have to detach the other router.

Btw do anyone knows what these errors means? And if they are bad? Didn't see them on LEDE or 18.06.

cacheinfo: Failed to find cpu0 device node
cacheinfo: Unable to detect cache hierarchy for CPU 0

I see them at every boot.

I started testing now anyway. Ok first problem.

Wed Feb 20 22:53:12 2019 kern.warn kernel: [ 3311.021084] leave showtime
Wed Feb 20 22:53:14 2019 daemon.info pppd[2512]: Terminating on signal 15
Wed Feb 20 22:53:14 2019 daemon.info pppd[2512]: Connect time 53.6 minutes.
Wed Feb 20 22:53:14 2019 daemon.info pppd[2512]: Sent 35450279 bytes, received 363427274 bytes.
Wed Feb 20 22:53:14 2019 daemon.notice netifd: Network device 'pppoa-wan' link is down
Wed Feb 20 22:53:19 2019 daemon.notice netifd: Interface 'wan' is now down

Router decided to stop pppoa connection. No reason. Went up again ~20 seconds later, showing the usual reconnect log:

Wed Feb 20 22:54:04 2019 kern.warn kernel: [ 3363.755566] enter showtime, cell rate: 0 - 2351, 1 - 2351, xdata addr: 0xa28c0000
Wed Feb 20 22:54:04 2019 kern.warn kernel: [ 3363.765455] enter showtime, cell rate: 0 - 2351, 1 - 2351, xdata addr: 0xa28c0000
Wed Feb 20 22:54:06 2019 daemon.notice netifd: Interface 'wan' is setting up now
Wed Feb 20 22:54:06 2019 daemon.err insmod: module is already loaded - slhc
Wed Feb 20 22:54:06 2019 daemon.err insmod: module is already loaded - ppp_generic
Wed Feb 20 22:54:06 2019 daemon.err insmod: module is already loaded - pppox
Wed Feb 20 22:54:06 2019 daemon.err insmod: module is already loaded - pppoatm
Wed Feb 20 22:54:07 2019 daemon.info pppd[4118]: Plugin pppoatm.so loaded.
Wed Feb 20 22:54:07 2019 daemon.info pppd[4118]: PPPoATM plugin_init
Wed Feb 20 22:54:07 2019 daemon.info pppd[4118]: PPPoATM setdevname_pppoatm - SUCCESS:0.8.35
Wed Feb 20 22:54:07 2019 daemon.notice pppd[4118]: pppd 2.4.7 started by root, uid 0
Wed Feb 20 22:54:07 2019 kern.info kernel: [ 3365.931322] pppoa-wan: renamed from ppp0
Wed Feb 20 22:54:07 2019 daemon.info pppd[4118]: Renamed interface ppp0 to pppoa-wan
Wed Feb 20 22:54:07 2019 daemon.info pppd[4118]: Using interface pppoa-wan
Wed Feb 20 22:54:07 2019 daemon.notice pppd[4118]: Connect: pppoa-wan <--> 0.8.35
Wed Feb 20 22:54:13 2019 daemon.info pppd[4118]: CHAP authentication succeeded: CHAP authentication success
Wed Feb 20 22:54:13 2019 daemon.notice pppd[4118]: CHAP authentication succeeded
Wed Feb 20 22:54:13 2019 daemon.notice pppd[4118]: local  IP address <ip>
Wed Feb 20 22:54:13 2019 daemon.notice pppd[4118]: remote IP address <ip>
Wed Feb 20 22:54:13 2019 daemon.notice netifd: Network device 'pppoa-wan' link is up
Wed Feb 20 22:54:13 2019 daemon.notice netifd: Interface 'wan' is now up
Wed Feb 20 22:54:13 2019 user.notice firewall: Reloading firewall due to ifup of wan (pppoa-wan)

Probably related to lcp options? Current pppd instance is running with ... lcp-echo-interval 1 lcp-echo-failure 5 lcp-echo-adaptive ... in the cmdline parameters (default values). Should I change something?

If you don't need flow-offloading, I'd suggest to disable it (even if just for testing; it's not enabled by default) - as I've experienced spurious reboots with it being enabled on lantiq, ath79 and ipq806x in the past.

Well I would like to use it but router is unstable so... let's debug one thing at a time. Btw I've explicitly disabled flow offloading now, put ppp to run in debug mode (changed in /etc/ppp/options) and set max verbosity in /etc/config/system (are conloglevel and klogconloglevel ignored now???).

Router just crashed. And nothing relevant has been logged.
Last things logged with logread -f & + while true ; do uptime ; free ; sleep 10 ; done as you suggested.

...
 10:32:53 up 20 min,  load average: 0.00, 0.00, 0.00
              total        used        free      shared  buff/cache   available
Mem:          58668       16328       33296          80        9044       26224
Swap:             0           0           0
 10:33:03 up 20 min,  load average: 0.00, 0.00, 0.00
              total        used        free      shared  buff/cache   available
Mem:          58668       16404       33220          80        9044       26148
Swap:             0           0           0
 10:33:13 up 20 min,  load average: 0.00, 0.00, 0.00
              total        used        free      shared  buff/cache   available
Mem:          58668       16348       33276          80        9044       26204
Swap:             0           0           0

Memory was available. CPU was not under load. Only 20 minutes uptime ....

Does anyone knows how to makes logs as verbose as possible?
I have already:

  • Set log_level '0' inside /etc/config/wireless
  • Set conloglevel '8' and cronloglevel '0' inside /etc/config/system
  • Enabled debug inside /etc/ppp/options (changed #debug to debug)

I do have the the exact same device running, and it runs mostly fine, certainly more than a few hours. There is a rather long-standing and unresolved issue with Lantiq devices where pppoe will drop randomly (varies between hours and months) and will not be able to reconnect unless rebooted, but it is not a hard crash as in your case.

Do you have the same problems when you go "full stock", i.e. not only stock image release build (maybe just your own dsl binary if you need it for vectoring), but also no other packages, in a bog-standard modem-on-wan, clients-on-lan setup? If so, I would be inclined to suspect a hardware issue.

Stock image works. I am using PPPoA but I think that the issue is the same with PPPoE right?. Also I do not need vectoring, I have a simple ADSL2+ connection (does this has to do with option tone "av" inside /etc/config/network? Should I use just option tone "a"?). Should I try to extract the vdsl firmware from the stock image?

If you don't need vectoring the dsl binary that comes with OpenWrt release builds will do just fine.

I think it's prudent to go one step at a time, it's no good to try to debug everything at once. Try an unmodified, "official" release image from downloads.openwrt.org, configure it to basic modem router operation, and then see if the problem still occurs. This way you can at least tell if it's the hardware, OpenWrt, or further down the line, something in your custom build.

Ok. I'll give 18.06.2 another shot and write here the results.

Ok I installed 18.06.02 as I do with the other images (RPI), set my usual configurations, set tone option in DSL settings to auto and reboot. Let's wait for a crash.

One other thing, as expected the following errors are not found anymore in logread (master has a bug?)

cacheinfo: Failed to find cpu0 device node
cacheinfo: Unable to detect cache hierarchy for CPU 0

But now this thing cam back (affect also LEDE if I'm not wrong).

Can't analyze schedule() prologue at 8043847c

Wow 13min uptime this is a new record... Again... logs did not shown anything (used the logread -f & + while true ; do uptime ; free ; sleep 10 ; done method)...

...
 14:37:39 up 13 min,  load average: 0.05, 0.15, 0.13
             total       used       free     shared    buffers     cached
Mem:         59128      31768      27360        544       3188       8980
-/+ buffers/cache:      19600      39528
Swap:            0          0          0
 14:37:49 up 13 min,  load average: 0.04, 0.15, 0.13
             total       used       free     shared    buffers     cached
Mem:         59128      31824      27304        544       3188       8980
-/+ buffers/cache:      19656      39472
Swap:            0          0          0
 14:37:59 up 14 min,  load average: 0.03, 0.14, 0.13
             total       used       free     shared    buffers     cached
Mem:         59128      31780      27348        544       3188       8980
-/+ buffers/cache:      19612      39516
Swap:            0          0          0

Also I get the Crashlog allocated RAM at address 0x3f00000... How can I read that memory address????? It's like the router is taunting me... "Hey! the crashlog is there but you do not know how to read it hahahahah". I tried ls /sys/kernel/debug and got this:

1e101000.ifxhcd     bdi                 fault_around_bytes  ieee80211           pinctrl             sleep_time          ubifs
1e106000.ifxhcd     extfrag             gpio                mips                pm_qos              ubi                 usb

No obvious crashlog here... am I wrong?

I attached an USB stick and sent logs there.... waiting for another crash....

Router finally crashed (+ automatic reboot). This are the last lines:

# me coming home connecting to Wi-Fi
Thu Feb 21 18:26:54 2019 daemon.debug hostapd: wlan0: STA <phone MAC address> IEEE 802.11: authentication OK (open system)
......
Thu Feb 21 18:26:54 2019 daemon.info hostapd: wlan0: STA <phone MAC address> WPA: pairwise key handshake completed (RSN)
# me turning on my pc
Thu Feb 21 18:37:37 2019 kern.info kernel: [ 9202.760127] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
Thu Feb 21 18:37:46 2019 kern.info kernel: [ 9210.951814] lantiq,xrx200-net 1e108000.eth eth0: port 5 lost link
Thu Feb 21 18:37:48 2019 kern.info kernel: [ 9212.999767] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
# me looking if something happend to router
Thu Feb 21 18:39:32 2019 authpriv.info dropbear[2542]: Child connection from 192.168.1.2:49713
Thu Feb 21 18:39:37 2019 authpriv.notice dropbear[2542]: Password auth succeeded for 'root' from 192.168.1.2:49713
Thu Feb 21 18:40:03 2019 authpriv.info dropbear[2542]: Exit (root): Exited normally
# father turning off his pc
Thu Feb 21 18:48:54 2019 kern.info kernel: [ 9879.597392] lantiq,xrx200-net 1e108000.eth eth0: port 2 lost link

I noticed that when no devices are connected with ethernet this happens (I removed the cable to going to my pc, the only one up):

Thu Feb 21 19:05:18 2019 kern.info kernel: [  497.290824] lantiq,xrx200-net 1e108000.eth eth0: port 5 lost link
Thu Feb 21 19:05:18 2019 kern.info kernel: [  497.296511] br-lan: port 1(eth0) entered disabled state
Thu Feb 21 19:05:18 2019 daemon.notice netifd: Network device 'eth0' link is down
Thu Feb 21 19:05:26 2019 kern.info kernel: [  505.482890] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
Thu Feb 21 19:05:26 2019 kern.info kernel: [  505.487777] br-lan: port 1(eth0) entered blocking state
Thu Feb 21 19:05:26 2019 kern.info kernel: [  505.492745] br-lan: port 1(eth0) entered forwarding state
Thu Feb 21 19:05:26 2019 daemon.notice netifd: Network device 'eth0' link is up

Why eth0 goes down when something is not connected? Btw I have an idea.... Maybe the bridge is the problem... how can I remove br-lan? and simply let wlan0 and eth0 work on different nets? Like 192.168.1.X for eth0 and 192.168.2.X for wlan0.

  • /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'
        option ipv6 '0'

config dsl 'dsl'
        option annex 'a'
        option ds_snr_offset '0'
        option xfer_mode 'atm'
        option line_mode 'adsl'
        option firmware '/lib/firmware/lantiq-vrx200-a.bin'

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 delegate '0'
        option ipv6 '0'

config interface 'wan'
        option proto 'pppoa'
        option delegate '0'
        option encaps 'vc'
        option atmdev '0'
        option vci '35'
        option vpi '8'
        option username 'benvenuto'
        option password 'ospite'
        option ipv6 '0'
        option peerdns '0'
        option mtu '1478'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '0'
  • /etc/config/dhcp is
config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/dev/null'
        option nonwildcard '1'
        option localservice '1'
        option quietdhcp '1'
        option sequential_ip '1'
        option filterwin2k '1'
        list server '1.1.1.1'
        list server '1.0.0.1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '24h'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
  • /etc/config/firewall (not showing usual default rules) is
config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option disable_ipv6 '1'
        option drop_invalid '1'
        option tcp_syncookies '0'
        option syn_flood '0'
        option synflood_protect '0'
        option flow_offloading '0'
        option flow_offloading_hw '0'

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

config zone
        option name 'wan'
        list network 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'lan'
        option dest 'wan'
  • And /etc/config/wireless is
config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option htmode 'HT20'
        option channel 'auto'
        option txpower '20'
        option country 'IT'
        option beacon_int '200'
        option distance '20'
        option log_level '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Wi-Fi'
        option encryption 'psk2+aes'
        option key 'password'
        option wpa_disable_eapol_key_retries '1'
        option isolate '1'

In most of the routers, there's one switch which supports different LAN/WAN ports. When no cable is plugged into any port then the switch kinds of disables itself to save power (AFAIK) and it makes sense to do that since these devices sometimes need every bit of power they can have, USB peripherals etc.