How to Create a VLAN - A Beginner's Guide // OpenWrt Router (Up to 19.x)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
have you ever tried to set up a guest network or smart device network but your router doesn't have that option well with vlans you could do just that and in this video you'll learn how welcome back to dev odyssey a developer's journey through it where i cover tutorials and reviews of it tools and technologies i'm your host orest and in this episode we'll be breaking down vlans so what are vlans well vlans are virtual local area networks and they're defined by the 802.1q protocol they work like normal lands except they're virtually or logically separated as opposed to physically what does that mean well i'll show you vlans are actually quite simple let's say you have a router with land capable physical ports these ports are physically separated and therefore any networks on these physical ports are also physically separated with vlans we create virtual ports on top of a physical port this thereby achieves that logical separation well how do we distinguish from virtual networks and virtual ports well we do so with vlan ids vlan ids are those two numbers you see next to those virtual ports and these numbers can range from one to four thousand ninety four and so therefore any traffic that comes from this physical port will be tagged with these vlan ids and therefore this physical port can carry multiple virtual networks so then how do we connect to a specific virtual port or virtual network well i'm glad you asked this is where our router acts as a managed switch and as a managed switch it'll perform a process for us called untagging which is the reverse of tagging in the process of untagging we remove that vlan id from the network traffic coming from a physical port and therefore it allows a device connected to that physical port to connect to that virtual network so now these devices will reside on the red vlan or the blue vlan this process works very similarly with wi-fi where your wi-fi signal will carry untagged vlan traffic and therefore your wireless devices can connect to a specific virtual network that you choose so what are the advantages of vlans well with vlans you could set up multiple virtual networks on one physical port or on your wi-fi with multiple virtual networks you could separate out which networks your devices connect to this is great for guest networks for visitors for smart device networks like your risky smart devices such as a smart tv a smart thermostat smart plugs or other smart devices it's also great for video surveillance networks for your cameras and for video streaming servers like plex to set up a vlan it requires the following a physical interface such as ethernet or wi-fi a vlan id from one to 4094 a name and a priority which by default is zero for best effort what would this video be without an example well i'll show you how to do this on my netgear r6080 router running openwrt let's take a look in this demonstration i'm going to show you how you can create your own virtual network or vlan how you can connect to that vlan using a physical port and how to connect to that vlan using wi-fi all in open wrt on my netgear router r6080 first i'm going to go to the router interface page and here i'm going to then log in next i'm going to go to the network tab at the top and then click interfaces then i'm going to switch over to the devices tab and here i'm going to click add device configuration our device type is going to be vlan 802.1 the base device is going to be ethernet switch eth0 the vlan id is going to be 3 and that's because 1 and 2 already taken up and i'm going to leave the device name as is then i'll click save and there you go you've created your own vlan now let's create an interface for it next we're going to go over to the interfaces tab click add new interface and i'm going to give it a name of vlan 3 for simplicity sake but you can choose whatever you'd like the protocol will be static address i'm going to bridge interfaces and choose the software vlan eth03 interface and the wireless network master openwrt lan interface that's because i want to be able to connect to this virtual network over wi-fi then i'll click create interface and now i have more options the ipv4 address will be 192.168.3.1 and just as a tidbit here i try to make the network match the vlan id as best as possible so as you can see in this third octet or third number i have three and that matches the vlan id of three i'm going to choose the net mask of five five two five five two five five zero which is also forward slash 24 insider and this is just your general default network size that you find in many routers next we're going to skip over all these other settings and move over to dhcp server here i'm going to set up a dhcp server and leave these options default as is i'm going to skip over advanced settings in ipv6 settings and go to save next i'm going to go over to this lan here and i'm going to do a quick edit i'm going to go to physical settings and i'm going to take off the bridge interfaces and then save that's because by default the lan is bridged to both of the wireless networks available on this router and i don't want to connect to the lan over wi-fi i want to connect to the vlan that i'm making over wi-fi then i'm going to click save and apply and let those changes take effect next i'm going to go to the network tab once more and click switch here i'm going to add that vlan that i just created so that i can access this virtual network over a physical port here i'll click add vlan give it an id of 3 on the cpu eth0 port i'm going to check off tagged this needs to be tagged so that the cpu can properly distribute the vlans to the other ports next i'm going to go to lan port 1 and click untagged now you'll notice when i do this that these boxes become red and that's because multiple vlans cannot be untagged on one physical port so to resolve this i'll just go to vlan 1 on lan port 1 and i'll click off then when i'm done i'll click save and apply now that i've done that i'm going to go to network again and click wireless here i'm going to choose this second interface here or wireless interface and this is the one that we bridged earlier when we created that vlan 3 interface i'm going to click edit and then first as everything i do i do with security so i'm going to go to wireless security add wpa2psk encryption give it a password and then click save now that i've saved it i'm going to enable it and now that we've completed that we're ready to test it out first i'm going to move my ethernet cable into that lan port 1 so that i can verify i'm connecting to that vlan 3 network then i'm going to connect to the wi-fi name open wrt and see if i get a connection to that vlan 3 network as well so now that i've given it some time i'm going to go ahead and try to connect to this router using 192.168.3.1 and as you can see here i'm redirected to the admin interface page so that was successful now let's try and connect to it over wi-fi first i'm going to disconnect my ethernet cable and that's because i want to be sure i don't accidentally connect to this admin interface using my ethernet connection next i'm going to go to my settings go to network and then look for openwrt and then give it the password that i created and as you can see it looks like we got an ip address of 192.168.3.204 so that tells me that we successfully connected to the network and lastly just to be sure i'm going to try to go to this page one more time and looks like that worked as well so in this demonstration i showed you how you can create your own vlan connect to that vlan using a physical port and connect that vlan over wi-fi thanks for following my journey i really appreciate it if you like this video and got some value out of it go ahead and give it a thumbs up and if you like this type of content around it tools and technologies home networking and home network security go ahead and subscribe to my channel and click that bell for notifications so you don't miss the next one so tell me what would you use a vlan for i'm curious to know go ahead and drop me a comment and i'll be sure to answer thanks guys and i'll see you in the next video
Info
Channel: Dev Odyssey
Views: 99,421
Rating: undefined out of 5
Keywords: benefits of vlans, how to create a vlan, how to create a vlan at home, how to create a vlan on a switch, how to make a guest network on router, vlan configuration step by step, vlan home router, vlan network configuration, vlan networking explained, vlan openwrt, vlan router configuration, vlan router home, what does a vlan do, what is a vlan and how does it work, why should i make a vlan, vlans explained, 802.1q, vlans for beginners, vlans tutorial, vlan concepts, guest vlan
Id: 5TtlAXeaGUM
Channel Id: undefined
Length: 9min 58sec (598 seconds)
Published: Fri May 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.