This is one of multiple videos discussing IP subnetting.
I've received a number of questions asking me to explain various subnetting scenarios and this is one
of them.
So can the PC on the left configure it with this IP address 10 .1.248.1 slash 20 ping the PC
on the right with IP address 10.1.192.2 slash 20.
In this example, I'm using Cisco routers as my PCs and I'm doing that because it's important that you
learn the Cisco CLI.
However, the subnetting behavior will be the same on Cisco versus a PC but it gives us a lot of options
to troubleshoot and test our subnetting scenarios.
So this is the IP address configured on gigabit 00, show run interface gigabit 00 shows us the IP address
configuration and show IP interface gigabit 00 shows us the IP address inside the notation.
So that's the address inside a notation and that's the address configured in dotted decimal notation.
I'll do the same here show run interface gigabit 00 there's the IP address of PC 2 or router 2 acting
as PC 2 dotted decimal notation and show IP interface gigabit 00.
And what I'll do is only include the IP address of 10.
So there's the IP address inside the notation.
I could do it this way which shows all the output but it's nice to have that output as well as this
output on the same screen.
I'll do the same here show run interface gigabit 00 show IP interface gigabit 00 and I'll include 10.
So there's the IP address inside the notation and a dotted decimal notation.
So the question again can these two PCs ping each other.
So let's test it.
Ping 10.1.248.1
notice the pings are failing ping 10.1.192.2, pings are failing.
Why are they failing?
The answer is the PCs are in different subnets.
They connected physically to each other and we can see that by using the command show CDP neighbors
notice router1 is connected to router 2 on gigabit 00 and router 2 is connected back on gigabit
00.
So they're definitely connected to each other physically but they can't ping each other.
To help explain, I've taken the IP addresses in decimal notation and converted them to binary.
So this is the binary representation of 10.1.248.1
Here's the binary representation of 10.1.192.2 slash 20 means 20 binary ones in the subnet
mask.
Here's the subnet mask with 20 binary ones.
I typically don't have a space between your binary bits but I've just added that to make it easier to
read.
So here's the first octet, second octet, third octet
But notice four binary ones in the third octet and four binary zeros.
The same is shown here
slash 20.
So are these two devices in the same subnet.
The answer is, No
Because notice the network portion is different on these two devices.
I've highlighted the network portion in red, the host portion as shown in blue. For devices to be in
the same subnet the network portion or subnet portion needs to be the same on both devices, notice here
the subnet portion is different.
So they are in different subnets and won't be able to ping each other unless you put a router between
them or change the subnet mask.
What would you change the subnet mask to, to allow them to ping each other?
And the answer is make the subnet portion this which means that the host portion is now changed
to that.
So this is the host portion
this is the network portion, network portion is now the same.
That equates to 8 plus 8, 16 17 18 binary bits which equates to 255.255.192.
So previously that was the IP address on this side and that was the IP address on the right-hand side.
So we would change the IP address to 10.1.192.2, 255.255.192.0 and on this side interface
gigabit00, IP address 10.1.248.1, 255.255.192.0.
So same IP address all I've changed is the subnet mask.
So can the router on the right acting as our PC ping the router on the left acting as a PC.
And the answer is, Yes it can.
It dropped the first ping while doing an ARP but notice device on the right can ping the device on the
left and the device on the left can ping the device on the right.
And that's just because we changed the subnet mask to slash 18 and put the devices in the same subnet.
I hope you enjoyed the video if it's been of benefit to you please like it and please subscribe to my YouTube
channel.
I wish you all the very best.