Random disconnects, lag, and other problems I've had with OpenWrt that I can't seem to fix

It is standard message, it is not error.
You should just replace old configuration files by new ones, and configure after:

cd /etc/config
rm firewall; mv firewall-opkg firewall
rm dhcp; mv dhcp-opkg dhcp
rm luci; mv luci-opkg luci

/etc/config/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 packet_steering '1'
        option ula_prefix '[REDACTED]' //IDK what this is so I redacted it just in case

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

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 interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '[REDACTED]' //again IDK if I am meant to redact this so I did just in case
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option country 'UZ'
        option cell_density '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '[REDACTED]'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid '[REDACTED]'
        option encryption 'psk2'
        option key '[REDACTED]'
        option network 'lan'
        option macfilter 'allow'
        list maclist '[REDACTED]'
        list maclist '[REDACTED]'
        list maclist '[REDACTED]'

/etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

/etc/config/firewall

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'

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'
        list network 'wan6'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'

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

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

I have already reset the router, it turns out that updating packages through opkg is not something you'd want to do according to the wiki, but thank you anyway :slight_smile:

So it's been around 12 hours of uptime, now I've got some errors:

RX packets:5559376 errors:11 dropped:0 overruns:0 frame:0
TX packets:5115998 errors:0 dropped:0 overruns:0 carrier:0

EDIT: I entered this command:

ifconfig -a eth0 | grep packets

Which interface is this? Wan? Lan? WiFi?

ifconfig -a eth0 | grep packets

This is the command I entered, sorry for not specifying it initially

UPD: Now the error count is 22.

Alright, so I've connected my router with a cable that went with it, now it's sitting on my table instead of being connected with a 20m cable resting in the far corner of my room. No errors so far, maybe it's actually the cable...

Yup... cables can do these things. Good plan to try a known good (short) cable.

Nope, after two hours and eight minutes I now have three errors:

RX packets:7609463 errors:3 dropped:0 overruns:0 frame:0
TX packets:7542760 errors:0 dropped:0 overruns:0 carrier:0

UPD: now it's 6
UPD2: now it's 12

I've borrowed my mom's laptop, now it's mine for several days, so I can conduct some tests with my main PC (PC's wired and laptop's wireless obviously). I'd be really grateful if you told me what version of iPerf I should use, what tests in particular I am meant to run (and for how long), and with what settings.

Glad I stumbled across this thread. I’m so used to running ‘apt update’ that I’ve done it without thinking several times . Which might explain some problems I’m having with dropped internet connections.
Might be a good idea to post a warning on the LuCI page for updates.

1 Like

iperf3 can be downloaded and installed on most platforms. For linux, including OpenWrt, you can even install it with the built-in package managers. Keep in mind that running iPerf on OpenWrt may produce lower than expected speeds because the process become CPU limited (how fast the device can source/sink packets is a CPU heavy process and very different than the routing or switching of those packets).

The website documents the operation of iperf quite well, but in the basic form... set one up as a server:

iperf3 -s

and then the other as a client pointing to the server IP

iperf3 -c <ip.address.of.server>

You can also run the reverse direction fairly easily by simply adding -R

iperf3 -R -c <ip.address.of.server>

Other arguments are available to run continuously, different payload sizes, and other things that can help you determine the throughput and any issues like dropped/retried packets and the like.

The goal here is to determine if the problem is internal to your network or external (wan/ISP).

1 Like

I'm back with some unexpected and straight up strange results.
https://pastebin.com/raw/WcpFj5Tf
It refused to give any output first several tries. One time it just dropped in the middle (included in the pastebin, probably the third run):

[  4]   0.00-1.01   sec  11.4 MBytes  94.5 Mbits/sec
[  4]   1.01-2.00   sec  11.4 MBytes  96.0 Mbits/sec
[  4]   2.00-3.01   sec  1.12 MBytes  9.42 Mbits/sec
[  4]   3.01-4.01   sec  0.00 Bytes  0.00 bits/sec

I had to restart both the server and the client several times before I was able to run the first test , but after that there was no problem in running tests (although the results seem fairly unstable to me).

What is the server? What is the client? How are they related on the network? (Same network? Different network?) wired? Wireless?

1 Like

The server is my PC (wired), the client is mom's laptop (wireless), and they're on the same network that's on my Archer C6 that I'm having trouble with. Really sorry for not specifying this in the first place.

What happens if you run the same tests with both systems wired?

This notebook doesn't have an ethernet port.

Do you have a usb to Ethernet adapter? Or another Ethernet connected device (a raspberry pi could be perfect here)?

Nope, the only device that I can connet with an ethernet cable is my PC (and my router ofc)

I am 1000% sure it's not some problem with my ISP, I've been using their service since 2016 and I've had zero problems (except when there were general outages and other temporary issues, most of them got announced on their website) with my old router (WR-740N) and when PC was connected directly to WAN.