Hello, I'm trying to get OpenWrt setup and there is a lot of packet loss when freshly installed.
I have a x86 mini-pc with a J4125 that has two ethernet ports, wan and lan. When I have OpenWrt started I get 50% to 80% packet loss. When the mini-pc is directly connected to the modem in either port or with either ethernet cable, I get 0% packet loss tested on a live finnix linux usb.
On OpenWrt I have changed the lan ip from 192.168.1.1 to 192.168.10.1 which didn't work. I have also deleted wan6 from /etc/config/network and it didn't work. In both cases I still have the same packet loss problem as a fresh install.
The mini-pc is OpenWrt. I am ping testing out of OpenWrt with 'ping google.com' and get packet loss. Doing the same command in finnix live usb gives me 0 packet loss. Sorry for the confusion, I wasn't really clear.
My original setup was Modem > Mini-pc with OpenWrt > unmanaged switch > Pcs, but because I noticed packet loss, I was trying to figure out where it was coming from.
I was able to narrow it down to the mini-pc and wasn't sure if it was hardware or software. I tested from OpenWrt on the mini-pc and saw packet loss, then I used the live usb which I initially used to install OpenWrt on my mini-pc's hardrive, to ping test again on the mini pc and saw 0 packet loss. Yes, I rebooted.
The mini-pc is the router? I thought OpenWrt was router software, or is this a misunderstanding on my part?
edit: Yes the packet loss is severe and noticeable, I only started using OpenWrt 3 days ago and could notice it immediately. When I run speedtests, I get 50-100% of my internet plan speed.
edit: I'm typing and posting on the original setup, and this a ping test on this computer, but the results look the same directly from OpenWrt on the mini-pc.
Is the modem in bridge mode? If you plug a PC directly into the modem, what IP address is given to the PC? (post just the first 2 octets in bold: aaa.bbb.ccc.ddd)
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
optoin 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
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 Ping
config rule
option name Allow-Ping
option src wan
option proto icmp
option icmp_type echo-request
option familty ipv4
option target ACCEPT
config rule
option name Allow-IGMP
option src wan
option proto igmp
option family ipv4
option target ACCEPT
# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option src_ip fc00::/6
option dest_ip fc00::/6
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
# Allow essential incoming IPv6 ICMP traffic
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
# Allow essential forwarded IPv6 ICMP traffic
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
# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables. if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
option name Support-UDP-Traceroute
option src wan
option dest_port 33434:33689
option proto udp
option family ipv4
option target REJECT
option enabled false
# include a file with users custom iptables rules
config include
option path/etc/firewall.user
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# port redirect of remapped ssh port (22001) on wan
#config redirect
# option src wan
# option src_dport 22001
# option dest lan
# option dest_port 22
# option proto tcp
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 192.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
what do you get in terms of performance/packet loss when you test directly from your router. That is, ssh into your router and ping various hosts from there.
It looks like this when I ssh, the same as my initial testing on the mini-pc (the router in this case). Ping test looks the same when I test google, bing, wikipedia, twitter, etc.
Post the results in preformatted text, by using the icon highlighted in red...
I don't know if you cut off part of your network configs posted above, but I don't see any DNS resolvers defined in the config interface 'wan' section.
Example -
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
option peerdns '0'
option delegate '0'
list dns '8.8.8.8'
list dns '8.8.4.4'
How so? The defaults in OpenWrt are generally applicable to most environments as a router (provided that the upstream connection is made via DHCP and is not using the 192.168.1.0/24 subnet).
This is not a DNS issue.
It could potentially be related to the NIC drivers as @jdwl1o1 suggested. It appears that there are two ethernet interfaces -- are they both built-in to the mini PC? Or is one (or both) an expansion card or a USB connected adapter?
What happens if you ping the router from a computer on the LAN (in terms of packet loss and latency)?
There are two ethernet ports built in to the mini-pc. It's a Beelink GK55 Mini PC.
With modem > mini-pc > laptop and ping testing 192.168.10.1
C:\Users\Tendr>ping -t 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Reply from 192.168.10.1: bytes=32 time=1ms TTL=64
Reply from 192.168.10.1: bytes=32 time=1ms TTL=64
Reply from 192.168.10.1: bytes=32 time=1ms TTL=64
Reply from 192.168.10.1: bytes=32 time=1ms TTL=64
Reply from 192.168.10.1: bytes=32 time=1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.10.1:
Packets: Sent = 19, Received = 19, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Control-C
^C
C:\Users\Tendr>
edit: I'm not sure if did what you asked right. This might be pointless, but if i ping 72.0.x.x (my ip address) from modem > mini-pc > laptop this is what I get
C:\Users\Tendr>ping -t 72.0.x.x
Pinging 72.0.x.x with 32 bytes of data:
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Reply from 72.0.x.x: bytes=32 time=1ms TTL=64
Ping statistics for 72.0.x.x:
Packets: Sent = 20, Received = 20, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Control-C
^C
C:\Users\Tendr>
I have tried three times, and I'll continue to keep trying, but this goes back to the problem of me having packet loss through OpenWrt.
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.1/packages/x86_64/base/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.1/packages/x86_64/luci/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.1/packages/x86_64/routing/Packages.sig, wget returned 4.
* opkg_download: Check your network settings and connectivity.
If I connect my mini-pc with any os (edit: not openwrt) connected directly to the modem I get 0% packet loss. I don't know what the problem is.
edit: To be clear, I am stuck on the first command, 'opkg update'.
I don't know what you mean by this. I'm looking at the LuCI web interface on my laptop and I'm not seeing anything in system or kernel logs about packet loss.
I do see the pocket loss directly off my mini-pc. I have a monitor and keyboard plugged in and get 58% packet loss tested over 1000 packets transmitted when I test ping google.com in OpenWrt directly.