iKuai Router + PVE Installation of LEDE (KoolShare) as a Sub-router

Publish: 2021-08-14 | Modify: 2021-08-14

A few months ago, I tinkered with iKuai, referring to the article "iKuai OS Tinkering Notes for Software Router Systems" on the xiaoz's blog. Although iKuai is stable and easy to use, I always feel like something is missing. So I came up with the combination of iKuai + LEDE, which should be a more complete solution for most software router tinkering, with iKuai's stability, single-line multicast, flow control, and LEDE's scientific internet access and various third-party plugins. Recently, I also installed LEDE and would like to share the installation process and the challenges I encountered along the way for reference by those who need it.

iKuai and LEDE

What is LEDE?

LEDE is a router system developed by koolshare based on OpenWRT. It supports both hardware routers and X86 (software routers) devices. LEDE comes with an application store and supports a wide range of third-party plugins, making it more suitable for Chinese users.

Before we start

Since everyone's hardware devices and network conditions are different, the following content is for reference only. You need to make deployment changes according to your actual situation. Here is the hardware situation and network topology used by xiaoz:

  • iKuai software router installed on Zhanmei host
  • LEDE installed in a PVE virtual machine on T-bao host (You can also directly install it in the iKuai virtual machine)
  • Redmi RM2100 used as an AP

The network topology is as follows:

Network Topology

Installing LEDE on PVE

Xiaoz uses PVE virtual machine. LEDE only provides the .vmdk file, which cannot be directly installed on PVE and needs to be converted.

First, download the firmware from LEDE_X64_fw867. Choose the file with the .vmdk extension, and it is recommended to choose the one with EFI for new devices.

Place the downloaded .vmdk file in any directory on PVE, and then execute the following command to convert it to the qcow2 format:

# Convert vmdk to qcow2
qemu-img convert -f vmdk -O qcow2 source-name.vmdk target-name.qcow2

Create a blank Linux system in PVE and record the disk number. In Xiaoz's case, it is 107.

Create Linux System

Then import the .qcow2 virtual machine image into PVE using the following command:

# Import virtual machine image into PVE, replace id with the disk number 107 above
qm importdisk id /home/qcow2/openmanage_enterprise.qcow2 local-lvm

At this point, an unused disk will appear in PVE. Enable it in the "Hardware" options, as shown in the following image:

Enable Disk

In the PVE options - Boot Order, adjust the newly added disk (scsi1) to the first order.

Adjust Boot Order

Then start the virtual machine, modify the IP address in the network configuration file /etc/config/network to the same IP range as the iKuai network, and enter reboot to restart LEDE.

After the restart, you can open LEDE with the IP address you just set. The default password is koolshare.

LEDE Login

Setting up LEDE (as a side router)

Here, we will use LEDE as a side router and need to make some settings. Open Network - Interfaces - find LAN and edit it.

LEDE LAN Interface

In the General Settings, set the IPv4 Gateway to the IP address of iKuai, and disable "IPv6 assignment length".

LEDE General Settings

Select "Ignore interface" for the DHCP service to turn it off.

Disable DHCP

Disable IPV6 route announcement, DHCPV6, and NDP proxy. It is said that if they are not disabled, some strange problems may occur. Xiaoz has not verified this in practice.

Disable IPV6

At this point, our side router (LEDE) is set up.

Enabling Scientific Internet Access

LEDE has removed the scientific internet access plugin, so it cannot be found in the software center. Here, xiaoz provides a GitHub project address for everyone to explore: https://github.com/hq450/fancyss_history_package/tree/master/fancyss_X64

Setting up the Main Router iKuai

Open iKuai - Network Settings - DHCP Settings - DHCP Server - set the gateway and DNS to the IP address of LEDE. At this point, iKuai is also set up.

iKuai DHCP Settings

Note: The DNS must also be set to the IP address of LEDE, otherwise scientific internet access will not work.

Testing

Verify on any device in the LAN (set to obtain IP address via DHCP). Disconnect and reconnect the network once to allow the main router (iKuai) to assign network configurations via DHCP. Use the tracert command to trace the route, and you can see that it goes through the side router first, then the main router, and finally the backbone network.

Tracing Route

Conclusion

  • The .vmdk virtual machine file needs to be converted to .qcow2 and imported into PVE before installation.
  • Side router (LEDE): Set the gateway to the main router's IP, disable DHCP, and disable IPV6.
  • Main router (iKuai): Set the gateway to the side router's IP, and set DNS to the side router's IP.

This article references: Perhaps the Fastest Software Router and Virtual Machine Installation Tutorial on the Entire Internet (iKuai/LEDE/openWRT)


Comments