MicroNugget: What are VLANs?

MicroNugget: What are VLANs?



virtual local area networks also well known as VLANs in this micro nugget we're going to take a look together at what they are why we use them and how to create them let's jump in so what exactly is a virtual local area network well I'm glad you asked to really appreciate a virtual local area network we probably got to focus on what a local area network is first so let's say we have a site in Las Vegas Nevada and we have another site in Reno Nevada in the Las Vegas office we have computers and networks and Printers and you can all talk to each other and in Reno we have another high speed local area network and that's high speed connectivity where devices can talk to each other we have PCs and Printers and servers they can all talk to each other if we wanted devices in Las Vegas to be able to communicate with Reno we could purchase a wide area network connection to connect the two together so when we talk about local area networks we have a local area network here in Las Vegas and a local area network here in Reno high-speed connectivity with geographically close devices a campus the same building etc so what about virtual local area networks why do we need it well one day the accounting department grew and they have all these pcs and I'll put them in blue and the sales department grew and I'll put all their pcs here in purple or pink or whatever color that is and what they had in mind was they want accounting to be on the network and sales to be on the network but not on the same network and somebody said no problem we'll just get two switches so here's an example of a really big switch it's got about 144 Ethernet gigabit ports on it so we could just plug everybody in but then accounting and sales wouldn't be separated they'd be on the same local area network and how do we separate them and the answer is that the virtual local area networks the reason the way we can make it virtual is this we can take the accounting folks and we can take let's say just these port right here and they don't have to be in order we can take some of those ports and maybe these ports and maybe a few of those ports and assign them all to a specific feeling let's say VLAN six just because we can just a number and all those ports anybody connected into those ports are going to be like they're on the same local area network and we'll take sales we use a different color and four sales will give them these ports maybe one up here a few over here we probably wouldn't mix them up that much values only give you the idea they don't have to be ports next to each other they're just any port you want like you know a sailor any port in a storm so any of those ports will call VLAN 10 so anytime we add a new salesperson we plug them in we just plug them in I'll get a neutral color for the cabling let's use red we just plug them into a port that's assigned to the pink VLAN VLAN 10 and they're set server will put the server up there that's fine and the the accounting devices plug it into the blue ports and a server into a blue port and we're set and that's how that's why they call it a virtual local area network because we have one physical switch but we're covering it in two different chunks so virtually logically we're keeping all the account all the accounting traffic and the sales traffic completely separate from each other okay so we've addressed a couple things number one we've taken a look at what VLANs do is they separate traffic so you can have some ports in one VLAN and other ports in a different VLAN and yet even other ports in a third VLAN and create hundreds of them why do we use them we use them to isolate traffic isolate groups of devices that like to hang out together for lots of reasons security reasons maybe we have 144 ports on the switch and we just don't want to put everybody in one giant broadcast domain that's another term for a VLAN why would that be let's take a look at that for a moment a broadcast if you took a look at my other micro negative broadcast a broadcast if it goes into this frame into this port right here that broadcast is forwarded to every other port on the switch but with VLANs the broadcast that goes in VLAN 2 for example would only be sent to other active ports that are in VLAN – it wouldn't go to everybody just a subset so we're reducing the load that everybody's going to put on their backs as far as broadcast are concerned by cutting up our network into smaller B lens virtual local area networks now how do we actually create these it's really simple it's a couple quick one-liners on a Cisco device let me show you how to do that right now there's two basic steps to creating this we need to first of all identify VLANs so let's say for accounting we're going to use B then v so we create the VLAN v and then we assign specific ports on the switch either in a range or one by one to that VLAN so having said that let's bring in a switch will lift them in here there is this isn't this exact physical switch this is a thirty five sixty that I'm configuring but the syntax is identical so we'll go into configuration mode first of all and then we'll create the VLAN I'm going to give it a name you don't have to just the number that's the most important part and now I'm going to interface configuration and we're going to assign that port as an access port meaning we're supporting one device assigning that port to VLAN five then verifying that it actually took so we take a look at the output we have the default VLAN where everybody shows up by default and then we have the new VLAN five that we just created and it's active and there's one port gigabit zero slash twenty five in it pretty lonely at the moment because without anybody else that one port or that one device connected to that port wouldn't be able to talk to anybody because a VLAN of one is a very very lonely place so the rest of the story what else we would need to do is we would carve out our VLANs we would connect our ports so we'll take the accounting well maybe these are all accounting VLAN ports so the switch controls the VLAN what what VLAN ports belong to which we just did and we'll put sales in blue and maybe they're up here to this port and this port and these ports well plug in all the cables there and the last piece is we need to make sure these have compatible IP addresses for example this could be Elm Street and this could be Douglas Street boring more likely terms this might be the 10.10 zero and this might be the 10200 network though all the devices would have to also at layer 3 agree on what the common street name would be normally for every layer to VLAN there's also a common layer 3 IP network ok so the last piece here is well what if people in accounting on Elm Street and people in sales on Douglas Street need to talk to each other how do we pull that one off the way we pull that off is with a third device and that device is a device that knows how to reach both networks and will forward packets that is a router so we could plug a router into a port on let's say this is VLAN two and VLAN five and say this is V then 6 so we can simply plug a router into the a port on VLAN 5 and a second interface either physical or logical into a port on VLAN 6 and then train everybody on Elm Street hey if you need to get out use the default gateway maybe his address is dot 1 here and around Douglas use the default gateway I've got one here to get out of course that would be an IP address like 10 to 0.1 or 10.1 that's 0.1 on these interfaces and then they could route between them and that my friends is the story about what VLANs do why we use them to isolate traffic how to create them and assign ports on the Cisco environment and then finally making sure you have compatible IP addresses and if you want to route between those two VLANs and IP subnets you'd want to go ahead and use a layer 3 device commonly called a router I hope this has been informative for you and I'd like to thank you for viewing

25 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *