>> As we continue our journey up the OSI reference model,
we're up to Layer 3, the network layer.
At this layer we have IP addressing.
IP addressing is a huge part of networking.
As a matter of fact, in our entire next chapter,
Chapter 2, is going to cover
IP addressing and all the little ins and outs.
For now, we're going to think of
IP addresses like a mailing address.
If I want to locate you from anywhere in the world,
then I can use your mailing address.
It's very similar with IP addressing.
IP addresses are at Layer 3 routers that use
IP addresses to determine where
traffic goes are layer 3 devices as well.
I don't want to give you a spoiler
from a later discussion,
but Layer 3 switches are also Layer 3.
So IP routers and Layer 3 switches make up layer 3.
I also want to add that any
protocols beginning with the letter I,
except IMAP, mail protocol are layer 3.
IP, ICMP, IGRP,
IGMP, IPSec, and on and on are Layer 3.
This is not a personal challenge for someone to go out
and find the I protocol that operates at Layer 5.
Just for our purposes,
the protocols that start with
I are here at the network layer.
Now again, with IP, there's logical addressing.
We talked about MAC addressing and how it is physical,
its burned to the network card,
and because of the fact that it's
bound to the network card,
if you take your laptop home,
your MAC address won't change.
But the logical address is going to reference
your system based on wherever you are in the planet,
because it's a full and complete address
that changes based on your location.
Logical addressing is going to be really important.
That's what IP does.
We've got IP version 4, IPv4,
which is what most of us are currently on,
and IPV6, which is coming soon.
Granted, we've hertz coming soon for the last 15 years,
but I'm sure that eventually it's coming soon.
Some tools that we use to examine
our IP configurations are ipconfig and ifconfig,
which stands for interface config
in Unix and Linux environment.
There are some other tools we can use,
but those are the big ones right now.
Ping, ICMP,
Internet Control Message Protocol is
the protocol behind ping and echoing utilities.
The way these echoing utilities work
is a message is sent out and there's a reply back.
It's like when you throw a rock at
a wall because there's a wall there,
the rock bounces back.
That's what ping does.
Ping is often used to test basic physical connectivity.
If I ping you, I don't have to worry about if
the cable is broken or if the connectors are bad.
We've got basic connectivity.
Ping is a really,
really useful tool, but it's
also one that is incredibly exploited.
It's not ping so much as it is the ICMP protocol.
That's also used virtual call tracer,
which is within Windows.
Unix has the same tool
traceroute with Linux and Unix systems.
The job those two tools do
is it chases hops through routers.
For instance, I'm going to ping
a local computer, one of my network.
If I can reach it, great.
Then I'm going to ping a remote computer,
which means one on the other side of a router.
If I can't reach that remote host,
I might use traceroute so I
can see the message leaves for me,
goes to Router 1, goes to Router 2,
then all of a sudden it doesn't
look like it's going to pass Router 3.
That gives me an idea that Router 3 is the problem.
It's good we're making sure
>> that all your pass throughout
>> the routes are up and working as they should be.
Now, we're going to come back and talk some
more about other Layer 3 protocols.
But let's go ahead and move on to Layer 4 for now.
Layer 4 is like the pony express of all the layers.
This is all about end-to-end transport
of data all the way through.
There are two protocols
particularly that work at Layer 4 for us.
They are TCP and UDP.
It's important to understand the difference
>> between these two
>> because they're very different protocols.
>> TCP is connection oriented, reliable,
but also slow, whereas UDP is connectionless,
unreliable, but it's fast.
When we talk about TCP versus UDP,
these are the alternatives.
On the upper layer protocols,
and by that I mean application layer protocols,
and that the other protocols and
services above that layer,
they will piggy-back on either TCP or UDP.
To give you an example,
let's say I'm an administrative assistant
and Bob gets a call.
I pick up the phone paging and say,
"Bob, you have a call-on Line 1."
Well, I did my job, is quick and easy.
I have no idea if Bob got the message,
but I don't care because it's lunchtime,
and I've got things to do. That's UDP.
The message is out there, I've done my part.
Whereas with TCP,
>> TCP uses a process called handshaking.
>> The first step of the handshake
is a send packet for synchronize.
Basically says that I'm going to send you something.
SYN-ACK says, okay,
I got what you sent and then ACK, we're good.
So it's that back,
forth, SYN-ACK, ACK.
Now that is obviously going to
take more time to have that handshake.
But we get reliable delivery that is
referred to as a three-way handshake.
This isn't something that you and I would use.
This would be something that a software developer
would build into an application.
If they're building a network application,
they can choose to use either TCP or UDP.
UDP is going to give them speed.
But the stuff that UDP doesn't do would
then have to be built into
the program through other ways.
What that means is if I choose the speed of UDP,
I'm going to have to do more coding as a developer.
Whereas if instead I take
advantage of what's there with TCP,
that saves me some work.
It really depends on whether it's
speed or reliability that I want.
UDP is used for things like media streaming, VoIP,
Internet relay, chat,
things that have to be in near real time. That's UDP.
I will also mention ports.
When we talk about port numbers,
we're referring to numbers
associated with the upper layer protocols.
For instance, we'll talk about how IP traffic
or IP addressing helps find your systems network,
and then once we're on your network,
we use ARP to find your MAC address, and that's great.
But once the data gets to your system in your computer,
how does your system know what to do with that data?
How does your system say, "oh,
this is traffic from my web server.
This is mail or is this that or the other?"
The answer to that is in the header of
a data segment is a little numeric stamp.
Certain numbers are relegated
to certain types of software.
For instance, there's traffic with
the destination port at port 80.
Your system knows that that's web traffic.
We'll talk a lot more about ports in just a bit,
but again, this is just to give you an idea.
So there's your handshake.
The UDP, there's no handshake.
Again, TCP has
the three-way handshake that's very important.
That's the SYN, SYN-ACK, ACK.
Though it's slower, it guarantees delivery.
Then of course, handshakes
having been so important at one point in time,
2020 has killed a need for that now.
So TCP may be out of business.