-: Network infrastructure devices. 2 2
Now, for the Network+ exam, 3 3
you have to be able 4 4
to identify network infrastructure devices. 5 5
This means, you have to identify their icons, 6 6
as well as knowing what they do, 7 7
what broadcast domains they're going to break up, 8 8
and what collision domains they're going to break up. 9 9
We're going to talk about all of that in this lesson. 10 10
Now, the primary devices that we use 11 11
in our networks today are routers and switches. 12 12
These devices actually evolve from bridges and hubs. 13 13
And we're going to talk about this by starting out with hubs 14 14
and working our way towards more modern things. 15 15
Now, as we look at hubs, 16 16
hubs are a layer 1 device, 17 17
they are a physical device. 18 18
They're used to connect multiple network devices 19 19
and workstations together. 20 20
You can identify them by a square icon 21 21
with an arrow pointing in both directions 22 22
when you see them on a chart. 23 23
These are known as multiport repeaters. 24 24
Now, there are basically three different types of hubs. 25 25
We have passive hubs, active hubs, and smart hubs. 26 26
A passive hub is simply going to repeat the signal, 27 27
but it's going to give no amplification. 28 28
Think about this like a splitter, 29 29
if I have an 8-port hub and something comes in one port, 30 30
it's going to go ahead and pass it out 31 31
to all the other ports, ports two through seven. 32 32
Now, if I have an active hub, 33 33
it's going to do exactly the same thing. 34 34
But the difference is 35 35
it's going to take the signal that got in, 36 36
and it's going to boost it back up, and then send it out. 37 37
Now, what I mean here when I talk about boosting the signal 38 38
is trying to overcome that 100-meter limitation 39 39
that we have with twisted pair cabling. 40 40
Because twisted pair can only go 100 meters, 41 41
if you hit a passive hub, guess what? 42 42
That's still part of your 100 meters. 43 43
So, if I have a 100-meter cable, 44 44
a passive hub, and a 50 meter cable, 45 45
it treats it like it's 150-meter cable, 46 46
and your network's not going to work well. 47 47
So, if you need to go long distances, you need an active hub, 48 48
because it gets power, takes that signal in, 49 49
boosts it back up, and restarts that 100-meter count for you. 50 50
Now, for example, my office building here 51 51
is 300 meters in length. 52 52
I can only go 100 meters with Cat 5, right? 53 53
So, I might go 60 or 70 meters, 54 54
and then put an active hub in there, 55 55
then, I can go another 60 or 70 meters, 56 56
put another active hub in there, 57 57
then go another 60 or 70 meters, put an active hub in there. 58 58
And every time I do it, it restarts that 100-meter limit. 59 59
Now, notice I only went 60 to 70 meters 60 60
and then put the hub in there. 61 61
Why is that? 62 62
Well, it's just the best practice. 63 63
If you only use 60 to 70% of that cable length, 64 64
it's going to make sure 65 65
you're not coming up towards that 100 meters, 66 66
because sometimes you just don't count things right, 67 67
and you might go over 68 68
and then your network's going to have problems. 69 69
So, I like to keep it much further away than 100 meters. 70 70
But again, if you're using a passive hub, 71 71
all of those connections would have been added together 72 72
and it would have had about 300 meters of cable 73 73
and it wouldn't work. 74 74
Now, if I had three 60s in there, 75 75
that's going to be 180 meters of cable, right? 76 76
But if I put that active hub in there each time, 77 77
I have 60 and 60 and 60. 78 78
And so it's not 180. 79 79
It's three 60s that way. 80 80
Now, the third thing we talked about is a smart hub, 81 81
and a smart hub is an active hub, 82 82
but it has enhanced features 83 83
like Simple Network Management Protocol 84 84
so that I can actively control that hub 85 85
and configure it from a distance. 86 86
It's not just a dumb device, 87 87
but it adds a little bit of intelligence this way. 88 88
Overall though, in modern networks, 89 89
you are not going to see hubs. 90 90
Almost exclusively, we're going to use switches. 91 91
And I'm going to show you why in just a few minutes. 92 92
The next thing we need to talk about here though, 93 93
is collision domains. 94 94
When I talk about a hub, it is a layer 1 device. 95 95
And like I said, it's dumb. 96 96
All it does is repeat what it's told. 97 97
And because it can be used 98 98
to connect multiple network segments together, 99 99
guess what we do? 100 100
We're actually going to make a bigger collision domain 101 101
by doing that. 102 102
Let's say we want to take five or six computers 103 103
and make them all talk together. 104 104
Well, we need a hub to do that. 105 105
Each LAN segment then becomes a separate collision domain. 106 106
But hubs don't break up collision domains. 107 107
Instead, they connect them. 108 108
So, if I use this diagram here, 109 109
you can see that there are two 4-port hubs. 110 110
I have three machines on the left side, 111 111
and they're talking to one hub. 112 112
I have two machines on the right side, 113 113
and they're talking to their hub. 114 114
And the hubs are communicating together. 115 115
This is as if all of these devices 116 116
were on one long bus cable, 117 117
they're all treated as one large collision domain. 118 118
And that becomes a big issue as we get into bigger networks, 119 119
and we start putting in a 24-port hub or a 48-port hub, 120 120
because all these machines start to talk at the same time, 121 121
and we're going to have a lot of collisions. 122 122
So, how do I fix that? 123 123
Well, that introduces the concept of a bridge. 124 124
A bridge is going to analyze 125 125
the source MAC address in the frame, 126 126
and it's going to populate an internal MAC address table. 127 127
Based on that table, it's going to make forwarding decisions 128 128
based on the destination MAC in those frames 129 129
because this is a layer 2 device. 130 130
In our earlier example, we had six machines on two hubs, 131 131
I can now put a bridge in between them 132 132
and break them up into two pieces. 133 133
This information will allow it to only go across 134 134
when it needs to based on its MAC address. 135 135
If instead it just wants to talk to another PC 136 136
that's on the hub it's sharing, 137 137
it never even has to go to that bridge. 138 138
And those three machines on the left 139 139
will never hear the communication. 140 140
This adds security and efficiency to our network 141 141
and it breaks up that collision domain into two parts. 142 142
If I take a hub and I take a bridge 143 143
and I marry them together, guess what I get? 144 144
I get a switch. 145 145
A switch is a layer 2 device just like a bridge. 146 146
It's used to connect multiple network segments together, 147 147
just like a hub. 148 148
Essentially, I want you to think of a switch 149 149
as a multiport bridge. 150 150
It's going to have every single port 151 151
act as if it was a hub with a bridge on every port. 152 152
This way, it breaks up the collision domain 153 153
into a single collision domain for each and every port. 154 154
It's going to learn the MAC addresses 155 155
of the things that are touching that port. 156 156
And it's going to make forwarding decisions 157 157
based on those MAC addresses, just like a bridge would. 158 158
It's going to analyze the source MAC address 159 159
and then it's going to decide where to send the information 160 160
based on its internal table, just like a bridge would. 161 161
So, when I have a switch, each port on there 162 162
is going to represent an individual collision domain. 163 163
But everything on that switch 164 164
is all part of the same broadcast domain. 165 165
And we'll talk more about this as we go through this lesson 166 166
and we go through this section. 167 167
Now, let's talk about how this works in the real world 168 168
when we're dealing with a switch. 169 169
Now, let's say we have, 170 170
I'm sitting here at PC1, 171 171
and I want to take remote control of the server 172 172
by using SSH or Secure Shell. 173 173
Well, how can I do that? 174 174
Well, if I'm sitting here on PC1, 175 175
and I have a MAC address, let's say of 12 Bs. 176 176
I want to talk to the server 177 177
who has a MAC address of all 12 Cs. 178 178
I'm going to refer to PC1's MAC address as BB, 179 179
and server's MAC address as CC, for simplicity's sake, 180 180
as I go through and talk in this lesson. 181 181
Now, notice I have the switch tables at the bottom 182 182
and right now, they're empty. 183 183
They don't even know who's connected to them, 184 184
but when PC1 talks the first time, 185 185
its MAC address at BB says to switch one, 186 186
"Hey, I want to talk to server CC." 187 187
So, it sends out a thing called an ARP packet. 188 188
That ARP packet is going to go to switch one 189 189
and check its table. 190 190
If the table sees it and says, 191 191
"Well, I don't know how to get to CC. 192 192
So, I'm going to push out that ARP packet 193 193
to every other port that I have on my switch 194 194
and see if I can find it for you." 195 195
Now, before the switch starts 196 196
pushing that information out to try to find CC, 197 197
it does know one thing for certain. 198 198
It knows where BB is because it just talked to it. 199 199
So, since BB came up on port 0/1, 200 200
it wants to put that in its table, 201 201
and then it's going to push out 202 202
the ARP packet to everyone else. 203 203
So, PC2 then says, 204 204
"Hey, I'm not CC, so I'm going to ignore you". 205 205
PC5 goes, 206 206
"I'm not CC", and it ignores the switch, as well. 207 207
Switch two goes, 208 208
"I don't know who CC is, 209 209
but even though it's not my MAC address table, 210 210
I'll forward that out to all the other people 211 211
on my switch and see if I can find it." 212 212
That's the idea here. 213 213
That's what we do with a broadcast. 214 214
So, it sends it out to its broadcast domain, 215 215
which has PC3, PC4, and server. 216 216
And the ARP packet goes out 217 217
and it goes, "Hey, I also learned 218 218
that switch one knows where BB is. 219 219
So, I'm going to put that in my port table. 220 220
So, if people ask me for BB 221 221
I know who to talk to." 222 222
And as the ARP goes out, 223 223
it goes out to all of the servers and all of the PCs, 224 224
the server goes, "Oh, hey, I'm CC." 225 225
So, it responds with an ARP packet back to switch two 226 226
and says, "Hey, CC? 227 227
That's me. 228 228
You should send me all that traffic." 229 229
So, what is switch two going to do? 230 230
It's going to populate its table with CC being on port two, 231 231
and it forwards that back to the requester on switch one. 232 232
When switch one gets it, it populates its table 233 233
and pushes it back to the requester at PC1. 234 234
At this point, every one in the network 235 235
got query to say, "Who is CC?" 236 236
And that was a lot of traffic 237 237
to figure out who the server was. 238 238
That worked pretty much just like a hub, right? 239 239
But at this point, 240 240
everybody now knows where CC is and BB is. 241 241
And so now that we know that, 242 242
when PC1 sends out the SSH packet 243 243
and says, "I want to talk." 244 244
Guess what happens? 245 245
It goes to switch one 246 246
and instead of bugging everybody, 247 247
switch one only sends it out port 0/2 248 248
because it knows that is where CC was. 249 249
That gets to switch two and when switch two gets it, 250 250
it's going to send it out it's port 0/2, 251 251
because it knows that's where server was. 252 252
So, now we have a two-way connection that's been established 253 253
between the PC and the server through those two switches. 254 254
And all the other PCs out there, 255 255
PC2, PC3, PC4, and PC5, 256 256
they don't hear any of this 257 257
and they operate on their own 258 258
without dealing with that SSH traffic. 259 259
So, we have just minimized 260 260
the amount of bandwidth that's been eaten up 261 261
by five or six times 262 262
because we removed all that extraneous information 263 263
and all the extraneous equipment from this equation. 264 264
This is why switches improve our network performance 265 265
and our security so much. 266 266
And at this point, switch one and two 267 267
are only sending out the traffic 268 268
between PC1 and server across one line. 269 269
So, PC2, PC3, PC4, PC5 never hear it 270 270
and if PC2 and PC3 want to start talking, 271 271
they could at the same time 272 272
because these switches also support full duplex. 273 273
And so, I can have a communication 274 274
between the server and PC1 275 275
and another separate communication 276 276
between PC2 and PC3. 277 277
And it's not going to disturb each other. 278 278
This is where our efficiency comes in 279 279
when we deal with switching. 280 280
Now, the next thing we have to deal with is a router. 281 281
Because when we deal with switches, 282 282
we're dealing with layer 2 devices, 283 283
we're dealing with MAC addresses, right? 284 284
That's not going to help us if we go across to the Internet. 285 285
And so, if we want to connect two dissimilar networks, 286 286
like an internal network and an external network, 287 287
i.e. your LAN and the Internet, 288 288
then we need to make routing decisions. 289 289
To make these forwarding decisions, 290 290
also known as routing decisions, 291 291
this is going to be based on logical network information, 292 292
such as IPv4 or IPv6. 293 293
And switches aren't aware of that. 294 294
Switches only know about layer 2 and MAC addresses. 295 295
Routers are all about layer 3 and IP addresses. 296 296
Routers are much more feature-rich 297 297
and they support a broader range of interface types, as well. 298 298
And so, you might have a router that has a serial port on it. 299 299
It might have a copper RJ45 port on it, 300 300
it might have an ST fiber connector on it, 301 301
you might have a GBIC or an SPF or a QSPF on it. 302 302
These all have multiple connectors 303 303
where we can use a router 304 304
to connect different networks 305 305
and even different types across them. 306 306
Switches, on the other hand, tend to be all one. 307 307
They're either all fiber or all copper, 308 308
depending on which one you buy. 309 309
Now, routers have one distinct advantage over a switch. 310 310
And this is that they can actually 311 311
separate out broadcast domains. 312 312
Now, going back to our earlier example, 313 313
I had three PCs on the left and two on the right. 314 314
They're talking to those two switches. 315 315
Now, if the router wasn't there, 316 316
this would be just one big broadcast domain 317 317
with five collision domains in it. 318 318
Now, because I put a router in there, 319 319
I actually have two separate broadcast domains. 320 320
And that's going to help me reduce the traffic 321 321
and reduce the noise. 322 322
Now, this is going to lead 323 323
to a lot of efficiency in our networks. 324 324
We're not going to get into how routers work 325 325
at this particular point in time. 326 326
We will dig into that later in a separate lesson 327 327
because there is a lot to cover there. 328 328
Now, another thing you may come across 329 329
is what's known as a layer 3 switch. 330 330
And this tends to confuse a lot of students 331 331
because when we talk about switches being layer 2, 332 332
and routers being layer 3, 333 333
it's a lot cleaner and easier. 334 334
But over time, they decided to make these things 335 335
and make these things called layer 3 switches, 336 336
which really muddy the waters. 337 337
Now, just like we took hubs and bridges, 338 338
and we combine them to make a switch, 339 339
well, somebody got the idea 340 340
of taking a switch and a router and combining them, 341 341
and they call that a layer 3 switch. 342 342
Layer 3 switches are layer 3 devices 343 343
that are used to connect multiple networks together, 344 344
and they can perform routing functions. 345 345
Now, they can do routing decisions, just like a router. 346 346
And they can connect network segments, just like a switch. 347 347
Because they act like a router, 348 348
each of their ports is going to act 349 349
as its own broadcast domain and its own collision domain. 350 350
This is a really efficient way of doing things 351 351
on an internal network 352 352
because you can use these layer 3 switches 353 353
and do things quickly. 354 354
Now, if you have a very large network though, 355 355
I would not recommend 356 356
using layer 3 switches as your router 357 357
because they're not as efficient at routing 358 358
as a dedicated router would be. 359 359
If you're in a small office or a home office environment, 360 360
and you have 20 or 30 machines, 361 361
you can replace a router and a switch 362 362
with a single layer 3 switch. 363 363
And that will work well and save you some money 364 364
because they are cheaper than having two devices 365 365
cause you only need one. 366 366
But if you're going to be in a very large network, 367 367
I do prefer having a dedicated router 368 368
because they are much faster 369 369
for large scale routing operations. 370 370
Now, the last thing I want to talk about here on the screen 371 371
is that I have a nice little summary chart for you 372 372
that's going to show you the five types of devices 373 373
that we just talked about. 374 374
We talked about hubs and bridges, 375 375
switches, multilayer switches, 376 376
also known as layer 3 switches, and routers. 377 377
It'll show you 378 378
all the possible collision domains that they have 379 379
and the possible broadcast domains that they have. 380 380
Remember, hubs are just like one shared cable, 381 381
one collision, one broadcast, 382 382
whereas a bridge adds a collision domain 383 383
for each port on that bridge, 384 384
and it still has one broadcast. 385 385
A switch is just like a bridge 386 386
and so it has one per port and one broadcast domain. 387 387
Routers and multilayer switches operate the same way 388 388
so you have one port that is a collision domain 389 389
and one port is also a broadcast domain. 390 390
Now, you can see the layer of operations 391 391
here on the right side. 392 392
Hubs are operating at layer 1, 393 393
bridges and switches operate layer 2, 394 394
multilayer switches also known as layer 3 switches 395 395
and routers operate at layer 3. 396 396
Now, one last thing I want to talk about 397 397
with multilayer switches or layer 3 switches, 398 398
and it's for the exam. 399 399
For the exam, I want you to remember 400 400
that anytime they mention a switch, 401 401
they are talking almost exclusively 402 402
about a layer 2 switch. 403 403
Whenever you hear the word switch on the exam, 404 404
always be thinking layer 2 devices 405 405
that are focused on MAC addresses. 406 406
If you hear routers, those are layer 3 devices 407 407
and they're focused on IP addresses. 408 408
Now, the only exception to this rule 409 409
is if the test specifically states in the question 410 410
the phrase multilayer switch or layer 3 switch. 411 411
If they use those terms of multilayer switch 412 412
or a layer 3 switch, 413 413
then, you can treat it like a router. 414 414
Otherwise, always treat a switch 415 415
as a layer 2 device for the exam. 416 416
This trips up a lot of my students 417 417
who are used to dealing 418 418
with switches and routers in the real world 419 419
because most switches you're going to buy nowadays 420 420
in a small office home office environment 421 421
are going to be layer 3 or multilayer switches. 422 422
But for the exam, a switch is a layer 2 device.