-: The next major concept that we need to cover 2 2
is that of a virtual local area network, 3 3
also known as a VLAN. 4 4
Now, we talked about switch ports all being 5 5
on a single broadcast domain. 6 6
And to break them up, we have to use a layer three switch 7 7
or a router to do that. 8 8
Well, VLANs allow you to break out certain ports 9 9
to be used for different broadcast domains, 10 10
just like you would if you had a virtual router. 11 11
Now, before VLANs, we had to use additional routers 12 12
and cables and switches to separate out 13 13
our different departments and our different functions 14 14
and our different subnets, but with the advent of a VLAN 15 15
with layer three switching, 16 16
you can have this inside of layer three switching 17 17
or even some layer two switches. 18 18
This allows you to have a different logical network 19 19
that share the same physical hardware. 20 20
This is going to provide you with a lot of additional security 21 21
and efficiency that you don't get with using everything 22 22
in a single broadcast domain on a standard layer two switch. 23 23
Now, back before we had VLANs, you had diagrams 24 24
that look like this. 25 25
Let's say I had the IT department 26 26
and the human resource department, 27 27
and I wanted to keep them separate for security. 28 28
Well, if I wanted to do that, 29 29
I had to plug them into different switches, 30 30
and then have different routers 31 31
and be able to route the traffic between those two networks. 32 32
Now, if I had the IT and the HR on floors one and two, 33 33
I might have to have switch one and switch three 34 34
on the second floor and switch two and switch four 35 35
on the bottom floor. 36 36
And so, now I have double the equipment 37 37
to maintain this logical separation. 38 38
And in this case, I also had physical separation too, 39 39
because I had four different switches 40 40
for those two floors and those two departments. 41 41
Now, with virtual local area networks, or VLANs, 42 42
I can consolidate all of that into just two switches, 43 43
one for the first floor and one for the second floor. 44 44
And then, I can logically separate out the traffic 45 45
into each of those virtual networks. 46 46
Notice that the IT department is cabled into the switch 47 47
and logically, it trunks down from switch one 48 48
into switch two and then down into our router 49 49
and it keeps everything logically separate 50 50
as shown by this color scheme. 51 51
Now, either with these different switch ports 52 52
and they're in different LANs, 53 53
they're also going to be in the same physical hardware though, 54 54
and they're writing the exact same cable. 55 55
That's how you can see this purple and blue cable 56 56
going from a switch to down to the router, 57 57
it's actually only one cable, 58 58
but logically in this diagram, they are going to be 59 59
two separate logical cables, right? 60 60
But in real life, it is really one cable. 61 61
This is the idea of doing VLAN trunking. 62 62
And to do this, we use this protocol called VLAN trunking 63 63
known as 802.1Q. 64 64
So, I want you to write that down in your note sheet, 65 65
802.1Q is for VLAN trunking. 66 66
Now, this is what happens when you merge 67 67
all that data onto a single cable, we call it a trunk. 68 68
Now, since we have multiple VLANs, 69 69
and they're all going over the same cable, 70 70
we have to have a way to identify them. 71 71
This again is reducing the amount of physical infrastructure 72 72
cables and switches and routers that we need, 73 73
while still giving us the logical separation that we desire. 74 74
With VLAN trunking using 802.1Q, 75 75
this is something you need to be able to recognize 76 76
for test day and you want to make sure 77 77
that you have it written down 78 78
because it's a really important concept. 79 79
Now, the way we identify the different VLANs 80 80
that are going over this trunk is by using an electronic tag 81 81
that is four bytes long and it's called a 4-byte identifier. 82 82
Now, there are two pieces to that. 83 83
We have the TPI and the TCI. 84 84
The TPI is the tag protocol identifier, 85 85
and the TCI is the tag control identifier. 86 86
When you have one VLAN and it's left untagged, 87 87
that becomes your native VLAN, 88 88
also referred to as VLAN zero. 89 89
Now, you can see the packets here on the screen 90 90
and again, you don't have to memorize 91 91
the way these packets are laid out. 92 92
This is just a graphical depiction to show you what 802.1Q 93 93
actually looks like in the real world. 94 94
What you really need to know about VLANs 95 95
is that they are great for security, 96 96
and if you're using VLAN trunking, 97 97
your 802.1Q is your standard for VLANs.