This is one of multiple IP addressing and subnetting scenarios rather than just working out the subnets
for a scenario.
We're gonna work them out and then configure the devices so that we can practically design and configure
a Cisco IP network. In the previous video, we configured those GNS3 network
and we proved that devices can ping one another, as an example.
Ubuntu 1 or PC 1 can ping both Ubuntu 3 and Ubuntu 4.
In other words, this host can ping these hosts on the right-hand side.
Now, one of the things that we did was we configured the serial link with this subnet 192 168
1 128 slash 26.
Now that subnet can support 62 hosts that's a waste of IP addresses when in actual fact a serial link
only requires two IP addresses.
So we allocated this full subnet to the serial link the host portion currently contains six bits
to the power of 6 minus 2 gives you the option to configure 62 host addresses but we only require
two.
So actually all we need are two bits in the host portion which will give us the option of having two
host addresses in a subnet.
Again, there are two formulas for network you use the formula 2 to the power of x, where x is the number
of bits for host you use 2 to the power of x minus 2.
2 is the number of bits in the host portion.
We have to subtract two because we need a network address and a broadcast address in IP version 4.
So 2 to the power of 2 minus 2 gives us 4 minus 2 which equals 2.
So taking this subnet which we've currently got configured on the serial link lets subnet it further.
So as an example on router 1 currently, show IP interface serial 2 slash zero.
Shows us that 192 168 1 129 slash 26 is configured on the serial interface and that's because
we configured this address on the serial interface.
Now let's change that and optimize the subnet.
So we only need two bits for the host portion so we can extend the subnet portion as follows.
Now we are taking a already configured subnet and we're subnetting it again.
So I'm gonna denote this portion as the network portion because that's what we were given.
This is the new subnet portion and this is the new host portion.
So that's what we had originally.
We've now changed it to slash 30.
So this would be then new first subnet
the second subnet would not be 128 we'd have to cycle through the binary options so we'd make this a
one which in decimal is four.
So 128 plus four
And let me update the subnet mask portion while we're here.
So that's the new subnet mask.
So this would be 128 plus 4 which is 132.
So that would be the second Subnet.
Now you might notice a trend here the difference between 128 and 132 is 4.
So the third subnet would be 132 plus 4 which would be 136 if you wanted to work out the binary you
would cycle through the various options so current on this wire no current on this wire.
That's an 8 in decimal, so 128 Plus 8 in decimal is 136.
So if I were you I'd only work out say the first two or three subnets and then just see the pattern.
These are incrementing in fours.
So the next one would be 140.
So just look at the pattern and it'll be a lot easier to work out the next subnet.
Now some other tricks that you can use if this is the next subnet.
Then the first subnet broadcast address is one less than the next subnet.
The next subnet is 132.
So this subnets broadcast address is 131
again to work out the broadcast address you fill the host portions with one,s so this is 128 plus
two plus one or it's one less than the next subnet.
So that's the new first subnet broadcast address.
So the first host address is one more than the subnet address so it'll be 192
in binary it looks like that the new first subnet last host is one less than the broadcast address so
the broadcast address is 131.
So this will be 130 in binary you fill
the host portion with binary ones except for the last bit, here we've only got two bits.
This is on and this is off.
So that gives you the last host in the subnet.
So that's an example of taking a subnet that we've created from a previous subnet and subnetting it
again to get new subnets in the network.
So currently on our network we are using a 26 here what we'll do you change that to slash 30 with the
first host being 192 168 1 29 slash 30.
And the second host being 192 168 1 130 slash 30.
So that's the IP address on the first host or first router.
This is the IP address on the second router we're gonna stay with 129 and 130 but we're gonna
change the subnet mask its interface serial 2 slash 0 IP address 192 168 1 129
and this now needs to be mask is a slash 30 because it's 8 plus 8 plus 8 plus 6 so slash 30
mask.
So this needs to change to 192 168 1 128 slash 30 that's the mask you'll often find on several
links because it supports two host addresses.
So again this is a slash 30 mask because we've got 30 binary ones in the subnet mask.
So this is 255.255.255.252
So this is gonna be 252 as the IP address.
Notice the relationship goes down has come up again but we will probably have problems running it that
way.
So this side also needs to be 252.
In other words, a slash 30 relationship has come up show IP interface serial 2 slash 0.
Notice the mask now used is a slash 30 and on this side show IP interface serial 2 slash 0.
Notice the mask used is a slash 30, So can router 1 ping router 2?
Yes, it can
Can PC 1 still ping PC 3? Yes, It can and can it ping
PC 4? Yes, it can.
So let's trace to 192 168 1 65.
You can see it goes to router 1, router 2
and then the remote PC so we've successfully updated the subnets in this topology to only use two IP
addresses on the serial link.
The reason for doing that is we can increase the number of subnets that we have.
So rather than only having one subnet we've now increased the number of subnets to 2 to the power
of 4.
So we've actually got 16 separate subnets that we can use each of which support 2 host addresses.
Hope you enjoyed this video.
If you did please like it and please subscribe to my YouTube channel.
I wish you all the very best.