樹莓派軟路由 OpenWrt 簡介

樹莓派軟路由 OpenWrt 簡介

用樹莓派 DIY 軟路由的時候,總會說到 OpenWrt 這個開源 Linux 發行版。那 OpenWrt 到底是什麼,為什麼會用於樹莓派軟路由?這篇文章將會解答關於 OpenWrt 的一系列問題。

OpenWrt 是什麼

OpenWrt 是一個面向嵌入式設備的 Linux 操作系統,常用於小型無線路由器。

The OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

Cisco/Linksys(思科) 在 2003 年發佈了 WRT54G 這款無線路由器,同年有人發現它的操作系統是基於Linux的,然而 Linux 是基於GPL許可證發佈的,按照該許可證 Cisco 應該把 WRT54G 的源代碼公開。2003年3月,Cisco 迫於公眾壓力公開了 WRT54G 的源代碼。此後就有了一些基於 Cisco 源碼的第三方路由器固件,OpenWrt 就是其中的一個。

2004年1月,OpenWrt 項目啟動。第一版的 OpenWrt 基於 Linksys GPL sources for WRT54G 開發,也是現在廣泛使用的版本。

2005年,OpenWrt 發佈實驗性版本,開始使用官方 GNU/Linux 的內核。

2007年,發佈 White Russian(已不再維護)

2010年,發佈 Backfire(已不再維護)。基於 Linux 2.6.32 long term support kernel, uClibc 0.9.30。

2013年,發佈 Attitude Adjustment。基於 Linux Kernel 3.3, uClibc 0.9.33.2,支持 bcm2708 (Raspberry Pi)

平臺。

OpenWrt 在樹莓派上的應用

OpenWrt 天生服務於嵌入式無線路由器,而且 2013 年發佈的 Attitude Adjustment 版本還官方支持了樹莓派平臺,所以用 OpenWrt 打造樹莓派軟路由變成一件很酷又相對簡單的事情。

在官方的支持列表中,找到樹莓派,下載相應的系統鏡像,就可以開始軟路由 DIY 之旅了。

樹莓派軟路由 OpenWrt 簡介

或者直達 OpenWrt 的 raspberry pi 專題頁面:https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi

軟路由性能

在樹莓派 3B 以及以前的硬件版本中,OpenWrt 軟路由性能並不是特別理想:

  • USB 和 LAN 口共享帶寬,造成網絡傳輸瓶頸(USB 用於無線網卡,LAN 用於以太網)
  • CPU 計算性能不高

但2019年發佈的樹莓派 4B 已經不存在上述問題了:板載千兆以太網卡、2.4/5 GHz 802.11b/g/n/ac 無線網卡,USB 和 LAN 口各自獨立,CPU 提速 4 倍,還能選配 4G RAM。

CPU 性能對比:

樹莓派軟路由 OpenWrt 簡介

以太網卡速率對比:

樹莓派軟路由 OpenWrt 簡介

無線網卡速率對比:

樹莓派軟路由 OpenWrt 簡介

RAM 速率對比:

樹莓派軟路由 OpenWrt 簡介

  • OpenWrt Version History
  • About the OpenWrt/LEDE project
  • 經典回顧 54M無線霸主Linksys WRT54G評測
  • Raspberry Pi 4 released - Hardware Questions and Recommendations - OpenWrt Forum Raspberry Pi 4 specs and benchmarks — The MagPi magazine


分享到:


相關文章: