This is one of multiple videos discussing IP subnetting.
I've received numerous questions with regards to IP subnetting and I'm gonna try and answer a lot
of them through these videos.
So here's a question for you.
Will PC 1 on the left
be able to ping PC 2 on right in this typology, PC on the left is configured with an IP address of
10.1.255.1 slash 17
and the PC on the right is configured with an IP address of 10.1
.28 .2 slash 17 in the apology I'm using Cisco routers instead of Windows PCs.
As it's important for you to learn the Cisco CLI and it's important for you to learn commands available
on Cisco devices.
So show IP interface brief shows me the IP address configured on the gigabit 00 interface of this router
show IP interface brief shows me the IP address configured on gigabit 00 of this router, show run interface
gigabit 00 shows me the configuration of the IP address and we can see that over here as well and show
IP interface gigabit 00 shows us the configuration of router 2 and same on the side, show IP interface
gigabit 00 that's the IP address of router 1 acting as PC 1 here's the IP address of router 2 acting
as PC 2.
So will these two routers acting as PCs be able to ping each other so ping 10.1.255.1
router 2
is able to ping router 1 we can actually see that in real-time by using a de-bug IP ICMP command
that de-bug allows us to see ICMP traffic in real time.
ICMP is the protocol used by ping. In this example I'll send a single ping to router 1, ping succeeds
and we can see that a echo reply was sent back to router 2 with a source IP address of 10.1.255.1 destination
IP address of 10.1.128.2
So how do we know that they were in the same subnet.
Show run interface gigabit 00, show run interface gigabit 00.
You need to look at network and host portions
255 means that the first octet is network,
255 means that the second octet is network, here
however we've got 128 in the network portion.
So it becomes a little bit more tricky to work out host and network portions.
So let's write that out
together 10.1 is fairly simple
that's a network portion.
However, 128 in binary equals 1 followed by seven binary zeros.
Just put a space here to make it easier to read
obviously that space doesn't exist
but I'll just do that for clarity of reading.
So this is the IP address portion
and this is the mask a binary one in the mask indicates that that portion is part of the network
zeroes in the mask indicates that this is host portion.
So in this example, the network portion of the address equals 10.1 in decimal
and then the first binary bit in the third octet if we look at this address here 10.1 is network
portion based on that, that's the same as what we've got over here.
But in the third octet we've got 255, 255 in binary is eight binary ones
and again I'll put a space here just for clarity.
The mask equals 128,
so in this example, the network portion is the first bit which is the same as 128.
So if you look at the address here, 10.1. first binary bit is network and the same is true
here.
10.1 one plus first binary bit in third octet is network.
The rest of the address is the host portion.
So I'll write it out fully 10.1.255.1 in binary equates to 0000 1010.
That's 10 dot seven binary zeros and one binary one that's 1 dot eight binary 1
followed by seven binary zeros and a binary one.
So that is the address in binary of 10.1.255.1
and if we look at the mask we've got 8 binary ones in the first octet.
So the first octet is network, second octet is also network.
But in the third octet, we have one binary one followed by seven binary zeros.
So this portion is the network portion,
this portion is the host portion.
So blue is host,
red is network portion.
If we look at the other address used in the network which is 10.1.128.2
the host portion is different but the network portion is the same.
So these two devices even though they have different host portions are still in the same subnet
based on that information there.
So they are in the same subnet
and hence the device on the right
can ping the device on the left, ping succeed and we can see the debug output on the screen.
So I hope you found this video useful if you did please like it and please subscribe to my YouTube channel.
I wish you all the very best.