Using the ARM architecture as a soft router, the first consideration is the price. When the Raspberry Pi is used as an ARM soft router, it is very small but powerful and silent, which is a perfect match. Here I choose the Raspberry Pi 3B+ with a Gigabit Ethernet port. Its main advantages are:
- Performance exceeds most ARM soft routers
- Small and quiet, power consumption as low as 3W, standby temperature increase of 16 degrees is the best in the same size!
- The purchase price of the mining disaster is only 200 yuan, the best cost-effective
- The ARM soft router with the best network card compatibility
Of course, it should be noted that the Raspberry Pi 3B+ Gigabit network is extended through 480M USB2.0, so it is better to use 4B if possible.
In order to solve the problem that hard routing does not support custom domain name ddns resolution; ssh remote wake-up and other functions, here the soft routing is used as a gateway server.
1. Configure Raspberry Pi
1. Get the Raspberry Pi OpenWrt image
Choose the appropriate mirror . It is recommended to choose the Lean version of the firmware version, which is stable in operation and has many plug-ins; the recommended squashfs-sysupgrade
version of the file format.
Raspberry Pi 3B+ recommends using the openwrt-bcm27xx-bcm2710-rpi-3-squashfs-factory image
Image download: openwrt-bcm27xx-bcm2710-rpi-3-squashfs-sysupgrade.img
2. Write the image
Insert the SD card into the card reader and connect it to the computer, run SDFormatter.exe to format the SD card, open Win32DiskImager.exe to burn the image, click "Write", and then insert the SD card into the Raspberry Pi.
3. Fix the ip and close the dhcp service after booting
Strictly follow the: Bypass Router Setup Guide and that's it!
uci set network.lan.ipaddr=192.168.1.8
uci commit network
/etc/init.d/network restart
2. Networking scheme
For detailed networking solutions, please refer to my blog post: Home networking: Vlan single-line multiplexing, fault detection and five "soft routing" plus mesh networking solutions
Raspberry Pi as a bypass router, connected to the main router lan port or switch A Any port in vlan9 can be used.
3. Bypass router configuration method
Initial firmware account root, password password
Modify the lan port information, check whether the ip is fixed, and set the gateway as the main routing address.
Protocol: Static address
IPV4 Address: 192.168.1.8 (This item remains unchanged)
Subnet mask: 255.255.255.0
Gateway: Fill in as the upper-level routing IP, which is usually the access address of the upper-level routing control panel. Taking the above as an example, change it to: 192.168.1.1
Broadcast: Change the last segment of the upper-level routing IP to 255. Take the above as an example and change it to 192.168.1.255
DNS address: Same as the upper-level routing IP. Take the above as an example: change to 192.168.1.1
Tick: Ignore this Interface/Do not provide DHCP service on this interface (at the bottom of the page)
Check again whether the DHCP service is turned off.
The following steps can be omitted
Close the bridge interface and make sure the only network port is the lan port.
At this time, return to the main route and you can see that the Raspberry Pi has been connected to the LAN.
Be sure to fix the ip address of the Raspberry Pi on the main router!
Be sure to fix the ip address of the Raspberry Pi on the main router!
Be sure to fix the ip address of the Raspberry Pi on the main router!
After that, modify the default gateway of the Internet access device to the address of the Raspberry Pi.
It should be noted that in order not to damage the computer’s wolan wake-up function and remote VNC access function, it is best to disconnect the wireless network and use a wired connection (because the two access gateways conflict at the same time, and the wired network is a necessary condition for wolan wake-up) , and set the ip address to the original fixed ip address in the router. Remember not to forget to fill in the DNS server 114.114.114.114
or directly fill in the bypass route address .
4. Common applications
- Remote wakeup
OpenWrt can install wol or etherwake to realize the network wake-up function (provided that your host needs to support network wake-up)
opkg update
opkg install wol
opkg install etherwake
#唤醒方法
etherwake -b F0:76:1C:E1:EA:D8
- PassWall load balancing
- Set up ddns on the bypass router to solve the problem of few ddns service providers on the main router.
Click here to view the graphic tutorial , and also watch the video
http://ip.3322.net/
Ali CEN speed test:
So far, this article has come to an end. I hope this article can play a role in attracting jade, and welcome everyone's criticism and exchange.
If you have any questions or good suggestions, look forward to your message, comments and attention!