hideHelp Amara.org break down language barriers and make media truly global by Donating to the Participatory Culture Foundation (PCF).
Join us in creating a more inclusive digital world!

< 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:12
    is a connection
  • 0:12 - 0:15
    between two network devices,
  • 0:15 - 0:17
    whether they're switches or routers,
  • 0:17 - 0:20
    that's carrying tag traffic,
  • 0:20 - 0:23
    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 VLANs 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 newerish
  • 0:57 - 1:00
    network equipment, Cisco.
  • 1:00 - 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:30
    those other administrative tasks.
  • 1:30 - 1:35
    So the first floor switch is right here.
  • 1:35 - 1:37
    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:44
    another floor
  • 1:44 - 1:47
    mounted to another rack
  • 1:47 - 1:48
    where this switch 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:00
    same VLAN, VLAN 10, for the back office
  • 2:00 - 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 VLANS, when you're setting up
  • 2:30 - 2:33
    trunking, 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:42
    prevents poor performance.
  • 2:42 - 2:44
    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
  • 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 want you to
  • 2:55 - 2:57
    help me in the comments.
  • 2:57 - 3:01
    If I am using gigabit 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 connect?
  • 3:11 - 3:14
    I'll show you now, but I want
  • 3:14 - 3:18
    you to challenge yourself so to
  • 3:18 - 3:21
    try to think of this on your own.
  • 3:21 - 3:23
    So I'm going to plug in right here,
  • 3:23 - 3:26
    this is gigabit 02,
  • 3:26 - 3:28
    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. 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 'cus switches are normally
  • 3:51 - 3:53
    plug and play, where routers you got to
  • 3:53 - 3:56
    turn the ports on.
  • 3:56 - 3:58
    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 computers on floor two. 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:28
    going to plug that in
  • 4:28 - 4:30
    And in real life, this might be for
  • 4:30 - 4:31
    the employees
  • 4:31 - 4:34
    workstations, could be for Voice over IP
  • 4:34 - 4:39
    phones, all the things in their office, right?
  • 4:39 - 4:42
    The same is true for floor- 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, 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, I'm going to
  • 5:05 - 5:09
    connect floor one,
  • 5:10 - 5:12
    which I've also happened to
  • 5:12 - 5:15
    configure VLAN 10 on, and it has ports
  • 5:15 - 5:17
    one through
  • 5:17 - 5:21
    10 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 to
  • 5:34 - 5:36
    this.
  • 5:37 - 5:40
    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 there.
  • 5:47 - 5:49
    Okay, so now 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 earlier, as we talked
  • 6:00 - 6:04
    about a few minutes ago or seconds ago,
  • 6:04 - 6:08
    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
    'cus 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:30
    connect this.
  • 6:30 - 6:32
    I made the connection,
  • 6:32 - 6:36
    and now we are on the second
  • 6:36 - 6:39
    floor switch.
  • 6:39 - 6:41
    And the second floor switch
  • 6:41 - 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:53
    going to go to int g02.
  • 6:53 - 6:54
    And I'm going to type this
  • 6:54 - 6:57
    command, as simple as that, switch port
  • 6:57 - 7:02
    mode trunk, enter. We're putting that
  • 7:02 - 7:05
    that port into trunking mode.
  • 7:05 - 7:07
    It went down and came back
  • 7:07 - 7:10
    up again, as we saw by the logs. And then
  • 7:10 - 7:13
    we're going to explicitly define which
  • 7:13 - 7:16
    trunks, or I'm sorry, we're going to
  • 7:16 - 7:20
    explicitly define which VLANs 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 VLANs 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 VLAN 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 int trunk.
  • 8:17 - 8:20
    And yep, 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 trunk,
  • 8:27 - 8:30
    cool.
  • 8:30 - 8:31
    Now what I'm going to do is I'm going to
  • 8:31 - 8:33
    move to
  • 8:33 - 8:37
    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 switch.
  • 8:43 - 8:46
    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:55
    And you can Google what an access server is.
  • 8:55 - 8:58
    Also, if I didn't have
  • 8:58 - 9:00
    an access server, I 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 SSH,
  • 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 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 change
  • 9:23 - 9:26
    switch dash first floor. The naming
  • 9:26 - 9:29
    conventions of switches, in my opinion,
  • 9:29 - 9:31
    you should have somewhere in
  • 9:31 - 9:35
    there an indicator of where they are
  • 9:35 - 9:38
    in your organization and building, and
  • 9:38 - 9:40
    where they are on the rack. 'Cus 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 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 heat of a
  • 10:00 - 10:03
    moment where all you know
  • 10:03 - 10:06
    what is breaking loose, and you need
  • 10:06 - 10:09
    to troubleshoot things quickly. So we're
  • 10:09 - 10:11
    going into
  • 10:11 - 10:13
    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:34
    10 comma 20.
  • 10:34 - 10:37
    And I'm going to exit and do show int
  • 10:37 - 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 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 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 VLANs. 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 19216810 network. And
  • 11:22 - 11:26
    that MAC, so the PC on the first
  • 11:26 - 11:29
    floor, should receive an IP address from
  • 11:29 - 11:33
    19216810 as well, because in this
  • 11:33 - 11:36
    particular scenario, we're testing if,
  • 11:36 - 11:41
    remember, two different devices on
  • 11:41 - 11:43
    different floors can be connected to the
  • 11:43 - 11:46
    same VLAN
  • 11:46 - 11:47
    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, ipconfig, let's see. We don't have
  • 12:00 - 12:02
    one, we're getting an APIPA. Remember what
  • 12:02 - 12:05
    the APIPA does? APIPA 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 renew 'cus 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:27
    wait on that.
  • 12:27 - 12:29
    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 machine.
  • 12:35 - 12:38
    Let's see.
  • 12:38 - 12:42
    Or from the server on the network.
  • 12:43 - 12:47
    Sorry, my trackpad's acting crazy.
  • 12:51 - 12:53
    And it looks like we did receive
  • 12:53 - 12:55
    one, how do I know? I got a 10.3
  • 12:55 - 12:59
    address. So what I'm going to do is now
  • 12:59 - 13:02
    move on over to the MAC, and we're
  • 13:02 - 13:06
    going to make sure that we get a 19216810
  • 13:06 - 13:09
    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 floor one switch,
  • 13:17 - 13:19
    we've got the trunk configured as I
  • 13:19 - 13:23
    showed. And now we just want to make sure
  • 13:23 - 13:27
    that we're actually in VLAN 10, and I'm
  • 13:27 - 13:29
    going to do that by going into the
  • 13:29 - 13:32
    network settings on the MAC.
  • 13:33 - 13:35
    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:41
    basically release,
  • 13:41 - 13:46
    renew, and just make sure it works.
  • 13:46 - 13:47
    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 up
  • 13:52 - 13:57
    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 VLAN, but they're not on the
  • 14:08 - 14:12
    same switch. And just as a recap of how
  • 14:12 - 14:15
    everything's connected,
  • 14:15 - 14:17
    I'll grab yall, come over here
  • 14:17 - 14:19
    and check this out.
  • 14:19 - 14:21
    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, g00 is going to g01, that
  • 14:30 - 14:35
    this g01 on floor 2 switch is a trunk.
  • 14:35 - 14:38
    And then g02 is a trunk going to floor
  • 14:38 - 14:44
    one on g02. I actually did it on g02
  • 14:44 - 14:48
    as well 'cus g01 is going to the router, so
  • 14:48 - 14:55
    g02 trunk to g02 allowing VLANs 10 and 20.
  • 14:55 - 14:57
    And I've got my laptop, which you see
  • 14:57 - 15:00
    the light has come turned off since I
  • 15:00 - 15:05
    closed the laptop, but, you know, port 1
  • 15:05 - 15:09
    through 12 are in VLAN 10 on here.
  • 15:09 - 15:13
    Ports 1 through 12 are on VLAN 10 up here. So
  • 15:13 - 15:16
    this trunk is is essentially like a toll
  • 15:16 - 15:20
    bridge allowing VLANs 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
    connection between 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