Raspi as a router...

Dec 07, 2021 Last reply: vor 4 Jahren 13 Replies

...creating a WLAN, connected to a LAN-Cable.



But what software can be used?



Thank you



FW


Raspberry Pi OS Lite :

formatting link
: Works for me. A simple sample firewall script can be got from : Easy Firewall Generator for IPTables :
formatting link
it's for Slackware but it does work with Raspbian.

OpenWRT supports it:

formatting link
You get the usual kind of web GUI for configuring router things, although with more flexibility than most.

Theo

F. W. kirjoitti 7.12.2021 klo 15.05:

Here's a few examples on how to use a Raspberry as a router.. (watch word-wrap)

formatting link
formatting link
formatting link

I use a CM4 plugged into one of these:

formatting link
OpenWRT runs on it (and on other Raspberry Pis). You could use Raspbian or some other general-purpose distro, but OpenWRT is designed specifically for use in routers.

Interesting.

What sort of throughput can you get on this? Can you get near gigabit line rate?

Am Tue, 7 Dec 2021 14:05:01 +0100 schrieb "F. W." snipped-for-privacy@home.com:

Do you really want routing here? Be aware that you need to configure your other router too to make routed nets work. If you just like to use it as a WiFi access point, you can just create a L2 bridge and attach eth0 and wlo0 (names may vary) to it. That should be supported by most Linux distributions, including Ubuntu.

Standard Linux bridging (brctl & iproute2 counterpart) should work just fine.

1) Create a bridge interface. 2) Bring said bridge interface up. 3) Add the LAN interface to said bridge interface. 4) Bring said LAN interface up. 5) Add the WLAN interface to said bridge interface. 6) Bring said WLAN interface up.

Configure the /single/ IP address on the bridge interface.

Are you messing with HostAPd to manage the WLAN interface? Or are you using simpler init scripts?

Sorry, I answered as if you were wanting an Access Point, not a router.

Routers are actually easier to create.

Am Tue, 7 Dec 2021 13:26:07 -0700 schrieb Grant Taylor snipped-for-privacy@tnetconsulting.net:

Only of you do NAT routing. If not, it is not easier, because you either need a global network for IPv4 and IPv6 or you need to use NAT and private networks. Using private nets is not a good solution. Bridge is better, because you don't need to care about this if you already have a network with IPv4-DHCP and global IPv6 connectivity with a router and its router advertisements.

I don't know as my cable-modem service isn't anywhere near that fast, but the second NIC added by the card is connected via PCIe, not USB. (The first NIC is the one provided directly by the SoC, which would be the same as on a Raspberry Pi 4.)

FWIW, the user interface in OpenWRT is far more responsive than what I was previously using on an Asus RT-AC56U. I'd suspect that network traffic is handled more promptly as well.

Iperf is available as an OpenWRT package, in case you want to test.

yeah, and use your lan as wan, if that wasn't already obvious.

Hadn't heard of that...tried it on the LAN port and got about 940 Mbps. Testing traffic through both ports would probably require setting up a test network, which would mean knocking my home network offline for a bit.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required