X86 packet loss

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.

At first reading...I thought the mini PC was the OpenWrt...

What device are you connecting in between that's running OpenWrt?

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.

Are you saying you test OpenWrt on the mimi pc....then shutdown and run Finnix?

What connections have you actually tested?

E.g. does a speed test produce similar results?

Next is this Fnnix a GUI based OS?

  • Are you connecting a machine to the router...or whatever you will connect in a normal use case?

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:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like

When the modem is directly connected to a PC, my ip is 72.0.x.x

cat /etc/config/network

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

config globals 'globals'
        option ula_prefix '[Removed]'

config device
        option name 'br-lan'
        option name 'bridge'
        list ports 'eth0'

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

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

cat /etc/config/wireless

cat: can't open '/etc/config/wireless': No such file or directory

cat /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'

cat /etc/config/firewall

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

The config files seem fine.

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.

1 Like

image

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.

In LuCI, navigate to Network > Interfaces.

Click on the Devices tab.

See if MTU is set to 1500 for all devices.

SSH in to the router and run nslookup google.com

Post the results in preformatted text, by using the icon highlighted in red...

OpenWRT Posting Icons

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'

I never set up dns on OpenWrt, I left nearly all settings on all default as this is a fresh install and I only started using OpenWrt 3 days ago.

I enabled custom dns just now on wan and then restarted mini-pc and computer, although there is still packet loss.

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'
        option peerdns '0'
        option delegate '0'
        list dns '9.9.9.11'
        list dns '149.112.112.11'

MTU is 1500 for br-lan, eth0, and eth1

nslookup google.com


root@OpenWrt:~# nslookup google.com
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:      google.com
Address 1: 142.250.217.110
Address 2: 2607:f8b0:400a:80b::200e

That can cause functionality to not work.

I would suggest configuring your install first, then continue testing.

See the Quick Start Guide and the User Guide on the wiki...

And what are the NIC chipsets in your minipc? Some vendors use odd/exotic chips for secondary Ethernet on miniboards.

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)?

1 Like

Here is the NICs, I think.

root@tty1:~# lshw -class network
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
  *-network DISABLED
       description: Wireless interface
       product: Wireless 3165
       vendor: Intel Corporation

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 that NIC...works fine.

Run a continuous ping and watch the kernel and system logs of the openwrt router. It should be throwing errors with 60% loss.

Back to the google packet loss...

SSH in to the router and run the following...

opkg update
opkg install mtr

Then, run the following mtr traces (you're still in the CLI on the router) -

Note that were using the IP you got from nslookup.

TCP -

mtr -P 80 -c 10 -T -w 142.250.217.110

UDP -

mtr -c 10 -u -w 142.250.217.110

ICMP Echo -

mtr -c 10 -w 142.250.217.110

Post the results.

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.