-: Now that we're at the network layer, 2 2
we're concerned with routing. 3 3
Layer 3 is all about how we're going to forward traffic, 4 4
which we refer to as routing using logical addresses. 5 5
For example, your computer has an IP address. 6 6
And that IP address is either going to be an IP version 4 7 7
or an IP version 6 address, or both. 8 8
Now, both of these are considered layer 3 protocols. 9 9
And we're going to talk more about them 10 10
as we go through this course. 11 11
Now, the other thing we're going to be concerned with here 12 12
is logical addressing. 13 13
I mentioned that IPv4 and IPv6 14 14
are two types of logical addresses, 15 15
but they're not the only logical addressing schemes 16 16
that are out there. 17 17
They're just the most common and most popular these days. 18 18
Now, we're also going to be concerned 19 19
with what's known as switching. 20 20
And here, when we talk about switching, 21 21
we're actually talking about layer 3 switching, 22 22
which is called routing. 23 23
Now, I know this gets confusing 24 24
because you're using the term switching 25 25
to refer to the function of routing, 26 26
and when we talk about switches, 27 27
the devices being layer 2 devices. 28 28
So, you have to keep this straight in your head. 29 29
Switches, the physical device, are layer 2. 30 30
Switching is another term for routing, 31 31
which is how we transfer things 32 32
at the network layer, layer 3. 33 33
Now, as we talk about all these, another thing that comes up 34 34
is how we're going to do route discovery and selection. 35 35
Now, basically, that means how do I know 36 36
which way I want the traffic to go? 37 37
We're going to talk a little bit more about that, too, 38 38
as we go through this lesson 39 39
because we're going to talk about connection services 40 40
and bandwidth utilization and multiplexing strategies. 41 41
All of these is at the layer 3 of the network layer. 42 42
So, to start diving in deeper into these concepts, 43 43
let's start out with logical addresses. 44 44
There are lots of different routed protocols 45 45
that have been used over the years. 46 46
Back in the '80s and '90s, 47 47
there was AppleTalk for Apple computers. 48 48
And if you used a Windows or a Novell Network computer, 49 49
you might have used IPX, 50 50
which was the Internetwork Packet Exchange. 51 51
Now, neither of these two are important 52 52
for the Network+ certification, 53 53
but it is something that I want to bring up 54 54
because you may hear these terms. 55 55
Really, what happened was these were both killed off 56 56
by Internet Protocol, which is known as IP. 57 57
This became the common protocol that everyone uses 58 58
on all networks and therefore, 59 59
we didn't need AppleTalk and we didn't need IPX anymore. 60 60
But the point is, at layer 3, it's not just IP. 61 61
There are other protocols that you could use in layer 3. 62 62
IP is just the most common. 63 63
Now, some of those are still existing 64 64
on some legacy systems, 65 65
which means old systems in some corporate network. 66 66
But the routing protocol of the Internet that we use 67 67
and the Internet you have at home 68 68
and the network you have at home is going to be known as IP. 69 69
IP comes in two variants, as I said before, IPv4 and IPv6. 70 70
Now, if you look on the screen here, 71 71
there's an example of an IP address. 72 72
It's written as 172 73 73
.16 74 74
.254 75 75
.1. 76 76
Now, we're going to look at more IP addresses 77 77
in a separate lesson as we dig deeper into routing later on. 78 78
For the time being, I want you to think of an IP address 79 79
anytime you see a number that looks like this. 80 80
There's going to be four sets of numbers, separated by dots. 81 81
This is called a dotted-octet notation, 82 82
and this is what an IPv4 address is going to look like. 83 83
Now, how shall we actually forward 84 84
or route the data across our networks? 85 85
This is really the big question at layer 3. 86 86
And there are three main ways for us to do this. 87 87
You can use packet switching, 88 88
circuit switching, or message switching. 89 89
The most commonly used one in your network 90 90
is going to be routing, 91 91
which is also known as packet switching. 92 92
This is where data is divided into packets 93 93
and then each packet is forwarded on 94 94
based on its IP address. 95 95
Now, when I think of routing, I like to think about this 96 96
as if I'm going to write a letter and send it to my mom. 97 97
Let's say I put that letter in an envelope, 98 98
and on the outside of the envelope, 99 99
I'm going to write the address of my mom on it. 100 100
I put her city and her state and the zip code. 101 101
Now, I put that in the mailbox, 102 102
and the mail carrier is going to take it to a central location. 103 103
Here, they're going to figure out what state it goes to 104 104
and then, they're going to send it to that state's post office. 105 105
Once it's in that state, it's going to go down even further, 106 106
and they're going to go down to the city-level post office. 107 107
And then, from that city-level post office, 108 108
they're going to look at where the street address is, 109 109
get it to the right street, 110 110
and eventually get it to her house on that street. 111 111
The same kind of concept works with IP addresses. 112 112
And that's the idea here. 113 113
It's going to keep going and switching that packet 114 114
from place to place until it gets to its final destination. 115 115
In the case of my envelope, to my mom's address. 116 116
Now, that's the way that packet switching 117 117
is going to work for us. 118 118
Every time I send a letter out, 119 119
it might take a different route to get there. 120 120
And I really don't care which route it takes, 121 121
as long as it gets to its final destination. 122 122
It's the same thing with our packets in the network. 123 123
When I talk about circuit switching, though, 124 124
this is where we want to have 125 125
the same path each and every time. 126 126
We're going to get a dedicated communications link 127 127
that's established between our two devices. 128 128
And if I pick up the phone to make a phone call, 129 129
I'm actually going to make a virtual connection from my phone 130 130
over to the other receiver's phone on the other end. 131 131
So, if I pick up the phone to call you, 132 132
there's going to be a temporary connection made 133 133
between my phone and your phone, 134 134
and all of the data that we're talking back and forth 135 135
will go across the same path to get from me to you. 136 136
The whole time we have this conversation going on, 137 137
that's what's going to happen. 138 138
That's what we call a circuit switch connection, 139 139
which is different than the packet switch connection 140 140
of using an envelope where we don't care 141 141
where all those envelopes go 142 142
as long as they got to the right place at the end. 143 143
Now, when we hang up the phone 144 144
and we go to make another call, 145 145
it could take a different path, and that's okay. 146 146
But for the entire session of us having our phone call, 147 147
we want the same path, 148 148
and that's what circuit switching allows us to do. 149 149
Now, the third type of switching we have 150 150
is known as message switching. 151 151
And with message switching, 152 152
this is where all the data is divided into messages, 153 153
and they're similar to packet switching in this idea. 154 154
But the messages can actually be stored 155 155
and forwarded, more like email. 156 156
So, if you go back to my mail example, 157 157
maybe it gets to my mom's state, 158 158
but the post office is closed because it's Sunday. 159 159
So, what happens is they drop 160 160
all those envelopes on the floor. 161 161
Now, it's going to be held there until they open again 162 162
on Monday and somebody's going to be able to pick it up, 163 163
figure out where it goes, and push it along. 164 164
This is what happens 165 165
when you're dealing with message switching 166 166
because it has a store and forward capability. 167 167
If we were using just packet switching, 168 168
what would end up happening is if it got to the post office 169 169
and the post office was closed, 170 170
it would actually just shred that envelope 171 171
and nobody would ever see it. 172 172
That's a bad thing if we want to make sure 173 173
the data is going to get where it's going, 174 174
and that's why message switching can be very useful for us. 175 175
Now, almost all of our networks nowadays 176 176
and the ones you utilize 177 177
are going to be using packet switching, though. 178 178
And the reason is we have other methods that will check 179 179
if something is not getting to the distant end, 180 180
and will be resent over another path 181 181
until it finally gets there. 182 182
So, unless you're dealing 183 183
with some kind of big backend networks, 184 184
you're not really going to see something like circuit switching 185 185
or message switching in your normal everyday networks. 186 186
Your home network, my small office network, 187 187
and most of the Internet 188 188
actually works using packet switching. 189 189
Now, the second thing we have to talk about 190 190
is route discovery and selection, 191 191
how are we going to decide which path 192 192
we're going to take to send that message. 193 193
Well, routers are going to maintain a routing table 194 194
so, they can understand how to forward a packet 195 195
based on the destination IP of where it wants to get to. 196 196
There are lots of different ways that it can do this, 197 197
and they can do this either as a static route 198 198
or dynamically-assigned route 199 199
using a routing protocol like RIP, OSPF, EIGRP, 200 200
and many others. 201 201
Now, we're going to talk about many of those 202 202
later on in this course, so we're not going to talk 203 203
specifically about how it works right now. 204 204
We're just going to put that to the side. 205 205
But I want you to remember that routing protocols 206 206
help us decide how data is going to flow across the network 207 207
and how the routers are going to communicate that information. 208 208
For now, let's just use the example on the screen 209 209
to give us a really basic idea of how routing works. 210 210
Let's say that I'm sitting in router number five 211 211
at the bottom-right corner, 212 212
and I want to get to router number one. 213 213
Well, how should I do it? 214 214
I can go from five to four to one, and that would work, 215 215
but I can also go from five to four to three to two to one, 216 216
and that would also work. 217 217
So, how do I know which way 218 218
is going to be the best way for me to go? 219 219
Well, if I end up using a dynamic protocol, 220 220
all of these routers continually talk 221 221
to each other all the time, and they tell each other 222 222
which way they know how to get to other routers 223 223
and which one is the best and fastest route. 224 224
So, if you think about this like streets, 225 225
when you type into your GPS 226 226
that you want to go from point A to point B 227 227
to get to the grocery store, 228 228
it may take you three or four different ways 229 229
depending on the time of day, the traffic, 230 230
the congestion, and a number of other factors. 231 231
Routers are doing the exact same thing. 232 232
They all talk to each other and they say, 233 233
hey, I've got a better way for you 234 234
to get from point A to point B 235 235
because there's too much traffic on this direction, 236 236
so, you should go and take this other route, instead. 237 237
That's the idea with route discovery and route selection. 238 238
Now, the next thing we need to talk about here 239 239
is connection services. 240 240
And connection services are going to augment 241 241
our layer 2 connection services 242 242
that we talked about previously 243 243
and provide us with some additional reliability. 244 244
Again, we're going to have some more flow control added here, 245 245
and this is going to prevent the sender 246 246
from sending data faster than the receiver can get it. 247 247
Again, that's the way that we have flow control there, 248 248
so it can say, hey, hey, hey, slow down, 249 249
you're sending me too much data, 250 250
or speed up, I can take more, I'm ready for more. 251 251
We also have this thing called packet reordering. 252 252
Now, packet reordering is really important 253 253
because it allows us to take this big chunk of data, 254 254
cut it up into little pieces of packets, 255 255
and then, send all those packets off in different directions 256 256
to get to their final destination. 257 257
Now, the problem is sometimes these packets 258 258
are going to arrive at the destination in the wrong order. 259 259
And so, packet reordering allows them 260 260
to get all this data at the end destination at the receiver, 261 261
and they can take and say, okay, 262 262
I got packet one and packet five and packet two 263 263
and packet four and packet three, 264 264
and then, I'm going to put them in the right order, 265 265
one, two, three, four, five, 266 266
and then I can put that data back together in what it is, 267 267
and now, I have the full piece of data together. 268 268
The benefit here is that because of routing, 269 269
each packet gets numbered and sequenced, 270 270
and so, even if they get to the other end out of order, 271 271
we can put them back into the right order 272 272
and read them as a coherent message. 273 273
The next thing we need to talk about here at layer 3 274 274
is known as ICMP or the Internet Control Message Protocol. 275 275
ICMP is used to send messages 276 276
and operational information to an IP destination. 277 277
The most commonly used one is known as ping, P-I-N-G. 278 278
And we're going to talk specifically about that tool 279 279
in our troubleshooting lecture. 280 280
As you can see in this example, 281 281
we can send out a single packet as a test to example.com. 282 282
And when it comes back, 283 283
we can then say if that site is up or down. 284 284
This is what ping does. 285 285
It sends out a packet and tells us 286 286
if it was received or not by the distant end 287 287
and how long it took. 288 288
In this case, we got a response back five different times, 289 289
showing that it was up 290 290
and we were able to get to that distant end. 291 291
Now, this is not a tool that's used regularly 292 292
by end-user applications, 293 293
but it is used by us as administrators 294 294
to help troubleshoot our network and figure out 295 295
what is up and what is down and what isn't working. 296 296
Again, the most commonly used one here is going to be ping, 297 297
but there's another variation of it known as traceroute, 298 298
which will trace the route that a packet takes 299 299
through the network and tells you every single router 300 300
along the way as it goes through, 301 301
essentially doing a large series of pings 302 302
through each and every router 303 303
so you could figure out which routes were up 304 304
and which routes were down. 305 305
Now, what are some examples of layer 3 devices 306 306
that we need to remember for the exam? 307 307
Well, the first two you have to remember 308 308
are routers and multilayer switches. 309 309
A router looks like this die icon here. 310 310
You can see it's on the screen. 311 311
It's a circle with four arrows, and this is a depiction 312 312
of what a router looks like in a logical diagram. 313 313
Now, a multilayer switch works 314 314
like a regular switch and a router combined. 315 315
So, it has both features of a layer 2 switch 316 316
and a layer 3 router in the single device, 317 317
which is why it's considered a layer 3 device. 318 318
Again, for the exam, remember that a switch 319 319
is always a layer 2 device unless they specifically tell you 320 320
that it is a multilayer switch. 321 321
If it's a multilayer switch, 322 322
it is going to be considered a layer 3 device. 323 323
Now, some other things that we have 324 324
is going to be things like IPv4 and IPv6. 325 325
These are both layer 3 protocols. 326 326
We also have ICMP, the Internet Control Message Protocol, 327 327
that we just talked about that's used in troubleshooting. 328 328
All of these are found at layer 3. 329 329
The best one to remember is IP and routers 330 330
because these are going to be the most common ones 331 331
you're going to see on test day 332 332
if they ask you for examples of a layer 3 device.