Okay so that means I need to configure router 4 and the Internet router so I'll do router 4 first
interface serial
010
that's this interface.
Now in the real world you could use commands such as Show CDP neighbors to verify neighbor connectivity.
If you're not sure how interfaces are connected and you wanna verify interface connectivity.
So this is definitely the local interface connected to the Internet router.
So on that interface, interface serial 010 IP address 192 168 1 117 first IP address and subnet
is one more than the subnet address
and because this is a slash 30 the last IP address is simply the next IP address in that subnet interface
serial.
020 IP address 192 168.
We're in the subnet so it would be 118 1 118 slash 30 mask.
So can we ping the other side.
Yes, we can and we can see that on OSPF neighbor relationship has been established.
So back on router 4
OSPF neighbor relationship is established.
We've learnt a default route via the Internet router so IP domain lookup, IP name server is gonna be
Google ping Cisco.com, we can ping Cisco.com, can we ping Facebook.com, yes, we can. So I've
configured the WAN links and updated them per the new subnets that we have the next step is to configure
the subnet. So we need to use this subnet for this local area network now the way that you work out first
host, last host broadcast is once again first host is simply the next IP address after the subnet. So
binary it would look like that, host portion is set to zeros except for the last bit which is set to
1 but in decimal it's simply add 1 to the network portion. The broadcast would be one less than the next
subnet so the next subnet is 80 so the broadcast would be 79 and to work out the broadcast
portion you fill the host portion with binary ones
and again we can verify that we've done a right 79 it looks like this in binary so 0100 followed
by four ones, so that's correct and then the last hosts in the subnet is 1 less than the broadcast address
so 78 and if you want to work it out in binary you set the host portion to binary ones except for the
last bit which is set to zero, host portion for subnet looks like that filled with zeros broadcast is
filled with ones, first host is filled with zeros except for the last bit which is set to 1, the last host
has it filled with ones except for the last bit which is set to 0 so the last IP address in this subnet
which we need to use on router 4 is 79.
So 192 168 1 79
so on the Ethernet interface connecting to the switch gigabit 000 IP address 192 168 1
and again it should be 78.
Subnet is a slash 28, so slash 28 equals 8 plus 8 plus 8
plus 1 2 3 4 binary ones.
So it's 255 255 255, four binary ones in an octet would look like that followed by four zeros which gives
us 240, so this is 240
if you wanna verify it again in our calculator, 240 looks like that
switch needs to be configured with the
second last IP address. I didn't do that here but it's essentially one less than the last IP address
so the switch needs to be configured with 77
so CONF T interface VLAN 1 IP address 192 168 1
77 slash 28. Can we ping 192 168 1 78 so can the switch ping the router make sure that I've done
it right, so show IP interface brief
switch should hopefully be able to ping itself,
can ping itself.
Let's see if we can ping the router again
on the router show IP interface brief, can we ping ourselves, can we ping the switch.
Now notice the switch has some old configuration on it.
So that may be causing problems sometimes in packet tracer when you make changes things break you may
have to restart packet tracer let's just make sure that I haven't done something dumb that all looks
right, that all looks right shows CDP neighbor details we can see the Internet router
we can also see the switch with the correct IP address.
Local port is this, port on the other side is that, on the side shows CDP neighbors we can see the router
on gigabit 101 that looks good let's see if I've done something wrong, what I'm gonna do at this point
is save packet trace and started up again and see if that solves the problem otherwise, I'll check if
I made a mistake, packet tracer has booted up again here's the router
router 4, show run just to confirm that this IP address 192 168 1 78 slash 240 is configured on the
router
and on the switch, switch 3
show run this IP address 192 168 1 77 slash 28 is configured on the switch that's the
second last IP address so ping 192 168 1 77 switch can ping itself cannot ping the router
still having problems.
I'm gonna remove this default gateway command.
Change it IP default gateway
192 168 1 78
Let's see if that solves the problems
and it did, on the real world.
That's not correct, in the real world
you don't need a default gateway to access a local device but that's a problem in packet tracer.
So the issue here was the switch wasn't working per
a real switch in the real world you wouldn't have to do that even though the default gateway is wrong
because they are on the same subnet,
they would still work.
In other words they'd still be able to ping each other.
Can the switch now ping Cisco.com.
Now I've rebooted Packet Tracer so it may take it a while to sort itself out, packet tracer is great
but it does sometimes do things that are not real-world and sometimes has weird issues but at least
it gives us the ability to test things and to learn.
Okay, so the switch can now ping Cisco.com
So that's good,
We have IP connectivity from the switch to the Internet.
We then need to configure the PCs with the first IP addresses in the subnet.
So on the PC FastEthernet zero interface
192 168 1
IP address is gonna be 65, first IP address in the subnet.
So 65 subnet mask is 255 255 255 240, default gateway is gonna be 192 168 1 78 DNS server
is gonna be Google.
So hopefully this PC should be able to ping Cisco.com which it can and hopefully should be
able to browse to Cisco.com which it can
and what about facebook.com.
You can also browse to facebook.com so that works well.
Next PC, IP address is gonna be statically configured 192 168 1, it's gonna be 66 next IP address in
the subnet 255 255 255 240 default gateway is gonna be 192 168 1 78, so can it ping Cisco.com
spelled that wrong
can't find the domain name let's just check that I configured the DNS forgot to do that.
So DNS needs to be configured it can ping Cisco.com can it get to Cisco.com? Yes, it can.
Can it get to facebook.com?
Yes, it can.
And then the last PC in that subnet needs a static IP address of 192 168 1 67, 255 255 255
240, default gateways 192 168 1 78, DNS server is Google we should be able to ping Cisco.com
which we can and hopefully at this point we'll be able to browse to Cisco which we can and browse to
facebook.com which we can.
So I've successfully completed this lab.
I've taken the subnet and broken it up into as many subnets as possible each having 8 hosts per subnet.
That's what we did there.
Then I took the last subnet and subnet ID it again and used these two subnets for the WAN links.
Notice we still have these two subnets available and these two subnets available, so we've conserved
IP addresses in our network rather than using a slash 26 which is very wasteful.
On a WAN link we're using slash 30s on two WAN links and we've used one of the subnets for a site and
we've got more spare.
So what we should do is subnet this one as well.
So what you would do in the real world is make this a slash 30 and better utilize your IP addresses
but that's okay for this lab.
I've completed this lab.
How did you do?
Were you able to complete the lab yourself.
IP subnetting is really important for the CCNA exam.
Make sure you understand how to use variable length, subnet masks like I've done here.
Make sure that you understand how to subnet and how to allocate IP addresses to devices in subnets.