Support Me
Get a 5% off Ekster Products
shop.ekster.com/devodyssey or discount code "DEV" at checkout!
(PAID Link)
Follow me on Twitter and Facebook
/ dev_odyssey
/ dev0dyssey
Welcome back to Dev Odyssey Home Networking! In this episode, I show you how to take a Raspberry Pi, and make it a great custom home router, better than what you can buy. A Raspberry Pi 4 comes with plenty of improvements over a stock router, like a better ARM CPU, more RAM, increased storage and two 2.0 and 3.0 USB ports. There are drawbacks with using a Raspberry Pi as a router, as it only has 1 Gb ethernet port, and smaller WiFi chip / no WiFi antennas, reducing potential WiFi coverage. However, these drawbacks are overcome with a network switch and access points. Another way to overcome them is by using different single board computers (SBCs), such as a Raspberry Pi CM4, Banana Pi BPI-R2, ClearFog Pro, Seeed Odyssey, and many other SBCs. With OpenWrt, the possibilities are endless!
Links
OpenWrt Image for Raspberry Pi 4B
downloads.openwrt.org/release...
firmware-selector.openwrt.org/
Balena Etcher
www.balena.io/etcher/
Ubuntu 20.04 Image
ubuntu.com/download/desktop
Raspberry Pi 4B Kit
www.amazon.com//dp/B07V5JTMV9
Pluggable USB GB Ethernet Adapter
www.amazon.com/dp/B00AQM8586
Ethernet Cable
www.amazon.com/dp/B001W28L2Y
Managed Network Switch (UniFi Switch 8)
store.ui.com/collections/unif...
Access Point (WiFi Lite 6)
store.ui.com/products/unifi-a...
Raspberry Pi CM 4
www.raspberrypi.com/products/...
Banana Pi BPI-R2
www.banana-pi.org/bananapi-ro...
ClearFog Pro
shop.solid-run.com/product/SR...
Seeed Odyssey
www.seeedstudio.com/ODYSSEY-X...
Steps
- Flashing OpenWrt microSD
Use Balena Etcher, or other software like Raspberry Pi Imager, or dd
www.raspberrypi.com/software/
- Partition Disk
openwrt.org/docs/guide-user/i...
* First use lsblk to see disks and where they are mounted
* Then unmount rootfs! Otherwise changes won’t work (use sudo umount /media/username/rootfs)
* Then use fdisk to delete second partition, and recreate it using the rest of the available space
* sudo fdisk /dev/sdb
* p
* d
* 2
* n
* p
* 2
* Use sector from previous 2nd partition before deletion
* (Press Enter to assume using the last sector as end point for partition)
* n
* w
* Then run command sudo e2fsck -f /dev/sdb2
* Press ‘y’ to fix padding
* Then run command sudo resize2fs /dev/sdb2
* Then unmount first partition, unplug from computer, and plug sd card into raspberry pi
* sudo umount /dev/sdb1
- USB Ethernet Driver install
* Login with ssh root@192 . 168 . 1 . 1 (or connect monitor and keyboard to pi)
* Turn off DHCP in /etc/config/dhcp (add line under “config dhcp ‘lan’”, option ignore ‘1’. Delete option limit and option start lines (or comment out)
* Edit /etc/config/network, change “option ipaddr” to static IP of choosing (important so we know what IP to connect to), add lines “option dns” and “option gateway” with respective IPs to connect it to the network. Use public DNS server. Reboot
* Connect Ethernet cable to existing network / router
* Login to router via ssh (or use peripherals)
* Run opkg update
* Login to LuCI
* Next go to System, Software, and type in kmod-usb-net-asix-ax88179 and install that package
* Plug in the USB Ethernet adapter to a USB 3.0 port on Raspberry Pi
* Then, go to Network, Interfaces, Add New Interface. Name it WAN, Choose DHCP Client, and Choose eth1 device, Create Interface
* In Firewall tab, change zone to “WAN” zone, Save, Save and Apply
* Plug in ethernet cable to USB Ethernet adapter, plug ethernet cable into modem or home network to test.
- Network Configuration
* Next, we'll edit the LAN Interface and revert it back to your initial settings. Or, you can create your own network of choosing. Refer to changes made above to revert them back
- WiFi Configuration
* Edit /etc/config/wireless
gist.github.com/odevodyssey/b...
* Reboot router
* Test network connection (speedtest.net)
00:00 Intro
02:54 Flash OpenWrt to microSD
03:58 Partition OpenWrt Image
10:45 Install USB Ethernet Driver
11:52 Network Configuration
14:11 WiFi Configuration
16:05 Speed Test
17:21 Outro
Attributions
Music | "Ocean" by LiQWYD
Watch: • LiQWYD - Ocean [Official]
License: www.liqwydmusic.com/how-to-use
Download/Stream: hypeddit.com/link/j8xoyk
Icon made by Freepik, Eucalyp from Flaticon
www.flaticon.com
Ubuntu is a trademark of Canonical
Raspberry Pi trademark of Raspberry Pi Trading
#RaspberryPi #Router #HomeNetwork #OpenWrt
23 июл 2024