Problems with WAN uptime with DIGI and AX3200

Hi!

This is my first post in the OpenWRT community forum. Thank you for everything you do!

I installed OpenWRT on a Xiaomi AX3200 device last year. Since the first day, I've had problems with the WAN interface. It disconnects randomly for some time and then reconnects. During these disconnects, I lose internet connectivity and WiFi. I'm using DIGI (Spain ISP).

Here are my logs:
https://hastebin.com/share/eyuderemad.perl (couldn't make Pastebin work it was blocking me all the time)

This is the firmware version I'm using: OpenWrt 23.05.0 r23497-6637af95aa / LuCI openwrt-23.05 branch git-23.236.53405-fc638c8.

From what I can see, it seems to be a PPPoE echo issue, but I’m not sure what the exact problem is.

Thank you in advance for your help!

P.S. I followed a guide from a blog post on the internet but couldn’t find the guide again.

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network

Log indicates that physical link went down.
Please post HERE ouputs of

ethtool eth0
ethool --show-eee eth0
ethtool -a eth0
mii-tool -v eth0

All are in regard to network speed and facilities negotiation

This is the output from those commands:

{
        "kernel": "5.15.134",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "Xiaomi Redmi Router AX6S",
        "board_name": "xiaomi,redmi-router-ax6s",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.0",
                "revision": "r23497-6637af95aa",
                "target": "mediatek/mt7622",
                "description": "OpenWrt 23.05.0 r23497-6637af95aa"
        }
}
package network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdd7:6946:717d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr 'XX:XX:XX:XX:XX:XX'
        option mtu '1488'
        option mtu6 '1488'

config interface 'wan'
        option proto 'pppoe'
        option device 'wan.20'
        option username 'REDACTED'
        option password 'REDACTED'
        option ipv6 'auto'
        option mtu '1488'
        option demand '0'
        option type 'bridge'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '20'
        option name 'wan.20'
        option mtu '1488'
        option mtu6 '1488'

When I put any of those commands it says that they were "not found", is there something I have to install or it should be preinstalled?

Any specific reason you are overriding this?

Why is it bridged?

It is also evident from the logs that the wan went down because of LCP timeouts, let's verify it's that the reason.

uci set network.wan.keepalive='10 10'
uci commit network
ifup wan

then check the logs
logread -f
and see if it will fail after about 2 minutes.

1 Like

Not really, I think that was the settings the post I used to configure OpenWrt used. ¿Should I change it to the default ones?

Also don't really know why. Is there any guide where I can redo the configuration to have it well setted?

These are the logs after I did the commands:

Thu Jun 13 13:24:19 2024 kern.info kernel: [595527.559976] mt7530-mdio mdio-bus:00 wan: Link is Up - 1Gbps/Full - flow control off
Thu Jun 13 13:24:19 2024 kern.info kernel: [595527.567792] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
Thu Jun 13 13:24:19 2024 daemon.notice netifd: Network device 'wan' link is up
Thu Jun 13 13:24:19 2024 daemon.notice netifd: 8021q 'wan.20' link is up
Thu Jun 13 13:24:19 2024 daemon.notice netifd: Interface 'wan' has link connectivity
Thu Jun 13 13:24:19 2024 daemon.notice netifd: Interface 'wan' is setting up now
Thu Jun 13 13:24:19 2024 kern.info kernel: [595527.574742] IPv6: ADDRCONF(NETDEV_CHANGE): wan.20: link becomes ready
Thu Jun 13 13:24:19 2024 daemon.info pppd[31639]: Plugin pppoe.so loaded.
Thu Jun 13 13:24:19 2024 daemon.info pppd[31639]: PPPoE plugin from pppd 2.4.9
Thu Jun 13 13:24:19 2024 daemon.notice pppd[31639]: pppd 2.4.9 started by root, uid 0
Thu Jun 13 13:24:19 2024 daemon.err pppd[31639]: Interface wan.20 has MTU of 1488 -- should be at least 1500.
Thu Jun 13 13:24:19 2024 daemon.err pppd[31639]: This may cause serious connection problems.
Thu Jun 13 13:24:20 2024 daemon.info pppd[31639]: PPP session is 6509
Thu Jun 13 13:24:21 2024 daemon.warn pppd[31639]: Connected to 3c:ec:ef:c7:eb:d0 via interface wan.20
Thu Jun 13 13:24:21 2024 kern.info kernel: [595529.344786] pppoe-wan: renamed from ppp0
Thu Jun 13 13:24:21 2024 daemon.info pppd[31639]: Renamed interface ppp0 to pppoe-wan
Thu Jun 13 13:24:21 2024 daemon.info pppd[31639]: Using interface pppoe-wan
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: Connect: pppoe-wan <--> wan.20
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: PAP authentication succeeded
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: peer from calling number 3C:EC:EF:C7:EB:D0 authorized
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: local  IP address 100.64.228.201
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: remote IP address 10.0.0.1
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: primary   DNS address 100.100.1.1
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: secondary DNS address 100.90.1.1
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Network device 'pppoe-wan' link is up
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is up
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Interface 'wan' is now up
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using nameserver 100.100.1.1#53
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using nameserver 100.90.1.1#53
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Thu Jun 13 13:24:21 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: local  LL address fe80::0000:0000:6440:e4c9
Thu Jun 13 13:24:21 2024 daemon.notice pppd[31639]: remote LL address fe80::0000:0000:0000:0001
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Interface 'wan_6' is enabled
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Interface 'wan_6' has link connectivity
Thu Jun 13 13:24:21 2024 daemon.notice netifd: Interface 'wan_6' is setting up now
Thu Jun 13 13:24:21 2024 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)
Thu Jun 13 13:24:21 2024 user.notice firewall: Reloading firewall due to ifupdate of wan (pppoe-wan)
Thu Jun 13 13:24:26 2024 daemon.notice netifd: Interface 'wan_6' is now up
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using nameserver 100.100.1.1#53
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using nameserver 100.90.1.1#53
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using nameserver 2a0c:5a80:0:2::1#53
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using nameserver 2a0c:5a84:0:2::1#53
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 4 names
Thu Jun 13 13:24:26 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Thu Jun 13 13:24:26 2024 user.notice firewall: Reloading firewall due to ifup of wan_6 (pppoe-wan)

If the default 1492 works fine, there is no reason to lower it.

uci delete network.wan.type
uci commit network
ifup wan

The logs stop before 2 minutes have passed, so we haven't seen if there is some issue with LCPs.

Deleted the override (the default value appears to be 1480).

Done this but still have the br-lan (atleast in LuCI).

The next logs I had were DHCP leases from br-lan devices that appeard 20+ minutes later.

Can you confirm with what ip link says?

That's alright.

That's good, no LCPs were dropped.
I suppose the connection kept up, right?

This is the output from ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
3: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1488 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:48:4e:9a brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
13: wl1-ap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state DOWN qlen 1000
    link/ether 5c:02:14:fb:2a:54 brd ff:ff:ff:ff:ff:ff
18: wl0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 82:8e:0a:7f:58:fd brd ff:ff:ff:ff:ff:ff
164: wan.20@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1488 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:48:4e:9a brd ff:ff:ff:ff:ff:ff
165: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1480 qdisc fq_codel state UNKNOWN qlen 3
    link/ppp

This morning the connection was up like 7 hours so I guess it resetted at 5 in the morning or so.

You have also set the mtu in wan interface. Again if there is no valid reason for this, removing the mtu will use the default mtu. Also the pppoe interface automatically adjusts the mtu.

This can be a periodic restart from the ISP side as well.

I've read that I should put it in 1500 for my ISP, ¿Could that be correct?

There are some other people on the forum having the same problem with my ISP and they say its because they do that weekly, ¿How can I change the interval to be weekly?

The ethernet default mtu is 1500. Leave the overrides empty and it will be switched to that.

You should ask them to do it weekly, this is not something that you can control.

¿Is it? The placeholder appears to be 1480:
image

Can it be something that can we changed via the LCP echo failure threshold and LCP echo interval parameters?

The placeholder might show 1480, but what does the ip link say?

As for the LCP, it is used to detect peer down, however we are talking about periodic restarts from your ISP.

This is the output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
3: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1488 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:48:4e:9a brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:fb:2a:52 brd ff:ff:ff:ff:ff:ff
13: wl1-ap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state DOWN qlen 1000
    link/ether 5c:02:14:fb:2a:54 brd ff:ff:ff:ff:ff:ff
18: wl0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 82:8e:0a:7f:58:fd brd ff:ff:ff:ff:ff:ff
164: wan.20@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1488 qdisc noqueue state UP qlen 1000
    link/ether 5c:02:14:48:4e:9a brd ff:ff:ff:ff:ff:ff
165: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1480 qdisc fq_codel state UNKNOWN qlen 3
    link/ppp

Okey, didn't know that. Thank you!

Changed it under the devices tab and now it shows 1500MTU.

1 Like

Should be fine now.
Keep monitoring how often the connection is restarted and communicate to your ISP if needed.

Thank you. Its working flawlessly. Thank you :hearts:

1 Like