How to Configure VLANS on a Cisco Switch

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys what's going on this is rob here with another rm tech tutorial and today i'm going to show you how to configure vlans on a cisco switch so in today's example i'm going to be using a cisco 3550 switch a uh 24 port switch it's fairly fairly old switch by today's standards but it's really good to learn on if that's what you're looking to do you can pick them up for fairly cheap as well i've seen them for like 75 bucks or so so if you're looking to take your cisco ccna this would probably be a great switch to learn on so anyways here i am at the console for the switch i use putty to connect to cisco switches routers etc if you need help trying to figure out how to connect to the switch you can contact me or i can make another video later to show you how to do that but for this video like i said i'm going to show you how to create vlans on the switch so once you have your your console window open you should be presented with this now mine is just named cisco 3550 that's just what i named it for this example yours might say switch or something else depending on what you did in your configuration so anyways to start we want to type in en for enable mode and then type in the password if i type in show vlan and press enter you can see up here all of my interfaces are assigned to this default right here and press ctrl c to get out of this okay so to create a vlan the first thing you want to do once you're in enable mode is type in config t for configuration terminal and then type in vlan and then assign it any number you want that's not already assigned up here so i'm just going to go vlan 10 just for example then we want to make a name for the vlan i'm going to name this vlan i'm just going to name it test one okay type exit exit again now if we type show vlan we should see our test vlan as vlan 10 right here okay so to make this example more complete i'm going to create a secondary vlan as well so again we want to go back into the configuration terminal make vlan 20 and i'm going to name this vlan just test two exit and then quick little tip you don't have to go all the way back to the um the first prompt in order to type in commands like i went all the way back to this right here before i type show vlan uh if you were to try to type that right now it would give you an error but a little tip is if you put a do in front of the command if you're at a different level like the configuration terminal like i am for example so if i were to go do show vlan then you can execute that same command no matter where you are so now we have vlan 10 vlan 20 both have names okay and now the next step is we want to assign interfaces to these vlans so i'm just going to use fast ethernet port 1 the fast ethernet port 2 for the example so i'm going to assign port 1 to test the test 1 vlan and then port 2 to the test 2 vlan okay so we're still in the configuration terminal but if you are not again you want to go config t okay and then we want to bring up the configuration for our interface so we're going to start with fast ethernet port one so go int a zero slash one okay then the first thing i do is i can get into this later or in a different video i make sure this port is an access port not a trump port or anything else like i said um i can have an explanation for that later it's not completely necessary that you do this but this is just my way of doing things so first thing i do is type in switch port mode access okay and now we assign the port to the vlan that we want it to be associated with so again this is port one i'm going to associate this port with the test one vlan which is numbered as 10. so i go switch port access vlan 10 and then no shutdown to bring up the port if for some other reason the port is disabled then exit now again let's bring up the vlans so do show vlan or just show vlan if you want all the way back to the beginning as you can see now we have port 1 associated with this vlan so i think at this point pretty much get the idea of what i'm doing here so i'm just going to quickly go ahead and assign port 2 to this vlan right here so we're still in configuration or the configuration terminal so int fa0 slash two and switch port mode access switch port access vlan 20. no shutdown exits i'm going to show the vlan again just to verify and there you have it so port 1 is associated with this vlan port 2 is associated with this one if you want to assign additional ports like say i wanted to assign you know port 3 to test 1 it would be as simple as just going back in here bringing up the configuration for port 3. and typing in the same commands i typed for everything else see port 3 is associated with this vlan okay so there you have it there are your vlans that's how you assign the ports so now you need to assign an ip address to the individual vlans so for this example i'm just going to go 192.168 and 192.168.2.1 the way we do this is similar to how we configured the individual ports so go back into the configuration terminal then type in int and then the name of your vlan so we'll start with the first one just vlan 10 and then it's as simple as just typing in ip address and then sorry about this this stuff pops up but it doesn't affect any commands that you might enter but it's making it difficult for this tutorial to ensure it's kind of hard for you to see where i'm typing at this point but you start with ip address and then we'll go 192. 68. 1.1 and then subnet mask 255 255 255. we'll do same for the second vlan so int vlan 20 ip address maybe 192.168.2.1 subnet mask again 255 255 255 0. exit okay so at this point you can confirm the ip address changes that you made by typing in go show ipint brief okay then if you look here you see again vlan 1 is the default it's built in and then vlan 10 and vlan 20 both have the ip addresses assigned that we assign them so 192.168.1.1 and then 192.168. at 2.1 so this point you've successfully created two vlans assigned your interfaces to them and then assigned two different ip addresses to each one um that's pretty much all there is to it at this point unless you want to enter unless you want to configure ip routing in between the vlans which is really simple to do and you can do that by typing in go back to your configuration terminal so config t and then just type in ip routing to make sure that ip routing is enabled okay and then you can confirm that by going back to the first prompt and then typing in show ip route you go now on mine it only shows this one because i only have one computer plugged into this port um i don't have another computer plugged into port 2 which would be for my second vlan it would show that if i did have a computer plugged in so the last step would be if you want to create a route for the default gateway for an internet connection so say you have you know a vlan or more than one vlan running on your switch all you would do is go back into the configuration terminal and just type in ip route and then 0.0.0.0 0.0.0 and then the ip address of your default gateway so if the default gateway was 10.16.2.1 then you would type that there then press enter and you've successfully added a new static route in the routing table so all traffic going anywhere else other than to your other vlans will be routed through the gateway that you put right here and then at this point to save the configuration all i do is just um go back to the initial prompt here and then just type reload press enter it's going to ask you if you want to save the configuration since it's been modified if you do want to save the configuration type yes if not then type no i'm going to type yes and then press enter at this point it's going to reboot and when it comes back up the configuration should be exactly the way it is that you set it up to be and that's pretty much it so if anybody has any questions feel free to leave a comment below you can send me an email um if you like this kind of content feel free to let me know and i can make more videos like this in the future and of course if you like this video hit the like button and if you want to see more of my content please subscribe to my channel alright guys thanks for watching and i'll see you next time
Info
Channel: Robert Mayer
Views: 18,948
Rating: 4.8697677 out of 5
Keywords: Cisco, Cisco Catalyst, Cisco Switch, Cisco 3550, CCNA, vlan, vlans, configure vlans, configure vlans on cisco switch, Managed Switch, Layer 3 Switch, Routing, Inter-VLAN routing
Id: WY4J0-ni4DM
Channel Id: undefined
Length: 14min 32sec (872 seconds)
Published: Thu Mar 08 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.