[How-to guide] Installing OpenWrt on Qnap QHora-322

Hello there

I have finally found some time (and spent way too much money :stuck_out_tongue_winking_eye:) to upgrade the rest of my networking equipment to 10G and configure the Qnap QHora-322 as my new main router. I am extremely happy with it.

Here some tips, that I think might be useful for (future) owners of the device.

1. Interface names

The physical ethernet interfaces of the device do not show up in chronological order in OpenWrt. (You might recognize a pattern though.)

  • eth0 = 10G port 1
  • eth1 = 2.5G port 2
  • eth2 = 2.5G port 1
  • eth3 = 10G port 2
  • eth4 = 2.5G port 4
  • eth5 = 2.5G port 3
  • eth6 = 10G port 3
  • eth7 = 2.5G port 6
  • eth8 = 2.5G port 5

2. Enable jumbo frames

In order to utilize the full bandwidth of 10 Gbit/s, you should think about enabling jumbo-frames. At least for the 10G interfaces.

According to my tests, with the default MTU size of 1500 the maximum routable bandwidth is between 5 and 6 Gbit/s and is being limited by the performance of a single core. (One core was always at 100 % during file transfer.)

But with an MTU size of 9000 the device is able to route traffic at 10 Gbit/s whilst the CPU usage of one core is only around 50 %.

To enable jumbo frames on the 10G ports, add these options to your /etc/config/network:

config globals 'globals'
        option packet_steering '1'

config device
        option name 'eth0'
        option mtu '9000'
        option mtu6 '9000'

config device
        option name 'eth3'
        option mtu '9000'
        option mtu6 '9000'

config device
        option name 'eth6'
        option mtu '9000'
        option mtu6 '9000'

You need to ensure though, that all devices, that are on the same data-link-layer as this interface, are able to handle jumbo-frames. Otherwise, you will run into all kinds of funny issues.

3. Partition layout (if someone is interested)

Device            Start      End  Sectors  Size  Name
/dev/mmcblk0p1       34   131105   131072   64M  kernel_1
/dev/mmcblk0p2   131106   262177   131072   64M  kernel_2
/dev/mmcblk0p3   262178  1310753  1048576  512M  rootfs_1
/dev/mmcblk0p4  1310754  2359329  1048576  512M  rootfs_2
/dev/mmcblk0p5  2359330  3407905  1048576  512M  sys_log
/dev/mmcblk0p6  3407906  3538977   131072   64M  reserved
/dev/mmcblk0p7  3538978  7372833  3833856  1.8G  rootfs_data

And that's it for now. :smiley:

If you have any questions, please let me know.

Have a nice day! :slight_smile: