< Return to Video

Learn VLANs & Trunking on Cisco Switches in Real Life

  • 0:00 - 0:03
    How's it going everybody? in this video
  • 0:03 - 0:05
    I'm going to show you what a trunk link
  • 0:05 - 0:10
    is on network switches so a trunk link
  • 0:10 - 0:11
    is a
  • 0:11 - 0:15
    connection between two network devices
  • 0:15 - 0:17
    whether they're switches or routers
  • 0:17 - 0:19
    that's carrying tag
  • 0:19 - 0:23
    traffic and I'll explain this so the
  • 0:23 - 0:24
    only connection that I have set up
  • 0:24 - 0:27
    already that I'm not going to show you
  • 0:27 - 0:29
    is the trunk link that I have going to
  • 0:29 - 0:32
    the router these two switches are going
  • 0:32 - 0:34
    to have two VLS on them each they're
  • 0:34 - 0:37
    going to have VLAN 10 and VLAN 20 and I
  • 0:37 - 0:41
    want to illustrate how these trunks are
  • 0:41 - 0:43
    typically used in the industry so we're
  • 0:43 - 0:45
    going to go back to a scenario that I
  • 0:45 - 0:48
    introduced in the last lesson Bob's
  • 0:48 - 0:52
    Grocery Store so Bob's Grocery Store got
  • 0:52 - 0:54
    a network upgrade they got new racks
  • 0:54 - 0:57
    installed they got some newer is uh
  • 0:57 - 1:01
    Network equipment Cisco
  • 1:01 - 1:05
    and they want to extend the back office
  • 1:05 - 1:08
    Network to the upstairs as well you know
  • 1:08 - 1:10
    that Bob's Grocery Store is doing pretty
  • 1:10 - 1:13
    good it's one of those double decker
  • 1:13 - 1:17
    grocery stores and there's a back office
  • 1:17 - 1:19
    on the downstairs for people to you know
  • 1:19 - 1:22
    keep up with inventory and there's a
  • 1:22 - 1:24
    back office on the upstairs for people
  • 1:24 - 1:27
    to keep up with in inventory and all
  • 1:27 - 1:31
    those other administrative tasks
  • 1:31 - 1:35
    so the first floor switch is right here
  • 1:35 - 1:37
    the second the second floor switch is
  • 1:37 - 1:39
    right here so we're just going to you
  • 1:39 - 1:41
    know pretend that this switch is in
  • 1:41 - 1:43
    another in another
  • 1:43 - 1:47
    floor round mounted to another rack
  • 1:47 - 1:48
    where this switch is is going to be on
  • 1:48 - 1:50
    its own rack with its own set of
  • 1:50 - 1:53
    equipment usually in the industry that's
  • 1:53 - 1:56
    how it's working now we want to use the
  • 1:56 - 2:01
    same VLAN VLAN 10 for the back office
  • 2:01 - 2:05
    Network so VLAN 10 and 20 have already
  • 2:05 - 2:08
    been created on both these switches so
  • 2:08 - 2:10
    in the industry if you're going to try
  • 2:10 - 2:13
    to extend the same VLAN across multiple
  • 2:13 - 2:16
    switches no matter what floor they're on
  • 2:16 - 2:19
    you need to have vlans configured but
  • 2:19 - 2:21
    the thing that I'm going to specifically
  • 2:21 - 2:23
    show you how to set up today is the
  • 2:23 - 2:26
    trunk so what we have to do first and
  • 2:26 - 2:28
    this is what I recommend when you're
  • 2:28 - 2:30
    setting up banss when you're setting up
  • 2:30 - 2:33
    trun drunking any of that is first you
  • 2:33 - 2:36
    know you get your plan your diagram you
  • 2:36 - 2:38
    know as they say proper planning
  • 2:38 - 2:41
    prevents poor
  • 2:41 - 2:44
    performance Plan before have your
  • 2:44 - 2:47
    diagram know where you're connecting so
  • 2:47 - 2:49
    the first thing we're going to do is is
  • 2:49 - 2:50
    layer one we're going to make our
  • 2:50 - 2:52
    physical connections we've already got
  • 2:52 - 2:55
    one to the router now I I want you to
  • 2:55 - 2:57
    help me in the
  • 2:57 - 3:01
    comments if I am using gigabit Z 02 and
  • 3:01 - 3:03
    I want that to be the trunk between my
  • 3:03 - 3:07
    floors so that switch one and switch two
  • 3:07 - 3:09
    can communicate with each other where
  • 3:09 - 3:11
    would I
  • 3:11 - 3:14
    connect I'll show you now but I I I want
  • 3:14 - 3:18
    you to challenge yourself so to uh to
  • 3:18 - 3:20
    try to think of this on your
  • 3:20 - 3:23
    own so I'm going to plug in right here
  • 3:23 - 3:25
    this is gigabit
  • 3:25 - 3:28
    02 and you always want your trunks to be
  • 3:28 - 3:31
    the fastest connection on the network so
  • 3:31 - 3:33
    this isn't even that fast compared to
  • 3:33 - 3:35
    some of the fiber connections that exist
  • 3:35 - 3:38
    out there uh open up a tab and Google
  • 3:38 - 3:40
    like fiber connections on switches
  • 3:40 - 3:43
    you'll see like 10 gigs and more the
  • 3:43 - 3:45
    speed so we're going to connect between
  • 3:45 - 3:47
    the switches you'll notice those
  • 3:47 - 3:50
    connections are coming up right away
  • 3:50 - 3:51
    that's cuz switches are normally
  • 3:51 - 3:53
    plug-and play where routers you got to
  • 3:53 - 3:55
    turn the ports
  • 3:55 - 3:58
    on but we don't have a trunk configured
  • 3:58 - 3:59
    yet so that's where I'm going to show
  • 3:59 - 4:00
    you
  • 4:00 - 4:03
    how to configure the trunks but first
  • 4:03 - 4:06
    let's connect our PCS so I've got my
  • 4:06 - 4:08
    laptop over here you can see the top of
  • 4:08 - 4:12
    it I've got it over here this is going
  • 4:12 - 4:15
    to be on floor two so this is one of the
  • 4:15 - 4:18
    back office computerss on floor Tu but
  • 4:18 - 4:22
    we want it to be in VLAN 10 VLAN 10 is
  • 4:22 - 4:25
    taking up ports 1 through 12 so I'm
  • 4:25 - 4:27
    going to plug that
  • 4:27 - 4:30
    in and in real life this might be for
  • 4:30 - 4:31
    the employees
  • 4:31 - 4:34
    workstations could be for Voiceover IP
  • 4:34 - 4:38
    phones uh all the things in their office
  • 4:38 - 4:42
    right the same is true for floor uh so
  • 4:42 - 4:45
    floor two we got going floor one so we
  • 4:45 - 4:47
    got some people down on floor one
  • 4:47 - 4:49
    they're going to need their connections
  • 4:49 - 4:52
    we're just using one laptop at this time
  • 4:52 - 4:55
    to test but you know where you always
  • 4:55 - 4:57
    want to test with at least two devices
  • 4:57 - 4:59
    and then once those work then you move
  • 4:59 - 5:02
    into deploying the larger groups of
  • 5:02 - 5:05
    hosts so on this case um I'm going to
  • 5:05 - 5:09
    connect floor
  • 5:09 - 5:12
    one which I've also happened to
  • 5:12 - 5:15
    configure VLAN 10 on and it has ports
  • 5:15 - 5:18
    one through
  • 5:18 - 5:21
    10 uh in VLAN I'm sorry 1 through 12 on
  • 5:21 - 5:25
    VLAN 10 as well so we're going to see
  • 5:25 - 5:28
    that come up that should come up as well
  • 5:28 - 5:32
    we see the light turning on and it's up
  • 5:32 - 5:34
    now we're going to move over
  • 5:34 - 5:36
    to this
  • 5:36 - 5:40
    um we're going to go into floor two
  • 5:40 - 5:41
    switch first and we're going to
  • 5:41 - 5:45
    configure the trunk so I'll see you over
  • 5:46 - 5:49
    there okay so now we've got we're on our
  • 5:49 - 5:51
    host we're configuring the switch and we
  • 5:51 - 5:55
    want to get this switch with a trunk
  • 5:55 - 5:58
    link going to this switch and in order
  • 5:58 - 6:00
    to do that as we did uh as we talked
  • 6:00 - 6:03
    about a few minutes ago or seconds
  • 6:03 - 6:08
    ago I moved I I made a connection from
  • 6:08 - 6:12
    this switch on gigabit Ethernet 02 to
  • 6:12 - 6:16
    gigabit Ethernet 02 on the other switch
  • 6:16 - 6:18
    so I'm going to connect a console cable
  • 6:18 - 6:20
    cuz I don't have SSH set up I will show
  • 6:20 - 6:23
    you how to set up SSH and make it much
  • 6:23 - 6:25
    easier than what I'm doing now in a
  • 6:25 - 6:27
    future video but for now let me just
  • 6:27 - 6:29
    connect
  • 6:29 - 6:31
    this I made the
  • 6:31 - 6:36
    connection and now we are on the second
  • 6:36 - 6:38
    floor
  • 6:38 - 6:42
    switch and the second floor switch
  • 6:42 - 6:45
    is going to be where we're going to
  • 6:45 - 6:48
    configure that trunk so I'm going into
  • 6:48 - 6:50
    Global configuration mode and then I'm
  • 6:50 - 6:52
    going to go to int
  • 6:52 - 6:54
    g02 and I'm going to type these this
  • 6:54 - 6:57
    command as simple as that switch Port
  • 6:57 - 7:02
    mode trunk enter we're putting that uh
  • 7:02 - 7:04
    that pour into trunking
  • 7:04 - 7:07
    mode It came it went down and came back
  • 7:07 - 7:10
    up again as we saw by the logs and then
  • 7:10 - 7:14
    we're going to explicitly Define which
  • 7:14 - 7:16
    trunks or I'm sorry we're going to
  • 7:16 - 7:20
    explicitly Define which VLS are going to
  • 7:20 - 7:23
    be allowed across the trunk link when I
  • 7:23 - 7:25
    think of trunks I think of them as like
  • 7:25 - 7:28
    toll bridges and you're only allowed if
  • 7:28 - 7:31
    your VLS tag is on the list right so I'm
  • 7:31 - 7:36
    going to do switch Port trunk allow VLAN
  • 7:36 - 7:40
    10 comma 20 we only want those two
  • 7:40 - 7:43
    across now this could be a good form of
  • 7:43 - 7:46
    layer 2 segmentation at this point where
  • 7:46 - 7:49
    if you believe that there's a vlm that
  • 7:49 - 7:51
    doesn't need to connect to a certain
  • 7:51 - 7:54
    switch or get to a certain segment of
  • 7:54 - 7:57
    your network you can actually exclude it
  • 7:57 - 7:59
    from that allow list and traffic won't
  • 7:59 - 8:03
    even be trunked across the link so I'm
  • 8:03 - 8:06
    going to type exit and I'm going to do a
  • 8:06 - 8:08
    command remember as I have been
  • 8:08 - 8:12
    reminding y'all configure and confirm
  • 8:12 - 8:14
    always make sure as you go so I'm going
  • 8:14 - 8:17
    to do show in
  • 8:17 - 8:20
    trunk and yep we there we go we got our
  • 8:20 - 8:24
    Trunks and it looks like our vlans 10
  • 8:24 - 8:27
    and 20 are allowed across that
  • 8:27 - 8:30
    trunk cool
  • 8:30 - 8:31
    now what I'm going to do is I'm going to
  • 8:31 - 8:33
    move
  • 8:33 - 8:37
    to this switch right here floor one so
  • 8:37 - 8:39
    I'm going to go back here grab this
  • 8:39 - 8:43
    console cable move it to the other
  • 8:43 - 8:46
    switch and in real life this might mean
  • 8:46 - 8:48
    I'm connecting to an access server that
  • 8:48 - 8:51
    already has console connections into it
  • 8:51 - 8:53
    and you can Google what an access server
  • 8:53 - 8:58
    is um also um I would if I didn't have
  • 8:58 - 9:00
    an access server I would would be
  • 9:00 - 9:02
    walking back down to that switch and
  • 9:02 - 9:04
    actually making that connection with my
  • 9:04 - 9:08
    laptop so you know when we talk about SS
  • 9:08 - 9:10
    if you don't already know what it is
  • 9:10 - 9:13
    you'll see why it's so important that
  • 9:13 - 9:15
    you know you set that up on switches so
  • 9:15 - 9:17
    that you can remotely connect to them
  • 9:17 - 9:19
    from where you're wherever you're at but
  • 9:19 - 9:20
    let's continue with this now I'm on the
  • 9:20 - 9:23
    first floor you should see it chain
  • 9:23 - 9:26
    switch Das first floor the naming
  • 9:26 - 9:29
    conventions of switches in my opinion
  • 9:29 - 9:31
    you should you should have somewhere in
  • 9:31 - 9:35
    there an indicator of where they are and
  • 9:35 - 9:38
    in in your organization and building and
  • 9:38 - 9:40
    where they are on the rack cuz as you
  • 9:40 - 9:43
    can see this network sandwich right here
  • 9:43 - 9:46
    it's got a bunch of stuff you know a
  • 9:46 - 9:49
    bunch of equipment uh stacked so it can
  • 9:49 - 9:52
    be hard to know what's what especially
  • 9:52 - 9:54
    if you don't have labels on them but if
  • 9:54 - 9:55
    you have a good naming convention and
  • 9:55 - 9:58
    labels it can really make it easier to
  • 9:58 - 10:00
    find devices especially in the of a
  • 10:00 - 10:03
    moment where all you know all you know
  • 10:03 - 10:06
    what is breaking loose and um you need
  • 10:06 - 10:09
    to troubleshoot things quickly so we're
  • 10:09 - 10:10
    going
  • 10:10 - 10:13
    into Global config mode I made sure to
  • 10:13 - 10:17
    connect to Gig 02 on this switch as well
  • 10:17 - 10:18
    but you're going to have to pay careful
  • 10:18 - 10:20
    attention to that in the real world is
  • 10:20 - 10:22
    what connections are going where and
  • 10:22 - 10:24
    then g02 I'm going to do basically the
  • 10:24 - 10:28
    same commands I just did switchport mode
  • 10:28 - 10:32
    trunk and switch Port trunk allow VLAN
  • 10:32 - 10:33
    10 comma
  • 10:33 - 10:38
    20 and I'm going to exit and do show in
  • 10:38 - 10:40
    trunk and we're going to see yep it's
  • 10:40 - 10:44
    trunking VLAN 10 and 20 how do I know
  • 10:44 - 10:46
    that this is working one thing I haven't
  • 10:46 - 10:50
    shown uh in this video is I set up DHCP
  • 10:50 - 10:53
    on this router beforehand and I trunk to
  • 10:53 - 10:56
    the router in in the next video I'm
  • 10:56 - 10:58
    going to show you what I did on this
  • 10:58 - 11:01
    router but for now just know DHCP is on
  • 11:01 - 11:04
    this router there's a trunk link from
  • 11:04 - 11:07
    this switch going here so that DHCP can
  • 11:07 - 11:11
    reach both both vs so if my connections
  • 11:11 - 11:13
    are all right and my configurations are
  • 11:13 - 11:18
    all right this PC should receive an IP
  • 11:18 - 11:22
    address on the 1921 16810 Network and
  • 11:22 - 11:26
    that Mac so the the PC on the first
  • 11:26 - 11:29
    floor should receive an IP address from
  • 11:29 - 11:33
    1 19 2 168 10 as well because in this
  • 11:33 - 11:36
    particular scenario we're testing if
  • 11:36 - 11:41
    remember two two different uh devices on
  • 11:41 - 11:43
    different floors can be connected to the
  • 11:43 - 11:45
    same
  • 11:45 - 11:47
    VLAN uh using trunking so we should get
  • 11:47 - 11:50
    those same IP so I'm going to test this
  • 11:50 - 11:54
    on my Windows system by doing CMD
  • 11:54 - 11:55
    opening that up I'll make sure you can
  • 11:55 - 12:00
    see it ip config let's see we don't have
  • 12:00 - 12:02
    one we're getting an aipa remember what
  • 12:02 - 12:05
    the apipa does aipa is a self assigned
  • 12:05 - 12:08
    IP address or automatic private IP
  • 12:08 - 12:10
    addressing and it essentially tells us
  • 12:10 - 12:12
    our computer did not get an IP address
  • 12:12 - 12:15
    from DHCP so we need to troubleshoot in
  • 12:15 - 12:17
    this case I know that I just need to go
  • 12:17 - 12:20
    ahead and do a re uh renew cuz I did a
  • 12:20 - 12:22
    release before I started the video so
  • 12:22 - 12:24
    I'm going to do renew and we're going to
  • 12:24 - 12:26
    wait on
  • 12:26 - 12:29
    that it should be doing the Dora process
  • 12:29 - 12:32
    it's going to request the IP address
  • 12:32 - 12:35
    from another
  • 12:35 - 12:37
    machine Let's
  • 12:37 - 12:42
    see or from the server on the
  • 12:42 - 12:47
    network sorry my track pad's acting
  • 12:50 - 12:53
    crazy and it looks like we did receive
  • 12:53 - 12:56
    one how do I know I got a 10.3
  • 12:56 - 12:59
    address so what I'm going to do is now
  • 12:59 - 13:02
    move move on over to the mac and we're
  • 13:02 - 13:05
    going to make sure that we get a 1 19
  • 13:05 - 13:09
    21681 address over on the Mac as well
  • 13:09 - 13:10
    which means we got to walk down some
  • 13:10 - 13:13
    stairs all right so now I'm back
  • 13:13 - 13:17
    downstairs I'm on uh floor one switch
  • 13:17 - 13:20
    we've got the trunk configured as I
  • 13:20 - 13:23
    showed and now we just want to make sure
  • 13:23 - 13:27
    that we're actually in Vin 10 and I'm
  • 13:27 - 13:29
    going to do that by going into the
  • 13:29 - 13:32
    network work settings on the
  • 13:32 - 13:35
    Mac and we're going to go and check and
  • 13:35 - 13:37
    make sure yeah so right there you see
  • 13:37 - 13:40
    using DHCP I always like to go manual
  • 13:40 - 13:42
    basically release
  • 13:42 - 13:45
    renew and just make sure it
  • 13:45 - 13:47
    works so that's basically requesting
  • 13:47 - 13:50
    another one and I got dot two and we
  • 13:50 - 13:52
    have successfully set
  • 13:52 - 13:57
    up a trun a basic trunk link between two
  • 13:57 - 14:01
    switches that allow us to be on two
  • 14:01 - 14:04
    machines to be on the same network but
  • 14:04 - 14:06
    they're not on the same switch they're
  • 14:06 - 14:08
    in the same Vin but they're not on the
  • 14:08 - 14:12
    same switch and just as a recap of how
  • 14:12 - 14:14
    these everything's
  • 14:14 - 14:17
    connected I'll grab yall come over here
  • 14:17 - 14:19
    and check this
  • 14:19 - 14:21
    out you you know you've got what I
  • 14:21 - 14:23
    didn't show is the configuration of the
  • 14:23 - 14:25
    router that'll be in the next video but
  • 14:25 - 14:30
    just so you know g0 is going to G 1 that
  • 14:30 - 14:35
    this g01 on floor 2 switch is a trunk
  • 14:35 - 14:39
    and then g02 is a trunk going to floor
  • 14:39 - 14:44
    one on uh g02 I actually did it on g02
  • 14:44 - 14:48
    as well CU g01 is going to the router so
  • 14:48 - 14:54
    g02 trunk to g02 allowing VL 10 and
  • 14:54 - 14:57
    20 and I've got my laptop which you see
  • 14:57 - 15:00
    the light has come turned off since I I
  • 15:00 - 15:05
    closed the laptop but you know it Port 1
  • 15:05 - 15:09
    through 12 had are in VLAN 10 on here
  • 15:09 - 15:13
    ports 1 through 12 on VLAN 10 up here so
  • 15:13 - 15:16
    this trunk is is essentially like a toll
  • 15:16 - 15:20
    bridge allowing VLS 10 and 20 now if I
  • 15:20 - 15:23
    tried to have a VLAN 30 and I didn't
  • 15:23 - 15:26
    allow it across this trunk and I had a
  • 15:26 - 15:29
    30 down here too we wouldn't have
  • 15:29 - 15:32
    connction C between those those devices
  • 15:32 - 15:36
    so that is trunking just the basics of
  • 15:36 - 15:38
    it I'm looking forward to seeing you in
  • 15:38 - 15:41
    the next video and don't forget to keep
  • 15:41 - 15:44
    learning
Title:
Learn VLANs & Trunking on Cisco Switches in Real Life
Description:

more » « less
Video Language:
English
Duration:
15:42

English subtitles

Revisions Compare revisions