How to Create a VLAN - Updated Guide // OpenWrt Router (21.02 +), DSA, Managed Switch, RPi 4

  Рет қаралды 23,130

Dev Odyssey

Dev Odyssey

Күн бұрын

Пікірлер: 41
@DevOdyssey
@DevOdyssey 2 жыл бұрын
Would you set up a managed switch in OpenWrt, or would you buy one?
@viandaelendherlina5923
@viandaelendherlina5923 2 жыл бұрын
Use openwrt
@ipstacks11
@ipstacks11 Жыл бұрын
Hi Orest. You did a great job Sir. After watching a couple of your videos, I think I have a much better understanding of how to configure trunks and interfaces. I am wanting to setup VLANs per SSID and you really covered that well. I don't know how much teaching you've done but you are good at it. I like how you put everything together and showed what you are doing with the hardware and in the software. You even covered the Switch "screen" which I was hoping to learn more about. Honestly I can't think of anything you didn't cover to get a well configured setup, you even explained the ingress setting for the (PVID) for VLAN interfaces! I have a Banana Pi R3 on the way and I am hoping openwrt will support it beyond snapshots soon. Thank you for the excellent video. If you are looking for ideas I would be super interested in video covering mesh and fast roaming with VLAN/SSID pairing. Thank you again!
@DevOdyssey
@DevOdyssey Жыл бұрын
Hi Jeff, Thanks for watching! I’m flattered with how much detail you went into from my videos, let alone all the videos of you watched. I’m glad my videos could help you get a better understanding of how to achieve the router setup you want. I haven’t ever taught in a formal capacity, other than teaching colleagues at work. I just like to go into detail as I assume whatever is on screen, and if I haven’t covered it in a prior video, that I should talk about it, at least at a high level, if it’s not too important for the setup I’m doing per video. Showing the hardware bridges the gap between understanding both parts of the setup, so I find that important to show. As for the switch setup, I’m happy you found value in that. You may not need it depending on what the Banana Pi R3 supports in terms of VLANs (DSA or not). So I’d try DSA first and then switch config if that doesn’t work. PVID I covered as I didn’t understand at first what it was for. So I researched it a bit so I could understand and explain it, albeit not being an option used very often. We can only hope the devs will support the Banana Pi R3 beyond snapshots, but if not, you can always create your own custom image, as I’m sure you watched my building OpenWrt video. There’s even an easier way to do builds that I did cover, using the firmware selector (website), so if you don’t need custom configs, I’d try that first. You’re welcome! Thanks for being such a big fan, I really enjoy hearing what my viewers learn from my videos. As for future video ideas, I have too many and too little time. It’s funny you say that as that’s a video idea I explored awhile ago, but havent gotten around to it. I would use batman-adv package to achieve it, part of the Open Mesh Project. That should cover your use cases too with fast roaming. Depending on your hardware, you’d want to use devices with good wireless radios (usb wireless radios or ones built into an SBC, with good antennas too). A basic Raspberry Pi wouldn’t do well, given its antennas, as it’s meant more for acting as a wireless client, rather than an access point. My idea was to use Raspberry Pis with wireless usb devices that use atheros chips, as those have the most OpenWrt support. Nonetheless, thanks again, and check out the link below for some mesh information with OpenWrt. www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config
@HeinserTorres
@HeinserTorres Жыл бұрын
Great video keep it up!
@DevOdyssey
@DevOdyssey Жыл бұрын
Thank you Heinser!
@mihalcimihalci4768
@mihalcimihalci4768 Жыл бұрын
HELLO, tank you for tech ass, do you familiar whit Fritz Box? Special 7530.
@DevOdyssey
@DevOdyssey Жыл бұрын
Thanks for watching Mihalci! I am not familiar with Fritz Box, other than the name, and knowing they make routers. If you want to run OpenWrt on this router, I'd refer you to the table of hardware on OpenWrt's forum. I searched it for you and was able to find the FritzBox 7530. openwrt.org/toh/hwdata/avm/avm_fritz_box_7530 This should provide you the information you need to install OpenWrt onto your router.
@looper6120
@looper6120 Жыл бұрын
Very interesting topic! Thanks for the effort. I have a nanopi r4s, it has two ports, I assume I can make this happen on it. However, I'm wondering about the router, does the router have to support vlan? For example, I have a consumer router that doesn't support Vlan by itself, I'm trying to build or buy a managed switch, and connect it to one of the LAN port, then add one more AP to my managed switch to have an isolated VLAN just for that AP? Is this doable? Or the router itself have to support vlan first? I'm not so sure if I can just buy a managed switch and use it combined with my consumer router, can completely do the Vlan config on my managed switch, then throw in a couple of dumb APs just for the Wifi, thanks again!
@DevOdyssey
@DevOdyssey Жыл бұрын
Thanks for watching LOOPER and you're welcome! With the NanoPi R4S, I think you should no problems there on the VLAN side of things, using DSA and OpenWrt. Yes the router does have to support VLANs both from a hardware perspective and software. Chances are, from a hardware side of things, you should be fine. You're scenario should work, on the condition that VLANs are supported via software. You can flash a consumer grade router with OpenWrt and get VLAN capabilities, so long as its supported by OpenWrt. But it needs to support VLAN functionality so you can tag it. On the AP side, if you just want one network associated with that isolated AP, you can connect it to an untagged port and you should be good to go, it wouldnt need to support VLANs. However, if you want to broadcast multiple WiFi networks with different networks via multiple VLANs, then your AP will also need to support VLANs. You can buy a managed switch as that will support VLANs, but the router is what would create the VLANs so that needs to support it. You can use your NanoPi R4S for this. Then you can manage the VLANs via the managed switch to tag / untag the VLANs on the managed switch ports. Then you can add Dumb APs as you see fit (only on untagged VLAN ports since they are dumb APs) to broadcast your one WiFi network.
@ayaceoo7
@ayaceoo7 Ай бұрын
Hi , my isp modem is in bridge mode and i have a mercusys router which is in ppoe mode( vlan is available)..I have another openwrt router and i want to setup a vpn on it and using vlan forward it to my mercusys router.Is this possible? If yes how to do it? Also i dont want a connection between my isp modem and openwrt router
@DevOdyssey
@DevOdyssey Ай бұрын
Thanks for watching @ayaceoo7! Given your setup, I have to ask, is there a reason why you dont want a connection between your ISP modem and OpenWrt router? More of a curiosity than anything. So you don't implicitly need VLANs to set up a VPN. All you need is to shut off DHCP server on your OpenWrt router, run the VPN (say WireGuard, which you can follow this video: kzbin.info/www/bejne/ZmXUZWR9erWpgaM), and then port forward from your Mercury router, to your OpenWrt IP and port thats running WireGuard (such as 51820). You'll also probably have to do port forwarding on OpenWrt as well. Nonetheless, once you do that, and set up your WireGuard client, you should be able to connect to it. This also assumes your home network is using a Non CGNAT IP Address. If so, you just need to make sure you know what it is. If its dynamic, then you can use ddclient with a purchased domain name to connect to your home network. Otherwise if its CGNAT, you'll need a cloud server with a static IP as an intermediary. Nonetheless, this process really doesn't implicitly involve VLANs. You might get your VLAN from PPoE (I dont have much experience with this, but am familiar of it conceptually), but otherwise, you don't need to care about VLANs beyond that.
@mansurbhamani3905
@mansurbhamani3905 2 жыл бұрын
Good explanation but a topology diagram would help to understand exactly what you are trying to do and achieve.
@DevOdyssey
@DevOdyssey 2 жыл бұрын
Thanks for watching Mansur! I appreciate the compliment. You are definitely right in that aspect, a picture is worth 1000 words. A topology diagram would indeed be helpful. While in this video it's simple, some other videos have more complicated network topologies. I recently found a great software to help me create those topologies for visual purposes, and in an upcoming video I'll be using it. Anyway for a quick explanation on this video, the topology is effectively this: Router (VLAN 1,2) -> Switch Here the router creates VLANs 1 and 2, and passes them to the network switch via a trunk port. Then the switch can pass the VLANs to an end device, such as a laptop. Switch (VLAN 1) -> Laptop This is what you see at 11:54, where my laptop is on VLAN 1 network After that, I try out VLAN 2, by making some changes in the managed switch, and it looks like this. Switch (VLAN 2) -> Laptop Here, my laptop is on VLAN 2 network. While this isn't as good as a topology diagram, I hope this is simple enough to visualize the networks, and how they are passed from router, to switch, to laptop.
@MatthewN8OHU
@MatthewN8OHU 2 жыл бұрын
Would this work for a Raspberry Pi 4 B and something like a Linksys E2500 set up as a switch, since that model of router doesn't have Wi-Fi support in OpenWRT? If so, do you have a video on how to set that up?
@DevOdyssey
@DevOdyssey 2 жыл бұрын
Thanks for watching Blade's Toy Shop! First, are you speaking about v3 of the hardware? It seems like you are since that version does not have wireless support. openwrt.org/toh/linksys/e2500_v3 As long as Linksys E2500 has VLAN support (which it looks like it does), which it likely does, then setting it up as a managed switch should work. I don't have a video on how to set that up, but the set up should be the same as in this video, if DSA VLANs are supported. If not, and swconfig is the supported VLAN software, then my prior video on VLANs would then do the trick. kzbin.info/www/bejne/a4XXnXSOmsZ6i68 I can't seem to find which VLAN software is supported, but one of those should work.
@MatthewN8OHU
@MatthewN8OHU 2 жыл бұрын
@@DevOdyssey I don't think any of the E2500 models have Wi-Fi support because the one I have doesn't show the Wi-Fi radio. I also believe I have a v1 because it doesn't have any version number on it (I actually have three of them, but I fried one the other day). Thanks for the response; I'll see if I can get the router properly configured so I have an actual switch instead of an ancient 10BaseT Five port hub.
@DevOdyssey
@DevOdyssey 2 жыл бұрын
@@MatthewN8OHU Looks like you are right according to their table of hardware, none of the Linksys E2500 supports WiFi, likely due to issues with Broadcom WLAN drivers. You're welcome! Glad I can help. I hope you can get it configured and working properly, instead of being a slow dinosaur at this point haha. I have an old Linksys WRT54G that I'm not sure what to do with. Given how old it is, it really won't function that well in any modern network, which is the only reason why I'll find somewhere to recycle it. Otherwise, I'd keep it. Used to be a very well loved router back in the day, but as with any tech, time gets the better of it.
@philipjanbaruis7040
@philipjanbaruis7040 28 күн бұрын
I tried the 2nd way to create VLAN (wireless adapter). But devices are not able to get IP address and cant connect
@DevOdyssey
@DevOdyssey 24 күн бұрын
Thanks for watching @philipjanbaruis7040! So using a wireless adapter, it shouldn't really be any different, but you'd have to ensure your wireless configuration in OpenWrt is set to use the VLAN as its network. I covered this at 14:03 in the video. Is that how your config looks? Your wireless adapter should recognize it as any other local network, it should effectively "untag" the VLAN, like untagging a switch port.
@apricotcomputers3943
@apricotcomputers3943 Ай бұрын
nice, but what if my users want to use captive portal 🤔
@DevOdyssey
@DevOdyssey Ай бұрын
Thanks for watching @apricotcomputers3943! If you want to use captive portal on your network (like a guest network), you can do that no problem and the VLAN shouldn't get in the way. Quite actually, you should be able to drop the users onto the VLAN / network of your choice with captive portal. I have not set one up yet, but I generally understand how they work, so this should be the answer you're looking for.
@manik5824
@manik5824 Жыл бұрын
hello, i am having tplink router with dhcp eabled and cisco switch sg350 with openwrt router 22.03 can you please tell how can i enable vlan in this setup
@DevOdyssey
@DevOdyssey Жыл бұрын
Thanks for watching Mani! Does the TP Link have OpenWrt on it? If not, I'm not sure how to set up VLANs on TP Link routers, or if they have that feature. I think some of them can, but it depends on the model and the software. As for the Cisco switch, I don't think there is any switching hardware that can actually run OpenWrt, simply given the nature of switching hardware and their MCUs. I don't see it in their list of hardware, so I assume you may be mistaken here. If its your TP Link router running OpenWrt, then you should be able to get this working with your Cisco switch. Simply set up the TP Link router with VLANs as in this video, such as at 2:20, and then on the Cisco switch side, make sure you create a corresponding VLAN(s) with the same numbers. Then make the ethernet port you connect on the Cisco switch, the trunk port, and the port on the TP Link router, a trunk port (aka carrying all your VLANS), and now your Cisco switch can carry all your VLANs, and you can assign your VLANs out to different ports on your Cisco switch.
@XSTAYUPX
@XSTAYUPX Жыл бұрын
22.03 please, great vid
@DevOdyssey
@DevOdyssey Жыл бұрын
Thanks for watching Geoff! Appreciate the compliment. The major architectural change to DSA (from swconfig) occurred in version 21.02, using an updated Linux kernel (5.4). There have been no changes since then on how VLANs are configured, and chances are won't be any future changes for awhile, if not at all. So the same concept should apply to OpenWrt 22.03, granted making sure your hardware supports DSA VLANs.
@deonliberator8953
@deonliberator8953 2 жыл бұрын
Thank you for your tutorial ,it was very helpfull
@DevOdyssey
@DevOdyssey 2 жыл бұрын
You're Welcome Deon! Thanks for the compliment and for wawtching 😊
@Perfxrmxnce
@Perfxrmxnce 6 ай бұрын
skinwalker walk through next please 🙏
@DevOdyssey
@DevOdyssey 6 ай бұрын
Thanks for watching @coppenhall! I’ll be honest I’m not sure what you mean by ski skinwalker, do you mean a new skin / theme for OpenWrt? You can find some if you do some searching and just upload it, or if you want to get your hands dirty with some html and css, you can probably make you’re own without too much difficulty.
@markf13579
@markf13579 2 жыл бұрын
Thanks for the video. However, compared to other YT videos the sound is very low and you are hard to understand.
@DevOdyssey
@DevOdyssey 2 жыл бұрын
Thanks for watching Mark! When I was making this video, I did get some new audio and video equipment and was having trouble with getting the audio just right. I did some post editing to increase the volume to make it more audible. I was able to improve it for my videos after this one. Sorry about that!
@jeancharlesc.6290
@jeancharlesc.6290 2 жыл бұрын
noob here , like all video i have error , sudo apt install build-essential ccache ecj fastjar file g++ gawk \ gettext git java-propose-classpath libelf-dev libncurses5-dev \ libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \ python-distutils-extra python3-setuptools python3-dev rsync subversion \ swig time xsltproc zlib1g-dev E: Package 'python-distutils-extra' has no installation candidate .... one more how to i cant made , your one is fresh .... disappointing not being able to make the tutorials on youtube .., newbie here, and looking to secure my network a little more...
@DevOdyssey
@DevOdyssey 2 жыл бұрын
Thanks for watching Jean Charles C! In regards to your error, I'm not sure where you are encountering this error in this video. OpenWrt doesn't use apt for the package manager, so you shouldn't be encountering the error here. From what I see, it looks like you're trying to set up a build environment for OpenWrt, and your comment likely references that video. Is that correct? If so, then are you using Debian 11.2? Try running your sudo apt command again, and remove the "python-distutils-extra" package, as you many not actually need it to build OpenWrt. In 02:44 in the Building OpenWrt video, I don't see this package in there. So try proceeding without that. kzbin.info/www/bejne/o2rYiIBshrqhpq8 In addition, if you have further questions regarding that video, make a new comment in that video so others can view the relevant information for that video. Thanks!
@_mult
@_mult 9 ай бұрын
Update guide, openwrt 23
@DevOdyssey
@DevOdyssey 9 ай бұрын
Thanks for watching @_mult! To my knowledge, all versions of OpenWrt 23 use DSA for VLANs (so long as the hardware supports it) and I don't believe the LuCI GUI has changed either. With that, this guide should equally apply. Unless I am incorrect, then please let me know. Or if you have any particular questions setting up DSA VLANs, feel free to ask.
@EmilePolka
@EmilePolka Жыл бұрын
Wtf is this.... Im expecting something like repurposing a old router to use it as managed switch, but here me watching a stupid setup like this, getting a vlan aware switch is not that hard to find now a days.
@DevOdyssey
@DevOdyssey Жыл бұрын
This video demonstrates how to use OpenWrt as a managed switch using DSA based VLANs with hardware that happens to be a RaspberryPi. This configuration is not tied to Raspberry Pi and will work on other routers that support DSA VLANs. The concepts can even be extended to routers that still use swconfig.
VLANs in OpenWrt 21
28:27
OneMarcFifty
Рет қаралды 178 М.
Network Virtual LANs (VLANs), Explained Simply (VLANs, Part 1)
28:38
Doug Johnson Productions
Рет қаралды 152 М.
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 81 МЛН
Хасанның өзі эфирге шықты! “Қылмыстық топқа қатысым жоқ” дейді. Талғарда не болды? Халық сене ме?
09:25
Демократиялы Қазақстан / Демократический Казахстан
Рет қаралды 355 М.
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 34 МЛН
Создаем гостевую сеть на OpenWrt
29:23
Моя справа - адмін
Рет қаралды 9 М.
How To Create VLANs in Proxmox For a Single NIC
28:35
Tech Tutorials - David McKone
Рет қаралды 116 М.
OpenWrt 21.02 DSA Switch config - VLAN and Bridging (english)
14:05
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 81 МЛН