Now, we've been told to configure router 1 with the last IP address in that subnet.
Now, this is the subnet that we concentrating on initially, so let's start with that subnet.
The way you work out first
last and broadcast addresses as follows.
The network has the host portion populated with binary zeros.
So notice host portion is all zeros.
The first host has the host portion populated with binary zeros except for the last bit which is set
to a 1 in binary.
So that's the first host in the subnet. The last host in the subnet has the host portion populated with
binary ones except for the last bit which is set to binary 0 and I'll show you in a moment what that
is but it's easier to work out the broadcast address first.
So the broadcast address equals that subnet
and the host portion is populated with binary ones.
So it's 1 1 followed by 4 ones.
Now you can work this out by saying 32 plus 16 plus 8 plus 4 plus 2 plus 1.
But I find it easier to do the following if this is set to 1 and everything else is set to zeros so
it looks like this, that equals 64 one less than that equals 63.
So if you asked for something like this, what is the broadcast address?
Have a look at the next subnet and subtract 1 to get to the broadcast address of the previous subnet.
The next subnet is 1 9 2 1 6 8 1 64.
The broadcast address of the previous subnet is that subnet minus 1.
So in other words it's 63 and then this is 62.
So for this subnet that's the network and first host, this is the last and broadcast address.
Second last which we need for this switch is essentially 1 less than that can work out the binary
but it may be easier just to subtract 1 from the decimal.
So that's 61.
And the third last is 1 less than that which is 60
so we now know the network, the first host, the broadcast the last host.
Second last host and third last host.
Easiest way to work this out is, to work out to the network and then work out the next network, one less
then the next network gives you the broadcast address for the current subnet and then you can just subtract
1 from that to get to the last host.
Second last host and third last host, first host is equal to the network portion plus 1.
So there are our values.
That means we can now configure this router with the last IP address in the subnet.
So currently on this router it only has a loopback interface configured it doesn't have an IP address
configured on gigabit
0 0 0.
Remember the network 1 9 2 1 6 8 1.0 slash 26 has 2 bits that are part of the network portion 2
binary bits.
Looks like that which equals a 192.
So we can configure the gigabit
0 0 0 interface with an IP address of 1 8 2 1 6 8 1 62 because that's the last IP address in the subnet.
So 62 and the mask is 2 5 5 2 5 5 2 5 5 1 92.
And that's because these 2 bits are part of the network.
So we've got 255 255 255, 2 bits there which equates to a 192.
So show IP interface brief we can now ping our local IP address.
The switch needs to be configured with the second last IP address in the subnet.
Per these instructions so configure the switches with the second last IP address and then the DHCP servers
with the third last IP address.
So again here's our switch
I'll give it a name.
Switch 1 interface VLAN 1, no shut IP address 1 9 2 1 6 8 1 and the next IP address that we can
use is 61 2 5 5 2 5 5 2 5 5 1 92.
So show IP interface brief, that's the IP address of the switch can the switch now ping the router, yes
it can switch has been successfully configured, router has been successfully configured, let's configure
the DHCP server so on the Ethernet interface we're going to configure a static IP address of 1 9 2 1 6 8
1 and the IP address will be 60 in this example third last IP address subnet mask will be 2 5 5 2
5 5 2 5 5 1 92.
Now the default gateway will be the router 1 9 2 1 6 8 1 and the router once again has IP address 62 so
62, DNS server and this example will be 8.8.8.8 this is the internet DNS server it's
configured with DNS names for cisco.com and facebook.com, so the server has been configured.
Can we ping the switch?
Yes we can.
What about the router?
Yes we can.
So we've configured IP addresses and default gateways on the network devices.
Now one thing I still need to do on the switch is specify a default gateway which will be the router,
router has IP address 62
so again the switch can ping the router, we've finished configuring the switch now on the DHCP server
we need to configure a DHCP pool default gateway is going to be the router 62 DNS server is gonna
be the Google DNS server and we can allocate IP addresses from 1 9 2 1 6 8 1. 1.
So from the first IP address in the subnet to a number that we decide.
So we could as an example allocate 100 IP addresses, so I'll save that.
So we've specified the pool name default gateway DNS server starting IP address in the pool and the
number of IP addresses that can be allocated, now can I specify a hundred hosted addresses the answer
is, No, I should actually specify only something like 50 because the subnet only supports 62 IP addresses
so remember the formula, 2 to the power of something which is the number of bits minus 2 gives you the
number of hosts that are supported in a subnet.
Here we've got 6 binary bits.
So 2 to the power of 6
that's the number of bits in the host portion, what's 2 to the power of 6, 2 to the power 4
is 16, 2 to the power of 5 equals 32
2 to the power of 6 equals 64, so 64 minus 2 gives us 62 hosts that are supported in a subnet
but we want to allocate some of those IP addresses to network devices so we don't want to allocate the
full subnet to the DHCP server we'll only allocate a portion of the addresses to hosts via DHCP, so on
PC 1, does the PC have an IP address? Yes it does, it's been allocated 1 9 2 1 6 8 1. 3
Can it ping the default gateway? Yes it can.
PC1 as an example IP config it's also been allocated an IP address 1 9 2 1 6 8 1. 2. Can it ping
its default gateway? Yes, it can and on PC 2 do something similar.
IP address has been allocated and it can ping its a default gateway, so we've successfully configured
subnet 1.
Now, we need to configure the serial link and then once I've done that I'll check whether these devices
can access devices on the Internet and then I'll configure the other subnets.