♪ music ♪
Ok, so to communicate on a network, we need an IP address and a MAC
address. Let's focus in on the IP address for right now.
When we are sending something on a network. When one device needs to communicate
with another, we put what's called a source
IP address and a destination IP address
in the frame.
Now, on a local area network, we must have a MAC address to communicate
We've talked about MAC addresses. So, if we're communicating on a local area
network, we will know the IP address of a computer and what we have to
determine is, we have to determine that MAC address in order to be able to send that frame.
That's what the address resolution protocol does for us.
ARP will basically resolve an IP address
into a MAC address.
So, let's say
we need to send a picture from one computer to another computer
on our network.
This is my picture.
What's going to happen is we're going to break this down in
to smaller chunks of data.
We're not going to send that whole picture in one packet.
And the reason for that is we have to share the network
with other devices on the network and so, when we
break this down, we get smaller chunks that we can send a piece at a time
and then we do what's called interleaving
in which we share the medium, or the wire
with other devices on the network. So, we'll take the first chuck of our picture
we'll put it on the wire and maybe another two
three, four, five, six computers will send a chunk of their
data on the wire and then it will come back around to us and we will send
another chunk. Now, this all happens in milliseconds, so
the user doesn't really recognize that this is happening but you
are sharing that network with other devices and if we try to
transmit at the same time, we have what is called a collision.
Which, there is a whole process for resolving a collision.
So, what do we need to do, or what does the computer do when it sends its first
chunk of data. Alright, here's the data
but how do we know how to get it
to where it is going? How does this little packet tell
the network what device this data is meant for
So, for that, this little chunk of data
will also have an extra piece on the beginning of it
called a header.
OK, the header
is a portion of the frame that contains a
source address and a destination address
for right now, we will just talk about
IP addresses. Remember on a local area network
MAC addresses are used to communicate. But we're going to
talk about an IP packet right here. So,
just for simplicity purposes. So, the header
will have a source address of
192.168.0.1
and a destination of
192.168.0.2
So, basically, this little header has
information about addressing. Where does the packet, where does this
data need to go? What computer is it meant for? What is it
destined for? There's also another little piece at the end
because, how do we know
that the data that is sent matches
the data that is received on the other end.
And for that, we have what is called a trailer
and the trailer, or the tail,
of the IP packet
has a couple of things in it. One is called a CRC
or a cyclic redundancy check.
What this does is basically tell us that there are no errors.
So, basically, CRC equals error checking.
and then there's also at the very very end there is an
end of frame delimiter and the end of frame delimiter
basically tells us that the
... we are at the end of the frame. That there is no more data to transmit
You have to remember that we are using wires
to transmit this data. So, a packet, when it is put
on to the wire, is just a stream of
electricity and there are dips and spikes in that electricity.
And a dip in the electricity represents a zero whereas a spike in the electricity represents a one
So, we need somewhere
in this frame, where we have an end of frame delimiter
and an end of frame delimiter is a specific sequence of zeroes and ones
A specific sequence of spikes in electricity and dips
in electricity that tells the device that this is the end
of this frame transmission. So, that's called the
end of frame delimiter. Now, I want to talk a little bit more about this error checking
and how that actually works. When we have this
data prepared at the source, we run what's called an algorithm
on this data when we are encapsulating it or packaging
it up into this frame. That algorithm
will give us an answer or result. Basically, it's a mathematical formula
that gives us an answer. So, let's say that answer is
1233456
That's a terrible 3...1233456
Let's say that's the answer to this
When this packet gets to the destination, and it's being
decapsulated on the other end, the receiving machine
will run the same algorithm on that data
and we should expect to get the same answer
If we run the algorithm and we get the same answer that's in the
CRC, then we know
that this data arrived in its original state
That it is intact. That we received it as it was meant to be received.
It hasn't been tampered with and it has not had any kind of data loss
or error in the frame.
If we get a different answer, then we
know there is a problem in the frame. Either the frame has been
tampered with or there has been some sort of collision
There's some sort of problem with the communications on the network
that has caused this frame to become corrupt.
At that point in time, the receiving
computer would discard the frame and request that frame again
♪ music ♪