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.
So we've successfully configured this subnet.
Now we need to configure this subnet and this gets a little bit more interesting because it's 192
168 1 64 slice 26.
So we already know what the subnet address is.
Now we need to work out what the first host address is.
So what is the first host for this network?
Now to work out to the first host.
You make the host portion zeros except for the last bit which is set to 1.
But to work out the decimal value over here you need to look at the entire octet.
So this is 64 because that's the network plus one is 65.
So the first host is 65.
What is the last host.
The easiest way to work that out actually is to do broadcast first and then work out the last host.
So for the broadcast what we do is we fill the host portion with binary ones.
So what is that?
It's 255 less 128 which is 127.
So the broadcast address is 192 168 1 127.
Now the last host is one less than the broadcast address.
So for the last host, we set the host portion to binary ones except for the last bit.
So what does that equal to, that's equal to 126.
So let's assume that we configure the router with the last IP address in the subnet and then we're going
to enable DCHP on the router to allocate IP addresses to the hosts.
So here's router 2, on the fast ethernet interface I'm gonna no shut the interface and then I'm
gonna configure an IP address as we worked out 192 168 1 126
And then we need to specify the subnet mask 255 255 255 192, so can we ping
our local address?
Yes, we can.
Now for host allocation let's use DHCP.
So we'll create a DHCP pool with a name, New York and here we need to specify the network.
So what is the network? It's 192 168 1 64
And here we have an option we can either use slash 26 or the dotted decimal notation.
So let's use CIDR or slash 26, do show run will allow us to see our configuration.
So that's what we've done in the DHCP pool.
Now we need to configure a default gateway.
So our default gateway is gonna be 192 168 1 126.
There are other options that we can specify in DHCP such as DNS server.
And in this case, let's set the DNS server to the local router in the real world you probably have a
separate DNS server.
So show run
there's the DHCP pool that we've configured we've configured the default gateway or default router and
DNS server, now in the hosts
let's see if they get IP addresses.
So on the hosts we're gonna configure them to use DHCP rather than static IP addresses.
So let's do that on both hosts or both PCs.
Change them to use DHCP.
And then let's start them up and let's see if they get an IP address from the DHCP server.
Open up a console to both of them.
So here you can see the first host got an IP address 192 168 1 65.
And the second host got an IP address of 192 168 1 66.
So can the second host ping the first host?
Yes, it can.
Will it be able to ping the default gateway.
Let's try that.
Yes, it can.
So we've successfully configured the New York site with an IP address on the default gateway and we've
set up a DHCP.
Now one thing you wanna do when you set up a DHCP pool like this is specify the excluded address.
We don't want the DHCP server to allocate its own address so we can use the command IP DHCP server
or rather IP DHCP excluded address.
And we can specify a range of addresses to exclude and this example will only exclude the local routers
IP address so we excluded the local routers IP address which means that it won't be allocated through
DHCP.
I'll save the routers configuration and while we're here let's save router 1s configuration.
OK, so at this point we've configured both San Francisco and New York.
The next step is to configure the WAN connection.
Now it's inefficient to use a subnet that supports 62 hosts for a network that only requires two.
But for now, let's start off by using the subnet that we allocated.
And then in a subsequent video, I'll show you how to optimize this, so on router 1
let's allocate the first IP address in the subnet to the router.
So that's essentially one more than the subnet address.
So 129 and one more than that
would be 130
with our subnet mask so what you'll notice is the first IP address is one more than the subnet address and
the last IP address is one less than the broadcast address so we need to no shut these two interfaces
and what should happen now is router 1 should be able to ping router 2 which it can.
So we've successfully configured the IP addresses on the WAN and on both LAN interfaces but to enable
full connectivity in this network we need to run a routing protocol.
And in this example, I'll run EIGRP and enable the EIGRP on network 192 168 1.0
Now that is a class full network.
In other words, it's looking at class C 192 168 1.0 and not to the subnet addresses on the side
we'll do something similar.
Network 192 168 1.0, I'll
disable automatic summarization so that they don't automatically summarize any network's show IP EI
GRP neighbor, notice a neighbor relationship is established to router 2
and we should see something similar here.
Show IP EIGRP neighbor, neighbor relationship is established to router 1 show IP route.
Notice router 1 has 192 168 1.0 directly connected on fast
ethernet 00 and 192 168 1 128 directly connected to serial to slash 0.
Those are the two subnets.
It's also learnt about network 192 168 1 64 from 192 168 1 130.
In other words router 2, in the same way router 2 has 192 168 1 64 directly connected to fast
Ethernet 0 slash 0 and 192 168 1 128 is directly connected to serial 2 slash 0.
This router has learnt about a network through EIGRP from 192 168 1 129.
In other words router 1 and it's learnt about network 192 168 1.0 so router 1 at this point should be able
to ping PC 3 and PC 4, and the ping succeed.
Now, if you remember PC 3 was allocated this IP address and we can confirm that by using the command
IF config Ethernet0 is the IP address of PC 3, PC 4 IF config
Eth 0
There's the IP address of PC 4, so router 1 is able to ping both the PCs, now can PC one ping those
PCs. So can we ping 192 168 1 65?
Yes, we can.
And 66? Yes, we can.
Let's trace to 192 168 1 65.
Notice the trace goes to 192 168 1
62, router 1.
Then it goes to 192 168 1 130 which is router 2 on the serial subnet and then it goes to 192 16
8 165, which is PC 3.
Be careful.
These are separate subnets.
These hosts are in different subnets, so that was an example of subnetting.
We took a network, we created subnets, we worked out the subnet address, first host address, last host
address and broadcast the address and we configured the network accordingly and then we tested that
it worked.
That was a simple example of a practical implementation of subnetting but it's really important that
you know how to subnet.
I 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.