VLANs in OpenWrt 21

165,660
0
Published 2021-12-21
MANY THANKS TO ALL MY PATRONS on www.patreon.com/onemarcfifty !!!

The VLAN Konfiguration has changed in OpenWrt 21.02 - Bridge VLAN Filtering and Distributed Switch Architecture (DSA) change the way we configure the network segmentation in a Guest, IOT and LAN Network.

00:00 Intro
00:58 TLDR – Chapter overview
01:15 Recap VLANs
04:24 Recap Version 19
08:13 Version 21 – 802.1Q VLANs
08:51 implicit/explicit configuration
10:53 Version 21 - DSA and bridges
12:12 Bridge VLAN filtering
16:07 egress/ingress/tagged/untagged explained
20:50 adding Wi-Fi to a VLAN
22:04 configuring a 2nd access point
24:30 Best practices and tips

Related videos:

Extend a Guest Wi-Fi to a second accesss point    • extend a guest wifi on second access ...  
Configure the Firewall on OpenWrt    • How to configure OpenWrt as Firewall ...  
Wi-Fi Fast Roaming    • CHEAP WI-FI MESH ALTERNATIVE with fas...  
Build a managed switch with OpenWrt    • Building a managed switch with OpenWr...  


Commands I type or use:

cd /etc/config
cp network network.bak
opkg update
opkg install diffutils
while true; do clear ; diff network network.bak ; sleep 1 ; done



to check if IP4 forwarding is active:


cat /proc/sys/net/ipv4/ip_forward
(0: not active, 1: active)


to disable forwarding (does not survive reboot):

echo "0" (gt) /proc/sys/net/ipv4/ip_forward

(replace (gt) with the "greater" sign)


to survive reboot:
add net.ipv4.ip_forward=0
into the /etc/sysctl.conf file





The Linux Kernel DSA Documentation is here: www.kernel.org/doc/Documentation/networking/dsa/ds…



Please support me on patreon: www.patreon.com/onemarcfifty
My youtube channel: youtube.com/onemarcfifty
Marc on Twitter: twitter.com/onemarcfifty
Marc on Facebook: www.facebook.com/onemarcfifty/
Marc on Reddit: www.reddit.com/user/onemarcfifty
Chat with me on Discord: discord.com/invite/DXnfBUG

Licence-free music on / Lizenzfreie Musik von www.terrasound.de/lizenzfreie-musik-fuer-youtube-v… music on / Lizenzfreie Musik von www.terrasound.de/lizenzfreie-musik-fuer-youtube-v…

All Comments (21)
  • @kryb2k5
    On my Archer C7 the br-lan does not have multiple lan ports bridged. Instead it only shows a "Switch VLAN" named eth0.1. I still have the Network->Switch menu item but no checkbox to "bridge interfaces" from the old guide. Here is what worked for me: In Network->Switch select "Add VLAN", then make sure it is tagged on the CPU(eth0). This will create another "Switch VLAN" under Network->Interfaces->Devices. Create a new Interface with a static adress and select eth0.3 (or whatever "Switch VLAN" was created). Select IP range, firewall, etc. and don't forget to enable DHCP. From there it seems identical to OpenWRT 19.
  • @abhigupta912
    Yes to all the tutorials please (RaspberryPi, Proxmox, VirtualBox). Also would love to see detailed explaination of networking concepts using VirtualBox as I don't have access to physical hardware to play with.
  • @glennperete
    please, a video on rpi->managed switch with vlans to access points with guest and main wifi. thanks.
  • @Autotrope
    Your way of explaining things is the perfect match for my way of understanding things. Thank you so much for having this channel. I'm learning so much about home networking.
  • Wow!! This is really an amazing video. You do such a great job explaning it. You have great visual aids, the pacing is good too, and you answer almost every question I have all whilst highlighting difference between popular versions of OpenWRT. You condensed down what could have taken hours or days to piece together into a 30 minute video.
  • I learn something new every time I watch this video. Just an average user with 4G internet trying to figure out how to set up vlan's on a network with 4G router and an 8 port switch and a few wireless access points! Appreciate you taking the time to try and simplify basic knowledge of how the internet works in your home and how to protect yourself from doing something that may not help your internet security which is important today to know that there is a lot more going on behind the screen than most understand and could be more harmful than you know!
  • @cokegen
    I bought a couple new routers to do your BATMAN setup and I was left wondering where my old and trusted "switch" section went. Didn't had any idea on DSA, so, I'll have to watch and re-watch this video until it sticks. Really, thanks a LOT for doing all of this.
  • @sviteneg
    Thank you very much for such a simple and understandable explanation about VLAN! Special thanks for your contribution to the distribution of OpenWRT. I subscribed a month ago and now I watch all your videos. And by the way, it was after this video that I was finally able to set up VLAN. I wish the grow of the channel and look forward to new videos. Such work and material is really worth supporting from the community through patreon or something else!
  • @NiklasTheis
    This video is great. ❤ After trying for 2 days and failing, I finally found your video and fully understood what to to. Afterwards it took me 20 minutes to configure after a full reset and it worked smoothly. 🎉
  • @lucidgroove
    Wow. This is an amazing video and the way you deliver it is very helpful to understanding the new concepts and differences. I was about to revert back to v19 because learning all this stuff from the documentation seemed to complex to put into action, with all my kids and house mates pressing me to get the network back up.
  • @miteshpatel9308
    Your videos are awesome! Thank you for making these. Similar content across the web are no where close to your level. I am new to networking and your videos have my home network up and running with multiple vlans with openwrt all of which is new to me.
  • @seth2389
    Perfekt! Danke sehr! This is as complete a VLAN tutorial as one can expect - great work and keep putting out such like-worthy content. BTW; I like your T-Shirt color too!!
  • The moment then noob (me ofc) trying o understand bunch of information very fast (for me ofc). Many thanks for going into logic of your actions instead of "click like me" - that helps to understand what actually going on. At least now i know a little about vlan building possibilities/reason of tagging/etc. Many thanks, i like your way of teaching (its hard one, but really working way).
  • @sokolum
    What a wonderful and a excellent explanation! (Working here for years in networking)
  • @kennyawalker
    Thanks so much Marc for the OpenWRT Videos. I have just got started in this world of using old hardware. I have three Netgear WAC 104 access points running ver 22 and followed your video on fast roaming, what a difference in my wifi cheers. The call to action, yes Proxmox container with a lan to cover containers into a vpn would be amazing too see.
  • Thanks for making this update. It was a little trickier to wrap my head around than your ususal fare, but I think I got it in the end ;-) When the switch option disappeared on OpenWRT 21.02 I was a little disappointed at first. I could have read up on it, but I thought I'd just wait for the movie. Well, here it is! The new GUI actually seems to be structured a little more clearly than the previous one, unless there's some fundamental misunderstanding on my part. I hope this is an accurate observation: The Network/Interfaces/Interfaces section configures OSI layer 3. The Network/Interfaces/Devices section configures (all) layer 2/ layer 1 interaction.
  • Danke Marc, your explanations are really great. Yes, I am strongly encouraging you to make Raspberry Pi based OpenWrt tutorials, especially with the topic VLAN. Vielen Dank für deine wertvolle Zeit und viele Grüße aus NRW.
  • @Cheney261
    Many thanks. Now I get it why I was always losing connecting with the router and revert back when I was trying to create vlans at the device page. This episode is so awesome.
  • @jacobrosen
    THANK YOU! I've been sitting for hours trying to figure this out, and it finally dropped when watching this
  • @urielb.7476
    Thanks Marc, this is a great addition to all your OpenWrt videos. As always a great tutorial.🙏