MENU

Fun & Interesting

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

Dev Odyssey 29,369 lượt xem 3 years ago
Video Not Working? Fix It Now

Get a discount on Ekster Products
https://shop.ekster.com/devodyssey or discount code "DEV" at checkout!
(PAID Link)

Follow me
Twitter - https://twitter.com/Dev_Odyssey
Facebook - https://www.facebook.com/Dev0dyssey

Support me (includes paid affiliate links)
Humble Software Bundle | All-in-One Python by Packt - https://bit.ly/3sNRDMI

Welcome back to Dev Odyssey Home Networking! In this episode, I show you how to make an OpenWrt Raspberry Pi into a managed switch, using Distributed Switch Architecture (DSA) VLANS in OpenWrt 21.02.

Legacy VLAN configuration was done using swconfig, and still is for devices that do not have DSA capable drivers. For those that have DSA drivers, creating VLANs over bridged interfaces is the best way to create VLANs. DSA has been around for quite some time in the linux kernel, and recently has been adopted in OpenWrt as it provides superior capabilities for VLAN configuration. Once you know how to create VLANs using DSA, using them to create a managed switch set up is a breeze.

I also cover the generic way to create VLANs for those who can't use DSA bridges. Lastly you'll learn how to apply these VLANs for WiFi networks.

During my testing, I did experience a caveat when attempting to use DSA VLANs over WiFi, specific to Raspberry Pi. My wireless devices simply could not connect to WiFi. This is apparently a known issue, and you can find my OpenWrt forum post in the links below. To overcome this, I created a configuration that does not use DSA bridges, so you can use VLANs over WiFi, which was recommended by the community.

Links

OpenWrt DSA Start Guide
https://openwrt.org/docs/guide-user/network/dsa/start

OpenWrt Forum Post VLANs on WiFi Raspberry Pi
https://forum.openwrt.org/t/raspberry-pi-4b-wifi-using-wpa-psk2-failing-to-connect-using-vlans-dsa/

Configuration Files

DSA Router
https://gist.github.com/odevodyssey/5010ef4e50106eee2380b5b1c3b6da57

DSA Switch
https://gist.github.com/odevodyssey/52603be8753164035b260b7fcbc24629

Non DSA Switch
https://gist.github.com/odevodyssey/b81c12b8d1c373aebeda04f48e3ca21e

Chapters

00:00 Intro
00:36 VLAN Changes in OpenWrt
01:00 SWConfig vs. DSA
01:41 Hardware Overview
02:20 DSA VLAN Config
07:15 Regular VLAN Config
07:52 Managed Switch Config
13:52 DSA VLANs WiFi
14:14 Caveat RPi 4 VLAN WiFi
14:59 Outro

Attributions

Rainforest by Spiring https://soundcloud.com/user-57630131
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/3s5yiGk

#RaspberryPi #VLAN #Router #OpenWrt #HomeNetwork

Comment