Packet Tracer file (PT Version 7.1):
Get the Packet Tracer course for only $10 by clicking here:
Get my ICND1 and ICND2 courses for $10 here: (you will get ICND2 as a free bonus when you buy the ICND1 course).

For lots more content, visit – learn about GNS3, CCNA, Packet Tracer, Python, Ansible and much, much more.

Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic.

Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then have a unique network/subnetwork ID. Any device, or gateway, that connects n networks/subnetworks has n distinct IP addresses, one for each network / subnetwork that it interconnects.

In order to subnet a network, extend the natural mask with some of the bits from the host ID portion of the address in order to create a subnetwork ID.

An IP address is an address used in order to uniquely identify a device on an IP network. The address is made up of 32 binary bits, which can be divisible into a network portion and host portion with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP address is said to be expressed in dotted decimal format (for example, The value in each octet ranges from 0 to 255 decimal, or 00000000 – 11111111 binary.

Here is how binary octets convert to decimal: The right most bit, or least significant bit, of an octet holds a value of 20. The bit just to the left of that holds a value of 2^1. This continues until the left-most bit, or most significant bit, which holds a value of 2^7.


Okay, so the next subnet is 192.168.164/26. I’ll copy the previous example, but remember this is actually a different subnet now. The subnet address is /64. So, we will need to update these values in the last octet.

So to work out the first host you simply add one to the subnet portion. Subnet portion is 64. So 1 added to that is 65.

The next subnet is 128. So going back to our original example, this is the second subnet, this is the third subnet, 128. That means that the broadcast for the subnet is 127 because a 128 minus 1 equals 127. This is the next subnet minus 1 gives us our broadcast for the current subnet.
Last IP address in the subnet is 126, next one is 125, next one is 124.

So there is our subnet to broadcast for second and last host and third last host. I haven’t rejected the binary. You could do that if you wanted to. I’m simply using a quick method to work out the IP addresses.

So this router needs to be configured with the first IP address on the serial interface.
So interface serial 0/1/0
no shut
ip address 192.168.165 uses that subnet mask.

So again, it’s just 1 more than the broadcast address.
show ip interface brief
there’s the IP address on the serial interface.
On the Internet router, we need to use one less than the next subnet, so 127.

show ip interface brief
On the first serial interface
interface serial 0/1/0
no shut
ip address with the subnet mask. 127 is the broadcast, one less than that gives us our last IP address.

So can we ping 192.168.165? Yes, we can. So that’s great.
We have IP connectivity between this router and the Internet router and notice an OSPF neighbor relationship has come up. The routers were pre-configured with OSPF.
So hopefully, this router can now ping the DNS server on the Internet and notice it can.

On PC 1, can it ping the DNS server? Yes, it can.
If I trace to the DNS server, traffic is going to router 1, on the Ethernet interface, then it’s going to the Internet router on the serial interface and then to the Internet. The reason it works this router has been pre-configured with OSPF but it also being pre-configured with network address translation. This lab is concentrating on subnetting, so I pre-configured the NAT and routing protocols so that you don’t have to worry about that.

Can we get to Yes, we can.
Can we get to Yes, we can.
So that works on PC 0.

What about PC 2? Can we get to Yes, we can.
Can we get to Yes, we can.
So I’m hoping already at this point, you’ve learned a lot about IP addressing, subnetting, how to configure it and how to make it practical in a network.

In the next video, I’m just going to continue doing something very similar for the other subnets and I’m going to speed it up by using tricks rather than binary.

  • David Bombal