I have an unused Raspberry Pi 4 (2GB model) lying around and I would like to install OpenWRT on it and use it as a router. I get Internet from DSL so I can’t hook it up on the Raspberry Pi directly, I need to plug an Ethernet cable coming from my actual router to the Pi.
I am no expert on networking, so please forgive me if I say something that is wrong. I want the WAN coming in from the router from the Pi’s Ethernet port, and the LAN coming out as Wi-Fi. I may also stick an additional Ethernet adapter to it in the future. I have tried doing this many times and have failed. So, could anyone explain to me how could I do this?
Also, what are VLANs, what are their uses and if I wanted one, how could I setup it in OpenWRT?
Thanks in advance.
How did you fail?
VLANs (Virtual LANs) are for isolating devices from each other (while still being plugged to the “LAN” ports of the same router).
To add a bit: With VLANs you can have several ‘virtual’ cables inside of a real (physical) cable. You probably don’t need it in a home setup, I’m not sure. It’s for use cases like you just have one ethernet port or one cable running through the wall, but you need two (or more) entirely separate networks on the other side. Like the telephone network or the seperate server network along with the normal network, all over one cable. It works by tagging all the network packets. In the end it’s just a number that gets attached to the packets and the other side knows how to handle the packets with those additional numbers attached to them. And it can send them out through different ports again.
At home, most people just have one network, so that kind of functionality isn’t needed. Some people put their TV set, NAS or the smart home devices or their home office and/or guests in different networks so the devices can’t mess with each other. A VLAN might be handy for those kind of things. And OpenWRT has VLANs, too, since there are two separate networks attached (as with every router). In this case the WAN side, going to your ISP, and your LAN. If you have a router with like 5 ports on the back, you can map those to either port if you change the VLAN settings. The labeling (WAN/LAN) from the manufacturer is just the default with OpenWRT.
While trying to set up the WLAN, I couldn’t connect to the AP, it said no internet access, and I couldn’t connect to the Pi, or ping any device from it.
Can’t you find something like a guide or walktrough? I can’t believe you’re the first person using a RasPi as an access point…
I mean I would love to help. But it’s a bit difficult without seeing the situation. And “I can’t connect to anything” isn’t exactly detailed enough to lead me to any conclusions. There are a lot of moving parts in a router, the wifi itself, DHCP, routing, firewall, …