Subnetting PT Network Challenge

Subnetting with Packet Tracer Overview

Packet Tracer is a great network simulation tool that is made available to Cisco Academy students. It is ideal for quickly testing networking concepts and learning. In this Packet Tracer Skills Assessment (.pka) you will need to subnet a network into 7 subnet address ranges, configure the network devices and hosts with those addresses, set up static and default routes, and set up HTTP and DNS services on a host server.

If you have Packet Tracer 5.3.3  you can download, extract, and run the zipped .pka file below. Read the built in instructions. When you have finished configuring the network you should be able to ping the server from the PC hosts as well as open the www.cisco.com web page from host PC0 or PC1s simulated web browser.

In the activity you will need to create the following 7 subnets from the 172.16.0.0 /22 network address range:

1st subnet 400 hosts,
2nd subnet 180 hosts,
3rd subnet 40 hosts,
4th subnet 18 hosts,
5th subnet WAN Point to Point (4 hosts),
6th subnet WAN Point to Point (4 hosts),
7th subnet WAN Point to Point (4 hosts),

Screenshot of configure_the_network.pka activity

 

Download

Configure_the_Network_Challenge_7.zip

VLSM and CIDR

Overview

The ability of routing protocols to route to networks with Variable Length Subnet Masks (VLSM) and Classless Interdomain Routing (CIDR), along with the creation of NAT and private addressing, has enabled IPv4 to remain a viable network address solution well beyond its original design limitations.

When IPv4 addressing was first developed it was designed as a class based system with Class A, B, C, D, E addresses.

Class A:  0.0.0.0   – 127.255.255.255
Class B:  128.0.0.0 – 191.255.255.255
Class C:  192.0.0.0 – 223.255.255.255
Class D:  224.0.0.0 – 239.255.255.255
Class E:  240.0.0.0 – 255.255.255.255

The IP address class system is based on the IP address as read in binary. This means there is a logic to the classes based on the bit pattern, or the first 4 bits (higher order bits) read left to right. In other words, in all Class A addresses, the first two bits (left to right), in binary, will start with a 01, a Class B address will start with a 10, a Class C address with a 110, a Class D address a 1110, and a Class E address with a 1111.

This class based system was divided into networks and hosts based on a netmask system with the following class-based netmasks:

Class A:  255.0.0.0  (255 network addresses and 16,777,216 hosts)
Class B:  255.255.0.0  (65,536 network addresses and 65,536 host addresses)
Class C:  255.255.255.0  (16,777,216 network addresses and 256 host addresses)

In this system, the networks are defined by the portion of 255s and the hosts are defined by the portion of zeros. Of course, in binary this is simply the ones on the left hand side and the zeros on the right. This class structure creates a hierarchy of larger to smaller networks, and a publicly available class range from Class A to Class C.

We can see the limitations in the system if we set up a hypothetical scenario of a country that reserves one of the two hundred and fifty six available Class A address’ for its country. Let’s say hypothetically that the country reserves the Class A address 23.0.0.0 /8. How would it divide its networks and addresses? In a class based system of networks and hosts it is limited to classful networks. For example:

a hierarchical classful network scenario

1 Class A network for 1 country 256 Class B networks for 256 cities 256 Class C networks for 256 businesses per city 256 Class C public IP addresses per business
23.0.0.0 /8 23.0.0.0 /16
23.1.0.0 /16
23.2.0.0 /16
23.3.0.0 /16
…to…
23.255.0.0 /16
23.1.0.0 /8
23.1.1.0 /8
23.1.2.0 /8
23.1.3.0 /8
…to…
23.1.255.0 /8
23.1.1.0 /8
23.1.1.1 /8
23.1.1.2 /8
23.1.1.3 /8
…to…
23.1.1.255 /8

So in this scenario, a business would be restricted to having one Class C network with 256 public IP addresses. You can easily see the limitations of classful addressing. What if a business only needed 10 IP addresses, the rest would be waisted? Luckily, VLSM, CIDR, NAT and the development of Private Address spaces: 10.0.0.0/8, 172.16.0.0 /20, and 192.168.0.0 /16 were designed to help save IP addresses and make networks more flexible by allowing them to be different sizes then the ones mandated by the Classful IPv4 address structure.

If every computer on the internet needed a public IP address we would have run out of IPv4 addresses a long time ago. The development of VLSM and CIDR, NAT, and Private Addressing helped the conservation of IPv4 addresses that was brought about by the need to deal with the exponential growth of the internet and the realisation that IPv4 was simply running out of address space. Since then, IPv4 address space has indeed run out, and IPv6 has been developed which will never run out, but VLSM, CIDR, NAT, and private addressing enabled IPv4 to last much longer than expected and because of those developments IPv4 is still very much in use today.

VLSM – Variable Length Subnet Masks and CIDR – Classless Interdomain Routing

So how does VLSM and CIDR work? CIDR basically means that when routing you are not limited to networks based on /8, /16, or /24 subnet masks, and VLSM means that as long as the address spaces do not overlap, you can divide a classful network like 192.168.1.0 /24 into networks of different sizes and subnet masks like this:

192.168.1.0 /24 (1 network with 256 hosts)
or in the example below, 7 networks of different sizes

192.168.1.0 ..to.. 192.168.1.127 /25 (1 network with 128 hosts),
192.168.1.128 ..to.. 192.168.1.191 /26 (1 network with 64 hosts),
192.168.1.192 ..to.. 192.168.1.223 /27 (1 network with 32 hosts),
192.168.1.224 ..to.. 192.168.1.239 /28 (1 network with 16 hosts),
192.168.1.240 ..to.. 192.168.1.247 /29 (1 network with 8 hosts),
192.168.1.248 ..to.. 192.168.1.251 /30 (1 network with 4 hosts),
192.168.1.252 ..to.. 192.168.1.255 /30 (1 network with 4 hosts)

How I divide the networks above into variable sizes is based on the subnet mask and the binary place value of the last “1” bit. I like to call this method the “Magic Number.” Notice that the networks above are the same size as the Magic Number of the subnet mask.

the magic number is bold

/25 = 11111111.11111111.11111111.10000000  (the last 1 is in the 128 place)
/26 = 11111111.11111111.11111111.11000000  (the last 1 is in the 64 place)
/27 = 11111111.11111111.11111111.11100000  (the last 1 is in the 32 place)
/28 = 11111111.11111111.11111111.11110000  (the last 1 is in the 16 place)
/29 = 11111111.11111111.11111111.11111000  (the last 1 is in the 8 place)
/30 = 11111111.11111111.11111111.11111100  (the last 1 is in the 4 place)
you cannot do /31 and /32, but you can do /7, /8, /15, /16, /23 /24 etc.
/23 = 11111111.11111111.11111110.00000000  (the last 1 is in the 2 place)
/24 = 11111111.11111111.11111111.00000000  (the last 1 is in the 1 place)

 Summary Routes and Supernets

With CIDR and classless addressing, not only can you divide subnets into smaller subnets you can also generalize or summarize subnets into supernets. A supernet allows a router to put one summary route in its routing table instead of many routes. Take the following example:

Let’s say you have a router that is connected to another router that has the following connected networks:

192.168.0.0 /24
192.168.1.0 /24
192.168.2.0 /24
192.168.3.0 /24
192.168.4.0 /24
..to..
192.168.15.0 /24

Instead of configuring 16 static routes to reach all of those networks you could configure one supernet route of 192.168.0.0 /16 thus basically saying, all of the 192.168 networks are over there! Of course, if in fact it is only networks 192.168.0 through 192.168.15 then a more correct supernet route would be 192.168.0.0 /20 which says: networks 192.168.0.0 through 192.168.15.0 are over there, because the /20 subnet mask has a magic number of 16, and networks 192.168.16 and up, are not in the range being summarized.

Video Tutorials on VLSM and CIDR

Video Tutorials – A Packet Tracer walkthrough of VLSM CIDR and Summary Routes

Subnetting Challenge

Subnetting Network Challenge

Look at the network diagram below, fill in the correct IP addresses based on the information given in the diagram, and click the “Check Your Answer” button to check your answer. Fill in the fields with IP addresses and no subnet masks, the correct subnet masks are assumed.


Note: The diagram above relates to a PT Skills Challenge in the Cisco Routing Protocols and Concepts Curriculum (section 1.5.3 – 2) This visual diagram may help you make sense of that particular Packet Tracer as well as practice your subnetting skills.

Subnetting a Subnet with VLSM

VLSM Overview

Variable Length Subnet Masks (VLSM) are used to create subnetworks of varying sizes. This can be done as long as the IP address spaces of the subnets do not overlap. VLSM gives network designers the ability to not waste public IPv4 addresses by creating networks in sizes they need. Early dynamic routing protocols were not designed to work with VLSM because they were designed around classful IPv4 addressing. Modern routing protocols are designed to work with VLSM and classless inter-domain routing (CIDR). For the Cisco CCNA exam, you will need to know how to create subnets of varying sizes that do not have overlapping address spaces.

In the video tutorials below, I demonstrate how to solve a typical variable length subnet mask multiple choice question. The type of which you might see on an exam.

Video Tutorials – VLSM

Subnetting

Video Tutorials on Subnetting

The following ten video tutorials represent my most recent series on Cisco CCNA IPv4 subnetting. My personal feeling is that the only way to learn subnetting is to understand how it is working in binary. Subnetting makes sense if you try to understand it from the perspective of the binary number system. You can definitely tell how important I feel this topic is in order to do well, and pass your Cisco CCNA exam. Out of this series of videos, the last three seem to be the most popular. I hope these videos help your learning on the topic of subnetting.

In the videos I cover classful and non-classful network masks, the binary process of ANDing, class A, class B, and Class C subnetting, and typical IPv4 subnetting questions you may see on a multiple choice exam.

IPv4 Addresses and Subnet Masks

The Format of an IPv4 Address

An IPv4 address can be written in two ways:

dotted decimal notation – 192.168.1.1
32-bit binary notation – 11000000.10101000.00000001.00000001

The address has 4 octets separated by periods and counted from let to right. There are three types of IPv4 addresses: a network address, a host address, and a broadcast address. In other words you could say a computer is on the 192.168.10.0 /24 network (network address), and is using a host address of 192.168.10.1. The address 192.168.10.1 represents the ip address in dotted decimal notation. That same address in binary notation is 11000000.10101000.00001010.00000001. The 1(00000001) is in the 4th octet.

Converting Binary to Decimal and Vice Versa

The most popular, and (in my opinion) easiest way to convert a binary number to decimal is using a table like so:

128 64 32 16 8 4 2 1
0 0 1 1 1 0 0 1
0 + 0 + 32 + 16 + 8 + 0 + 0 + 1 = 57
Aside from knowing the table well enough to use it without writing it all out, there are various tricks for binary/decimal conversion. Personally, I’ve never found them very practical, but this doubling trick for converting binary to decimal, and this halving trick for converting decimal to binary are pretty cool.

Network Portion and the Host Portion of an IP Address and Subnet Mask

The network portion and the host portion of an ip address is defined its subnet mask. This process is easy if the subnet mask is classful meaning either:

Class C  –  255.255.255.0  or /24,
Class B  –  255.255.0.0  or /16,
Class A  –  255.0.0.0  or /8

So if the ip address is 192.168.1.100 and the subnet mask is classful meaning 255.255.255.0 then the 255s in the subnet mask tell you the network portion and the 0s tell you the host portion. For example, below the network portion is in red and the host portion is in black:

192.168.1.100
255.255.255.0
(So the network is 192.168.1.0, and the host is number 100)

Using the example above the first address in the network is the network address (192.168.1.0). The last address in the network is the broadcast address (192.168.1.255), and the host addresses in the network are the addresses between the network and the broadcast  (192.168.1.1 – 192.168.1.254).

The process is a little more difficult when a non-classful subnet mask is used. In this scenario binary conversion must be used to delineate the network and host portions of an address. Consider the following example:

192.168.1.100 /27 or

192.168.1.100
255.255.255.224
Where are the network and host portions now?

To easily solve the question convert to binary:
11000000.10101000.00000001.01100100  = 192.168.1.100
11111111.11111111.11111111.11100000 = 255.255.255.224
(The 1s in the subnet mask identify the network portion, the 0s the host portion)

The network and host portions are still defined by the subnet mask, just more accurately by seeing the address and mask in binary and identifying the 1s and 0s. The question that you now have to ask yourself is, what is the networkaddress, broadcast address and host addresses if the subnet mask is 255.255.255.224? To answer this question you need to, in binary, logically AND the ip address and subnet mask and you will get the network address. To understand this process and more see my video series on subnetting, ANDing and the Magic Number below.


Note: you have to have all subnet mask fields filled in.


3 Types of IP Addresses: Network Address, Host Address, and Broadcast Address

Network Address – The address by which we refer to the network
Uses the first address in the network,
The network address is reserved and is not usable by a host
All hosts in a network will have the same network address
All hosts in a network will have the same network bits or network portion

Broadcast Address – The address used to send data to all of the hosts on a network
Uses the highest (last) address in the network,
The broadcast address is reserved and is not usable by a host
The bits in host portion are all 1’s
Also called a directed broadcast

Host Address – The addresses assigned to the end devices in the network
Each and every device in the network needs a unique ip address,
The host addresses lie between the network and broadcast address

Public and Private Addressing

Private addresses are blocks of ip addresses that are not routable on the internet. The private address blocks are:

10.0.0.0 to 10.255.255.255   (10.0.0.0 /8)
172.16.0.0 to 172.31.255.255   (172.16.0.0 /12)
192.168.0.0 to 192.168.255.255   (192.168.0.0 /16)

Since private addresses are implemented on LANs behind a firewall different networks may use the same private address schemes. Private addressing requires Network Address Translation (NAT) in order to translate private addresses to public addresses for use on the internet. With this (NAT) technique, many hosts in a private network can channel all communications through a single public ip address allowing communicate over the internet.

Public Addresses are designed to be used by hosts that are publicly accessible from the internet. Public ip addresses are assigned by the InterNIC and consist of class-based network IDs called CIDR blocks.

 


Video Tutorial Series – IP Addresses, Binary Conversion, and Network Masks

In order to understanding of subnetting you need to be able to convert IP addresses from decimal to binary. Subnetting, subnetworks, and subnet masks only make sense from the perspective of binary. The reason you need to convert the addresses to binary is that it is the way routers find networks. Routers and computers find networks by ANDing IP addresses with the subnet masks. If you want to understand the logic behind the process you need to be able to see it from the perspective of the router. In the following video tutorials I lay out the simple process of converting IP addresses and subnet masks to binary. I also cover finding the network portion and host portion of a network or subnetwork mask. I recommend watching all of these videos as as my following series on the “Magic Number.”

Video Tutorial Series – Subnetting with the Magic Number – Parts 1 through 6

In this series of tutorials, I explain how you can easily find the network address, broadcast address, and first and last host addresses from any ip address and subnet mask combination. The ability to calculate subnets is the most important skill for success in the Cisco CCNA. The magic number trick will make that process a snap!

Unicast, Broadcast, and Multicast Messaging 

A message or packet sent to a unique ip host address is called a unicast message. A unicast message is a message addressed to a single unique host. By contrast a message or packet sent to a broadcast address is called a broadcast message. It is a message meant for all hosts on a network. A multicast message is a message sent to a multicast address, typically an address starting with 224 like 224.0.0.1. An address that starts with 224 is a Class D address which is an address space reserved for multicasts. A multicast message is like a broadcast message in that most, or all, hosts on the network will open the packet and examine its contents before deciding whether or not to drop the message or send it up the layers for decapsulation.