How to Subnet a Network

How to Subnet a Network

How to use this paper

♦ Absolute Beginner: Read all Sections 1-4
♦ Need a quick review: Read Sections 2-4
♦ Just need a little help: Read Section 4


Part I: For the IP Beginner

IP Network Addresses

To understand network IP address, let’s take a look at postal addresses. Every building
must have its own unique address in order for mail to be delivered. An address consists of
different parts such as the street, number, and city. In a network, every device must have
its own unique IP address. That is, every network device (printer, server, router, etc.)
must be identified with a separate IP address.

Many Devices or Hosts

Using the postal example, think about an apartment building. In order for the mail to
arrive at the right apartment, each apartment must have its own unique identifier
(apartment number) in addition to the street name and address.
With IP addresses, an organization is assigned a unique IP network, such as 192.168.1.0,
but a single IP address must be assigned for each network device. For example, let's
assume that ABC company has 5 devices in one of their building that need IP addresses,
and that ABC is assigned the network address 192.168.1.0. The IP addresses could be
assigned as follows:

Device 1 (router): 192.168.1.1
Device 2 (office printer): 192.168.1.2
Device 3 (Ms. Chung's laptop): 192.168.1.3
Device 4 (Receiptionist's computer): 192.168.1.4
Device 5 (company server): 192.168.1.5

Hosts .1, .2, .3, .4, and .5 are all on the 192.168.1 network, just as apartments 1, 2, 3, 4,
and 5 might be located in the apartment building at 123 First Street.


When you see an IP address, you will always see another number associated with it that
looks something like one of the following:

  • 255.255.255.0
  • 255.255.0.0
  • 255.0.0.0

This number is called the subnet mask. A subnet mask is used to show which portion of
the IP address identifies the network and which portion identifies a specific host on the
network. This may seem unnecessary at first since the first three numbers of an IP address
starting from the left (such as 192.168.1) always identify the network, and the last number
(such as .1) always identifies an individual device in networks like the one in our example,
which is called a standard Class C network. However, this is not true for other networks.
That's why subnet masks are used to differentiate the network portion of the address from
the host portion. The following table shows the subnet mask 255.255.255.0, which is
always the subnet mask for a standard Class C network, applied to one of our example
addresses. Notice how the mask reveals which portion of the string 192.168.1.1 is the
individual host address.
NOTE: Class C addresses have a number from 192 to 223 in the first octet.





The number 255 indicates that the corresponding section of the address is part of the
network address. The 0 indicates that the corresponding section is the host portion of the
address.
This document and the Subnet game refer only to Class C networks. Once you
understand IP addressing for Class C networks, it will be much easier for you to
understand IP addressing for any network.

Part II: Binary Numbers

To understand network addresses, we should take a moment to consider the binary
number system. Since all electronic devices only understand binary numbers, all network
addresses are actually made up of binary digits called bits. An IP address consists of32
bits, broken into four parts called octets. Each octet equals 8 bits. Our sample network
address of 192.168.1.0, looks like this in binary.



But how does 11000000 equate to 192? How does 10101000 equate to 168? Here's how.

A bit can have only two possible values: on, which is represented by a 1, or off, which is
represented by a 0.. To represent the decimal number 0, as in the last octet above, all 8
bits are turned off. When turned on, each bit has a value. Let's take a look at one 8-bit
octet, since each octet contains a distinct number. The values are as follow:



The right-most bit has a value of 1, the next bit has a value of 2, the next bit has a value
of 4, and so on as shown in the chart above. The decimal value of an octet is the sum of
the bit values. So if all bits are on, the value of the octet is 255, or 128 + 64 + 32 + 16 + 8
+ 4 + 2 + 1

The following table shows that 11000000 equals 192 in decimal. The bit with a value of
128 and the bit with a value of 64 are turned on, so we add 128 + 64 and get 192.



This table shows that 10101000 equals 168 in decimal. The bits with values of 128, 32,
and 8 are turned on, and their sum equals 168.



Part III: From IP Addressing to IP Subnetting

Subnetting can be useful in a variety of ways, including simplifying network
administration, enabling you to use different physical media such as Ethernet and FDDI,
and adding a layer of security to your network. The most common use ofsubnetting is to
control network traffic.
Subnetting is done by borrowing host bits and using them as network bits. To begin,
let's look at our ABC company network address (192.168.1.0) and its subnet mask
(255.255.255.0) as expressed in binary. Notice that the address bits that have
corresponding mask bits set to 1 represent the network address. Address bits that have
corresponding mask bits set to 0 represent the individual host address.



With this address, the bits from octets 1, 2, and 3 are used to identify the network portion
ofthe address. However, we could subnet our network by borrowing bits from the fourth
octet. To do so, we must take bits consecutively from left to right. In the following table,
we borrow the bit with a value of 128..




This changes our subnet mask. Instead of 255.255.255.0, it is now 255.255.255.128.

The more host bits you use for subnets, the more subnets you have available. However, as
more subnets are created, the less host addresses are available per subnet. In the
following table, we borrow both the 128 and the 64 bit. We now have only 6 bits left for
host addresses, and our mask is now 255.255.255.192.




Notice also that we use the fourth octet to subnet a Class C network. Because of this
document and the Subnet game refer only to Class C networks, the remainder of this
document will focus only on the fourth octet. Once you understand IP subnetting for
Class C networks, it will be much easier for you to understand IP subnetting for any
network.

So, back to our fourth octet, exactly what network and host addresses can we create by
borrowing these two bits and thus applying this .192 mask?



Let's look first at the subnets. We have two digits with which to create subnets.


Looking at the bit value chart, it's easy to see that those two digits can be . . .

00, which equals 0


01, which equals 64



10, which equals 128



or 11, which equals 192



So we have created the following subnets:
192.168.1.0
192.168.1.64
192.168.1.128
192.168.1.192

That means that these numbers (0, 64, 128, and 192) can no longer be host addresses
because they are now subnetted addresses. Each subnet, like any network, must have a
broadcast address as well. The broadcast address is the last address on the network, so on
our first subnet, 192.168.1.0, available host addresses are 192.168.1.1 through
192.168.1.62. The 192.168.1.63 is the broadcast address and 192.168.1.64 is the address
of the next subnet. Remember that before we subnetted our network, we could use all 8
bits of the 4th octet for host addresses. That gave us 254 host addresses. We now have 62
for each of our 4 subnets, or 248 total.

The following table shows the complete results of borrowing two host bits to subnet our
Class C network.



Part IV: All You Really Need

Subnetting can seems pretty complicated, but here's all you really need in order to easily
and rapidly subnet a network, a little chart we sometimes call the Happy Chart. You'll
soon see why.



Assume you own the 199.1.2.0 network. You need to create 16 subnets and you will need
no more than 12 hosts on each subnet. Complete the following steps:

1. Find out how many bits you need to borrow by counting by powers of two (starting
with 2 to the 1) from the left-most bit until you reach the number of subnets you need. Draw
an imaginary line to the right of the last bit you borrow. The subnet mask you need is
the one to the left of the line. To make sure you have the right amount of hosts for
each network, you can count by powers of two (starting with 2 to the 1) from the right-most
bit until you reach the number of hosts you need.



2. Obtain the network addresses by starting with the 0 network, which is always the first
(199.1.2.0) and adding the bit value that corresponds to the mask. For this example,
that tells us the second network is 199.1.2.16. Continue to increment by this bit value
to obtain all the network addresses.

199.1.2.0
199.1.2.16
199.1.2.32
199.1.2.48
199.1.2.64
199.1.2.80
199.1.2.96 . . . and so on


3. Once you see the network addresses, it's easy to determine the broadcast addresses
and the valid host addresses for each subnet. For example, the last address on the
199.1.2.0 network has to be 199.1.2.15 because 199.1.2.16 is the next network
address. Since it's the last address on the network, 199.1.2.15 is the broadcast address.
All addresses between 199.1.2.0 and 199.1.2.15 are the host addresses for the
network.

Let's try another example. Assume you own the 200.20.2.0 network. You want to create 2
subnets, but you need up to 125 hosts on at least one of the subnets. Complete the
following steps:

1. Find out how many bits you need to borrow by counting the bits by powers of two
(starting with 2 to the 1) from the left-most bit until you reach the maximum number of
subnets you need. Draw an imaginary line to the right of the last bit you borrow. The
subnet mask you need is the one to the left of the line.


2. Obtain the network addresses by starting with the 0 network, which is always the first
(200.20.2.0) and adding the bit value that corresponds to the mask. For this example,
that tells us the second network (and last in this case) is 200.20.2.128. The reason it

has to be the last subnet is that you would get 200.20.2.256 as the next network
address if you incremented again by 128. An octet cannot contain a number greater
than 255.
200.20.2.0
200.20.2.128



3. Once you see the network addresses, it's easy to determine the broadcast addresses
and the valid host addresses for each subnet. For this example, the last address on the
200.20.2.0 network has to be 200.20.2.127 because 200.20.2.128 is the next network
address. Since it's the last address on the network, 200.20.2.127 is the broadcast
address. All addresses between 200.20.2.0 and 200.20.2.127 are the host addresses for
the network.

Let's do that example again with just a little modification. Again assume you own the
200.20.2.0 network. You want to subnet your network as much as possible, but you need
up to 125 hosts on at least one of the subnets. Complete the following steps:

1. Note: This is the only steps we will change. We are changing it to show how you can
count by powers of two from right to left to ensure that you get the desired number
of hosts... Find out how many bits you need to borrow by counting the bits by powers
of two (starting with 2 to the
1
) from the right-most bit until you reach the maximum number of
hosts you need on any subnet... Draw an imaginary line to the left of the last bit you
borrow. The subnet mask you need is still the one to the left of the line.




2. Obtain the network addresses by starting with the 0 network, which is always the first
(200.20.2.0) and adding the bit value that corresponds to the mask. For this example,
that tells us the second network (and last in this case) is 200.20.2.128. The reason it
has to be the last subnet is that you would get 200.20.2.256 as the next network
address if you incremented again by 128. An octet cannot contain a number greater
than 255.

200.20.2.0
200.20.2.128




3. Once you see the network addresses, it's easy to determine the broadcast addresses
and the valid host addresses for each subnet. For this example, the last address on the
200.20.2.0 network has to be 200.20.2.127 because 200.20.2.128 is the next network
address. S ince it's the last address on the network, 200.20.2.127 is the broadcast
address. All addresses between 200.20.2.0 and 200.20.2.127 are the host addresses for
the network.

Now you try it! (Answers found at the end ofthis paper)
Here are some examples for you to try. Use the Happy Chart to help you.

Example 1

XYZ Company would like to subnet its network so that there are five separate subnets.
They will need 25 computers in each subnet. Complete each ofthe following:
NOTE: If you create more than five subnets, list the extra ones too.





Note: The term "Class C" is used in this document to help facilitate the understanding of
IP addressing and subnetting. IP address class terminology is rarely used in the industry
anymore because ofthe introduction of classless interdomain routing (CIDR).


Example 2

Company ABC would like to subnet its network (219.7.9.0) so that there are 32 separate
subnets. They will need 6 hosts in each subnet. Complete the following table:

NOTE: Because there are so many subnets, don't write them all out (unless you just want
to). If you can do the first ten and know what the last one is, you get the idea.




Example 3

The Acme Company would like to subnet its network (195.5.5.0) so that there are 50 separate
subnets. They will need only 2 hosts in each subnet. Complete each ofthe following:

NOTE: Because there are so many subnets, you don't need to write them all out. If you
can fill in the information required below (the subnet mask, the addresses for the first few
subnets, and the total number ofsubnets created), you obviously get the idea.




How many subnets are actually created with this subnet mask you used? __



ANSWERS TO PRACTICE PROBLEMS

Example 1

XYZ Company would like to subnet its network so that there are five separate subnets.
They will need 25 computers in each subnet. Complete each ofthe following:

NOTE: If you create more than five subnets, list the extra ones too.


Example 2

Company ABC would like to subnet its network (219.7.9.0) so that there are 32 separate
subnets. They will need 6 hosts in each subnet. Complete the following table:

NOTE: Because there are so many subnets, don't write them all out (unless you just want
to). If you can do the first ten and know what the last one is, you get the idea.



Example 3

The Acme Company would like to subnet its network (195.5.5.0) so that there are 50
separate subnets. They will need only 2 hosts in each subnet. Complete each ofthe
following:

NOTE: Because there are so many subnets, you don't need to write them all out. If you
can fill in the information required below (the subnet mask, the addresses for the first few
subnets, and the total number ofsubnets created), you obviously get the idea.



How many subnets are actually created with this subnet mask you used? 64


Thank you everyone i hope you enjoyed!









Cisco,Cisco Press,Microsoft,Oracle,CompTIA,CIW,Adobe,ISC2,Linux,Cisco Press,e-learning,CCNA,CCNP,CCIE,HCNA,HCNP,HCIE,CCNP,CCIE,HCNA,HCNP,HCIE,bootcamp,IT certification,MCTS,MCITP,A+,Network+,Security+,Online tutorials for Internet,Networking,Security,Website Development,Network Design,Computers,Information Security,exams,free practice tests,router simulations,hands-on labs,CCNA,CCENT,ICND1,ICND2,CISCO,NETWORK,TEST QUESTIONS,PREPARATION STUDY GROUP, ccna, cisco, ccnp, ccie, networking, it, security, networkengineer, technology, mikrotik, iman, farahi, network, linux, tech, python, ccent, iot, computer, datacenter, life , informationtechnology, voip, programming, virtualization, e, developer, programmer, mtcna, bhfyp,
, ccna, cisco, ccnp, ccie, networking, it, security, networkengineer, technology, mikrotik, iman, farahi  network, linux, tech, python, ccent, iot, computer, datacenter, life, informationtechnology, voip, programming, virtualization, e, developer, programmer, mtcna, bhfyp

















No comments:

Apply For Self Study E-Learning Notes

Pages