netbird icon indicating copy to clipboard operation
netbird copied to clipboard

WG through kernel on Pis w/ Ubuntu 20.04

Open agneevX opened this issue 3 years ago • 5 comments

Hello,

Ubuntu 20.04 ships 5.4.0 of the kernel on the Raspberry Pis.

I was wondering if wireguard-go is used instead of the kernel implementation?

agneevX avatar May 29 '22 17:05 agneevX

@agneevX Yes. If there is no WireGuard module available on the system, we use the wireguard-go implementation.

braginini avatar May 29 '22 20:05 braginini

Is there a way to actually test this @braginini?

agneevX avatar May 30 '22 03:05 agneevX

Hello, @agneevX you can see the interface type after you run the netbird up command followed by ip -d link show wt0. See the example below with an output of a kernel Wireguard interface:

ip -d link show wt0
76: wt0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/none  promiscuity 0 minmtu 0 maxmtu 2147483552
    wireguard addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

Wireguard type should appear in the second or third line.

mlsmaycon avatar May 30 '22 13:05 mlsmaycon

This appears to be the same on my system:

~> ip -d link show wt0
56: wt0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/none  promiscuity 0 minmtu 0 maxmtu 2147483552
    wireguard addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

I ran a iperf3 test between two machines and I got speeds low enough that it indicated the usage of wireguard-go.

agneevX avatar May 30 '22 14:05 agneevX

@agneevX would you mind pinging us on slack? Let's debug it there -> slack channel

braginini avatar May 30 '22 19:05 braginini

Since v0.20.0 we've refactored the connection layer. This should increase the rate of direct connection, therefore improving the connection speeds.

mlsmaycon avatar Jun 16 '23 07:06 mlsmaycon