IP Addresses Explained | Cisco CCNA 200-301 - YouTube

Channel: CertBros

[16]
So we're going down the tcp/ip model as if we were sending data, so top to bottom
[22]
In the last videos we saw how data can be sent using TCP and UDP. We also saw
[29]
how data gets to a particular application using port numbers. Now we're
[35]
moving down to the network layer to see how that data actually gets to the
[39]
destination. this layer is responsible for IP addresses
[44]
So what is an IP address? An IP address is a unique identifier
[51]
assigned to each device connected to a computer network
[55]
The most common analogy for an IP address is the postal service. For the
[61]
postal service to work every house needs to have its own unique address
[67]
and if you need to send a letter, not that anyone sends letters anymore
[71]
you need to write the destination address on the envelope. That way when
[77]
you send the letter the postman knows exactly where to deliver it
[82]
now the address must be unique. Otherwise your post could end up going to somebody
[89]
else or you could start receiving somebody else's post and that can
[94]
sometimes not go so well. Computers work in the same way. Each computer in a
[99]
network needs to have a unique address called an IP address and when sending
[105]
data to a computer, just like letters we need to add the destination address. We
[110]
also need to include a return address so they know where to reply
[116]
So let's look at an IP address. This is an ipv4 address which at the time of
[124]
making this video and probably for a long time after is the most common
[128]
although we are slowly moving over to the new IP version 6 that will be
[133]
covered in another video. So an ipv4 address is 32 bits in length
[140]
which means it contains 32 binary digits. We'll look at this more when we go over
[147]
subnetting. It contains four sections which are called
[151]
octets. These octets are separated by dots or
[156]
periods. Each octet in theory
[160]
can contain any number between 0 and 255 Why 255? well our
[167]
32 bit number is separated into four lots of eight, and 255 is the largest number
[174]
that can be made from eight bits
[178]
Now the address itself is separated into two parts, the first part represents the
[184]
network and the second part represents the host. To know which part of the IP
[189]
address represents the network, we used to rely on the first few binary bits but
[196]
since the early 90s we have something called a subnet mask. A subnet mask is
[202]
always paired with an IP address and is used to identify the network section and
[207]
the host section of the address. In its simplest form whenever you see
[212]
255 this is the network part of the address whenever you see a 0 this is the
[219]
host part of the address. It can get a bit more complicated than that
[223]
but we'll look at that later on down the line. When learning about networks and
[228]
hosts and what they mean, it's good to think of it like your address
[233]
You shared the same street name as your neighbors but it's the house number that
[238]
makes your address unique. On the other hand, you can also have
[243]
multiple streets with the same house number. And it's the same with computer
[248]
networks. Instead of street addresses you have
[252]
network numbers and instead of house numbers you have host numbers. Here we
[258]
have two networks 192.168.5.0 and 192.168.10.0 both with a subnet of
[271]
255.255.255.0. When talking about networks as a whole, you often just use 0 for the
[279]
host section. Inside our networks we have our hosts .1 .2 and .3
[286]
It's common in a network diagram to just show the host section of the address if you
[291]
already know the network section. In fact these IP addresses would be 192.168.5.1
[299]
192.168.5.2 and so on, and so on
[304]
So with all of that in mind if we have some data to send to 192.168.5.3
[312]
with a subnet mask of 255.255.255.0
[317]
where would we send it? Well if we look at the subnet mask we
[323]
can see that the network is 192.168.5 So we know that three is our host number so we send
[332]
it over to the host in the network on the left
[335]
Hopefully that all makes sense so far. Back in the early days of IP it was
[341]
decided to split all of the available dresses into groups and these groups
[346]
were called classes. The idea was to make address allocation scalable. The main
[352]
ones being Class A, Class B and Class C. There is also Class D for something
[359]
called multicast addresses and Class E which is reserved for experimental use
[365]
We're going to focus on the first three. Each class has a range of IP addresses
[371]
Class A addresses are between 1.0.0.0 to 126.255.255.255 with a
[383]
the subnet mask of 255.0.0.0 Class B addresses are between 128.0.0.0 to
[393]
191.255.255.255 where the subnet mask of 255.255.0.0
[404]
and Class C addresses are between 192.0.0.0 to 223.255.255.255
[413]
with a subnet mask of 255.255.255.0. Phew! After that never want
[423]
to say 255 again! So this was all to control the number of hosts available on
[430]
each network. Class A has three octets available for host allocation this means
[436]
we can have 16,777,214 hosts for a single class a network. Massive, massive networks!
[448]
Class B has two available octets for host allocation so we can only have 65,534
[457]
hosts to a single Class B network
[460]
Still a very, very big number! Class C only has one available octet for
[466]
host allocation. So this means we can get 254 hosts per single Class C Network
[475]
So you need to be able to look at an IP address and know which class it belongs to
[479]
The easiest ways to do this is to memorize the first octet. If an IP starts
[485]
with the number 10 straightaway you know it's a class A network. If it starts with
[490]
192 you know its Class C and so on and so on
[494]
but there's a problem. The problem is no one could have predicted the massive
[499]
explosion of computers and the Internet. In fact there are no more unallocated IP
[505]
version 4 addresses left. This is why the new IP version 6 has been designed
[512]
It will give us more than enough IP addresses for absolutely everyone
[517]
But fear not! there is a solution to help prolong the life of IP version 4
[523]
The solution is to carve out small sections from all three classes and call them
[529]
private IP addresses. All other addresses are known as public addresses. They still
[536]
use the same subnet mask for that class and they can still have the same number
[541]
of hosts. The difference is where public IP addresses need to be unique, private
[548]
addresses can be used over and over and over again, thus saving millions or
[554]
billions of public IP addresses. This is how it works. Let's say this is
[560]
your house. You have a PC a phone and a printer. You can choose any private IP
[566]
range that you want to use. In this case we will choose Class C
[573]
192.168.1.0 and we'll assign our IP addresses. Remember this is a Class C
[579]
Network and the default subnet mask is 255.255.255.0 meaning 192.168.1.0
[587]
is our network address and the last number is our host address
[592]
So all of our devices can talk to each other
[597]
without any problems at all. The beauty of private IP addresses is
[602]
that they can be used by anyone. For example your neighbors might also be
[607]
using the same IP addresses as you are. And that's fine, private IP addresses
[613]
only need to be unique within your own network. There is a catch though, private
[619]
IP addresses cannot be used over the Internet
[624]
Otherwise we would have duplicate IP addresses everywhere and data would
[628]
never end up getting to the correct places. For that reason only public IP
[634]
addresses can be used over the Internet. These must be unique. When you sign up
[641]
with your internet service provider, they will issue you with a public IP address
[646]
that you can use over the Internet. Usually, they give you just one address
[652]
not a block off 65,000 or 254...1! This helps prolong the life of ipv4
[661]
because instead of using an IP address for every one of our six devices we are
[666]
only using two public addresses. The way our devices will communicate to
[672]
the internet through their public IP is by using something called
[676]
Network Address Translation, which again we will cover in a separate video. Before we
[681]
finish this video, I will show you how to check your own IP addresses at home on
[686]
On Windows you simply open a command prompt or PowerShell
[692]
type ipconfig to see your interface settings
[697]
find your interface, you might have more than one if you have wireless, and you'll
[701]
be able to see your IP address and subnet mask
[706]
for Linux or Apple computers open a terminal
[710]
and type ifconfig and you should see the same information
[717]
to view your public IP address simply open a browser
[722]
go to google and type in "what is my IP" and it will show you your public IP address
[729]
So we still have a lot to go over when
[734]
we're talking about IP addresses. We need to cover binary and subnetting but I
[738]
think that's enough for one video. This video is part of our full CCNA course
[743]
which can be found in the description. So please feel free to go and check that out!
[747]
If you like this video, don't forget to give it a thumbs up, leave a comment
[752]
and subscribe! The support from you guys really does help the channel grow
[757]
Other than that, I hope this helped and thank you for watching
[766]
you