Openwrt Router Firmware

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
Wireguard server with multiple peers script: using the first 1
https://openwrt.org/docs/guide-user/services/vpn/wireguard/automated
This seems to work fine for the Raspberry Pi 400 runing OpenWRT 21.02 release.

Tested using wireless with an older Dec 2017 Acer Swift 3 laptop with cheap Comfast Intel AX200 card.

Without wireguard: Singtel 1Gbps plan, RT-AX82U router wireless connection, PT Mora Telematika Indonesia speedtest server

788b66aa-692a-44ec-bf8f-d5885a1d05b2.png


With wireguard running on the Raspberry Pi 400 (another network), Singtel 1Gbps plan, Asus RT-AX82U wireless, PT Mora Telematika Indonesia SpeedTest server
0e467e7d-a689-429d-862d-3134866d7296.png


Edit to add: it is easier to use QR code to add the Wireguard profile on the mobile (iOS/Android).

Eg:
Code:
qrencode -t ansiutf8 -o - <4_lan_Delta.conf

Performance drop as well for Wireguard fro the new installation of OpenWRT 21.02.01 for my Raspberry Pi 400. Tested with the new Acer Swift 3 with Intel AX201 wireless adapter.

Without wireguard:
5f4a6a3f-a953-4c68-b150-93455bde8511.png


With wireguard:

a12e7eb0-a419-4a74-9386-67793d21dd32.png
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
Wireguard on the Raspberry Pi 400 OpenWRT router is also working well with my SingTel mobile 4G connection outside.

SingTel speedtest server.
7927678896.png


Comparison with Asus Instant Guard (IPSec) on my Asus RT-AX82U
7927694222.png


Right now I do not really have servers or NAS running on the home network. So the only usage is to access the router through web GUI or SSH.
 
Last edited:

huffie

Senior Member
Joined
Mar 9, 2007
Messages
1,199
Reaction score
2
Need some assistance here with the following rough sketch:

ONT ----->Router A (DHCP Server on OpenWRT) ------(wired)------Router B (Act as AP & DHCP Relay on OpenWRT)

How do I go about configuring a wireless Guest network on Router B? Previously have tried to configure but doesn't seemed to be able to get pass Router A to the internet? Thanks
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
Need some assistance here with the following rough sketch:

ONT ----->Router A (DHCP Server on OpenWRT) ------(wired)------Router B (Act as AP & DHCP Relay on OpenWRT)

How do I go about configuring a wireless Guest network on Router B? Previously have tried to configure but doesn't seemed to be able to get pass Router A to the internet? Thanks

Check out this Youtube guide to see if it helps you, not using VLAN, just using Firewall rules. The second router should be configured in AP mode.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
OpenWRT on Linksys WRT1900AC v1 guide, it should also be applicable to other WRT series, like WRT-1200AC, WRT-1900ACS, WRT-3200AC and WRT-32X.


He was able to reach 840 Mbps (106MB/s) throughput with wired LAN connection. For WiFi, he was able to reach 470 Mbps. This is in line with my test result with OpenWRT 21.02.0 version (not yet on the 21.02.01).

My wired speed with an Acer Swift 3 laptop with Ugreen USB 3 to 2.5G Ethernet adapter. I have enabled the SW/HW routing/NAT offload.
0609b86d-6e2f-4b76-afab-3bd21b567695.png


My wireless test result with an Acer Swift 3 laptop with Intel AX200 card.

f729a786-62b9-44a7-9c5a-ac089ff26500.png


Just as a comparison, using the EA7500 v2 running OpenWRT, wireless performance is a bit better.

3a225ac1-85b2-45dc-aad5-4afb433cf065.png
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
In case you do not want to commit on a real openwrt router, you can use a virtual one first. You can actually build a full virtual network with OpenWRT router (or pfSense), OpenWRT AP, Linux VM and Windows VM, if you want to play with it.

https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm


Virtual OpenWRT under VirtualBox under WIndows (new Acer Swift 3 laptop)
Virtual Ubuntu 20.04 VM under the same machine.

The internal LAN network speed is very fast. Internet speed is kind of from the wireless adapter which is also decent.

OpenWRT WAN: bridged adapter (Intel AX201)
OpenWRT LAN: internal network

Code:
mcuee@vmUbuntu2004:~$ speedtest --server 7368
Retrieving speedtest.net configuration...
Testing from Singtel Fiber (219.75.13.29)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by PT Mora Telematika Indonesia (Singapore) [6.17 km]: 12.828 ms
Testing download speed................................................................................
Download: 444.36 Mbit/s
Testing upload speed......................................................................................................
Upload: 259.55 Mbit/s

mcuee@vmUbuntu2004:~$ iperf3 -c 192.168.88.1
Connecting to host 192.168.88.1, port 5201
[  5] local 192.168.88.235 port 33304 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   246 MBytes  2.06 Gbits/sec  1242    245 KBytes     
[  5]   1.00-2.00   sec   238 MBytes  2.00 Gbits/sec  1489    192 KBytes     
[  5]   2.00-3.00   sec   232 MBytes  1.95 Gbits/sec  954    230 KBytes     
[  5]   3.00-4.00   sec   227 MBytes  1.90 Gbits/sec  1445    195 KBytes     
[  5]   4.00-5.00   sec   237 MBytes  1.99 Gbits/sec  955    376 KBytes     
[  5]   5.00-6.00   sec   228 MBytes  1.91 Gbits/sec  1130    216 KBytes     
[  5]   6.00-7.00   sec   241 MBytes  2.02 Gbits/sec  1164    235 KBytes     
[  5]   7.00-8.00   sec   237 MBytes  1.98 Gbits/sec  1357    195 KBytes     
[  5]   8.00-9.00   sec   222 MBytes  1.86 Gbits/sec  1088    208 KBytes     
[  5]   9.00-10.00  sec   234 MBytes  1.96 Gbits/sec  1257    204 KBytes     
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.29 GBytes  1.96 Gbits/sec  12081             sender
[  5]   0.00-10.00  sec  2.28 GBytes  1.96 Gbits/sec                  receiver

iperf Done.

mcuee@vmUbuntu2004:~$ iperf3 -c 192.168.88.1 -R
Connecting to host 192.168.88.1, port 5201
Reverse mode, remote host 192.168.88.1 is sending
[  5] local 192.168.88.235 port 33966 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   293 MBytes  2.46 Gbits/sec                 
[  5]   1.00-2.00   sec   295 MBytes  2.47 Gbits/sec                 
[  5]   2.00-3.00   sec   312 MBytes  2.62 Gbits/sec                 
[  5]   3.00-4.00   sec   301 MBytes  2.52 Gbits/sec                 
[  5]   4.00-5.00   sec   294 MBytes  2.47 Gbits/sec                 
[  5]   5.00-6.00   sec   309 MBytes  2.59 Gbits/sec                 
[  5]   6.00-7.00   sec   287 MBytes  2.41 Gbits/sec                 
[  5]   7.00-8.00   sec   315 MBytes  2.64 Gbits/sec                 
[  5]   8.00-9.00   sec   293 MBytes  2.46 Gbits/sec                 
[  5]   9.00-10.00  sec   296 MBytes  2.49 Gbits/sec                 
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.93 GBytes  2.51 Gbits/sec  18081             sender
[  5]   0.00-10.00  sec  2.92 GBytes  2.51 Gbits/sec                  receiver

iperf Done.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
If you have access to VMware Workstation, then it is also possible to setup OpenWRT virtual router and set up a virtual lab with internal Linux/Windows/etc virtual machines.
Guide and download of ova files: https://openwrt.org/docs/guide-user/virtualization/vmware

Test Configuration
1) OpenWRT virtual router (normal Intel e1000 driver, not yet using vmxnet3 driver)
WAN brdiged to wireless network adapter (about 400Mbps from the Ookla test on the host)
LAN: Host only network adapter (DHCP from OpenWRT)

2) Ubuntu VM: (vmxnet3 driver)
LAN: Host only network adapter (DHCP from OpenWRT)

3) Test results
Internal network is very fast.
External Ookla speed is also pretty good, only slightly slower than the host.

Code:
ubuntu@ubuntu2004:~$ iperf3 -c 192.168.1.1
Connecting to host 192.168.1.1, port 5201
[  5] local 192.168.1.100 port 55182 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   376 MBytes  3.15 Gbits/sec    0   1.70 MBytes    
[  5]   1.00-2.00   sec   440 MBytes  3.69 Gbits/sec    0   3.10 MBytes    
[  5]   2.00-3.00   sec   501 MBytes  4.21 Gbits/sec    0   3.10 MBytes    
[  5]   3.00-4.00   sec   475 MBytes  3.98 Gbits/sec  583   2.21 MBytes    
[  5]   4.00-5.00   sec   535 MBytes  4.49 Gbits/sec    0   2.42 MBytes    
[  5]   5.00-6.00   sec   468 MBytes  3.92 Gbits/sec  430   1.78 MBytes    
[  5]   6.00-7.00   sec   481 MBytes  4.03 Gbits/sec    0   1.88 MBytes    
[  5]   7.00-8.00   sec   514 MBytes  4.31 Gbits/sec    0   1.93 MBytes    
[  5]   8.00-9.00   sec   495 MBytes  4.16 Gbits/sec   92   1.44 MBytes    
[  5]   9.00-10.00  sec   510 MBytes  4.28 Gbits/sec    0   1.50 MBytes    
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  4.68 GBytes  4.02 Gbits/sec  1105             sender
[  5]   0.00-9.99   sec  4.68 GBytes  4.02 Gbits/sec                  receiver

iperf Done.

ubuntu@ubuntu2004:~$ iperf3 -c 192.168.1.1 -R
Connecting to host 192.168.1.1, port 5201
Reverse mode, remote host 192.168.1.1 is sending
[  5] local 192.168.1.100 port 55186 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   510 MBytes  4.28 Gbits/sec              
[  5]   1.00-2.00   sec   548 MBytes  4.60 Gbits/sec              
[  5]   2.00-3.00   sec   551 MBytes  4.62 Gbits/sec              
[  5]   3.00-4.00   sec   552 MBytes  4.63 Gbits/sec              
[  5]   4.00-5.00   sec   558 MBytes  4.68 Gbits/sec              
[  5]   5.00-6.00   sec   570 MBytes  4.78 Gbits/sec              
[  5]   6.00-7.00   sec   566 MBytes  4.74 Gbits/sec              
[  5]   7.00-8.00   sec   572 MBytes  4.80 Gbits/sec              
[  5]   8.00-9.00   sec   578 MBytes  4.85 Gbits/sec              
[  5]   9.00-10.00  sec   552 MBytes  4.63 Gbits/sec              
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  5.43 GBytes  4.67 Gbits/sec  130             sender
[  5]   0.00-10.00  sec  5.43 GBytes  4.66 Gbits/sec                  receiver

iperf Done.

ubuntu@ubuntu2004:~$ speedtest

   Speedtest by Ookla

     Server: Singtel - Singapore (id = 25960)
        ISP: Singtel Fiber
    Latency:     3.07 ms   (0.22 ms jitter)
   Download:   327.99 Mbps (data used: 441.9 MB )                            
     Upload:   280.90 Mbps (data used: 309.2 MB )                            
Packet Loss:     0.0%
 Result URL: https://www.speedtest.net/result/c/d2c10ed7-506e-4225-a6d8-a55355be8c74
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
If you have a low power x64 mini PC (eg: Intel J4105 or similar with 8GB/128GB configuration) with 2 or 4 (or more) Intel chipset based network cards, you can use free Type 1 hypervisors (eg: VMware ESXi, Proxmox, etc), and then install OpenWRT VMs (1GB/4GB will be more than enough) along with Linux VMs. Actually pfSense is also possible (eg: 2GB/8GB).

For ESXi, you can use the same guide as VMware Workstation.
https://openwrt.org/docs/guide-user/virtualization/vmware
More info about using virtualized OpenWRT.
https://openwrt.org/docs/guide-user/virtualization/start
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
For those who want a very small yet very capable OpenWRT router: NanoPi R4S may be a good choice as it has a very power CPU (RK3399) which seems to be faster than Raspberry Pi CPU.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
If you have a low power x64 mini PC (eg: Intel J4105 or similar with 8GB/128GB configuration) with 2 or 4 (or more) Intel chipset based network cards, you can use free Type 1 hypervisors (eg: VMware ESXi, Proxmox, etc), and then install OpenWRT VMs (1GB/4GB will be more than enough) along with Linux VMs. Actually pfSense is also possible (eg: 2GB/8GB).

For ESXi, you can use the same guide as VMware Workstation.
https://openwrt.org/docs/guide-user/virtualization/vmware
More info about using virtualized OpenWRT.
https://openwrt.org/docs/guide-user/virtualization/start

Openwrt guide under PVE.
https://www.jwtechtips.top/how-to-install-openwrt-in-proxmox/
My Setup:
1) Intel N4500 based mini PC with single internal gigabit Ethernet and Ugreen USB 3 gigabit adapter as PVE 7.1 host, 192.168.8.216

2) Virtual OpenWRT router with WAN -- linux bridge to the PVE host gigabit Ethernet adatper (vmbr1)
LAN -- linux bridge to the PVE host USB 3 gigabit Ethernet adatper (vmbr2)

3) Intel J4105 mini PC running Ubuntu 21.10, as LAN client to the OpenWRT virtual router -- 192.168.8.201 (dhcp)

Here is what I get from the Intel J4105 mini PC. The performance is basically the same as when connecting to a physical router.

Code:
mcuee@ubuntu64:~$ speedtest

   Speedtest by Ookla

     Server: Singtel - Singapore (id = 25960)
        ISP: Singtel Fiber
    Latency:     1.57 ms   (0.30 ms jitter)
   Download:   913.25 Mbps (data used: 469.4 MB)
     Upload:   945.38 Mbps (data used: 1.1 GB)
Packet Loss:     0.0%
 Result URL: https://www.speedtest.net/result/c/d8da704e-4d14-4a3f-9f17-1e715159f9d2
 
 mcuee@ubuntu64:~$ iperf3 -c 192.168.8.216
Connecting to host 192.168.8.216, port 5201
[  5] local 192.168.8.201 port 46300 connected to 192.168.8.216 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   954 Mbits/sec    1    345 KBytes
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec    0    369 KBytes
[  5]   2.00-3.00   sec   113 MBytes   944 Mbits/sec    0    376 KBytes
[  5]   3.00-4.00   sec   111 MBytes   936 Mbits/sec    0    380 KBytes
[  5]   4.00-5.00   sec   113 MBytes   944 Mbits/sec    0    387 KBytes
[  5]   5.00-6.00   sec   112 MBytes   943 Mbits/sec    0    387 KBytes
[  5]   6.00-7.00   sec   112 MBytes   941 Mbits/sec    0    387 KBytes
[  5]   7.00-8.00   sec   112 MBytes   941 Mbits/sec    0    387 KBytes
[  5]   8.00-9.00   sec   112 MBytes   936 Mbits/sec    0    396 KBytes
[  5]   9.00-10.00  sec   113 MBytes   943 Mbits/sec   17    355 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec   18             sender
[  5]   0.00-10.00  sec  1.09 GBytes   940 Mbits/sec                  receiver

iperf Done.
mcuee@ubuntu64:~$ iperf3 -c 192.168.8.216 -R
Connecting to host 192.168.8.216, port 5201
Reverse mode, remote host 192.168.8.216 is sending
[  5] local 192.168.8.201 port 46304 connected to 192.168.8.216 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   112 MBytes   942 Mbits/sec
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec
[  5]   2.00-3.00   sec   112 MBytes   942 Mbits/sec
[  5]   3.00-4.00   sec   112 MBytes   941 Mbits/sec
[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec
[  5]   5.00-6.00   sec   112 MBytes   942 Mbits/sec
[  5]   6.00-7.00   sec   112 MBytes   942 Mbits/sec
[  5]   7.00-8.00   sec   112 MBytes   942 Mbits/sec
[  5]   8.00-9.00   sec   112 MBytes   942 Mbits/sec
[  5]   9.00-10.00  sec   112 MBytes   939 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec                  receiver

iperf Done.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
SImilar setup but with ESXi 6.7 (with added RealTek RTL8168 and RTL8156 driver)

1) Intel N4500 (dual core cpu) based mini PC with single internal gigabit Ethernet and USB 3 gigabit adapter as ESXi 6.7 host, 192.168.50.216 (behinad my Asus RT-AX82U router)

2) Virtual OpenWRT router
WAN -- vswitch to the host gigabit Ethernet adatper
LAN -- vswitch to the host USB 3 gigabit Ethernet adatper (ASIX AX88179 based)

3) LAN client: Acer Swift 3 laptop with USB 3 gigabit Ethernet adapter (ASIX AX88179 based)

openwrt itself has very fast speedtest result, same as the line speed with physical machine.
f5cd11f3-0fb5-425e-b592-e24cd95c95f8.png


LAN client download is also similar to line speed, upload is a bit slow but still pretty decent.

2bbf7d7d-e40f-4dbe-8777-72af6068a4a3.png
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
Openwrt guide under PVE.
https://www.jwtechtips.top/how-to-install-openwrt-in-proxmox/
My Setup:
1) Intel N4500 based mini PC with single internal gigabit Ethernet and Ugreen USB 3 gigabit adapter as PVE 7.1 host, 192.168.8.216

2) Virtual OpenWRT router with WAN -- linux bridge to the PVE host gigabit Ethernet adatper (vmbr1)
LAN -- linux bridge to the PVE host USB 3 gigabit Ethernet adatper (vmbr2)

3) Intel J4105 mini PC running Ubuntu 21.10, as LAN client to the OpenWRT virtual router -- 192.168.8.201 (dhcp)

Here is what I get from the Intel J4105 mini PC. The performance is basically the same as when connecting to a physical router.

Wireguard performance is quite a bit better than using Raspberry Pi 400.
f2b2d553-ccb9-46eb-971d-75616806ae5c.png
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,722
Reaction score
12,013
SImple Dumb Access Point:
https://openwrt.org/docs/guide-user/network/wifi/dumbap
Using the GUI and then here are the results.
Code:
root@OpenWrt:/etc/config# cat 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 'fd82:7353:48a2::/48'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.48.2'
        option gateway '192.168.48.1'

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

root@OpenWrt:/etc/config# cat 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'
        option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ignore '1'
        list ra_flags 'none'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top